cpu/x86: Align stack in SIPI handler

Ensure the stack is properly aligned in the SIPI handler.  This
avoids an exception when an aligned instruction is performed on
stack data.

BUG=b:66003093
TEST=boot kahlee built with gcc 6.3

Change-Id: Ibdd8242494c6a2bc0c6ead7ac98be55149219d7c
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21768
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marshall Dawson 2017-09-29 11:14:44 -06:00 committed by Aaron Durbin
parent 38f19400f9
commit df31904133
1 changed files with 4 additions and 1 deletions

View File

@ -114,6 +114,8 @@ _start:
movl stack_top, %edx
subl %eax, %edx
mov %edx, %esp
andl $0xfffffff0, %esp /* ensure stack alignment */
/* Save CPU number. */
mov %ecx, %esi
@ -192,7 +194,8 @@ load_msr:
mov %eax, %cr4
#endif
/* c_handler(cpu_num) */
/* c_handler(cpu_num), preserve proper stack alignment */
sub $12, %esp
push %esi /* cpu_num */
mov c_handler, %eax
call *%eax