arch/x86: align stack on entry to x86_exception()

Entry points from assembly to C need to have the stacks aligned
to 16 bytes with the newer compilers. This entry point was
missed. Correct it.

BUG=b:72728953

Change-Id: Idb29daf830c05fd5543c2194690364ce31b6a22c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25763
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Aaron Durbin 2018-04-21 00:14:08 -06:00
parent 7a7c70b26a
commit 38fd6685e9

View file

@ -172,9 +172,16 @@ int_hand:
pushl %ecx
pushl %eax
pushl %esp /* Pointer to structure on the stack */
/* Save pointer to eregs structure */
movl %esp, %ebp
/* Align stack to 16 bytes. */
andl $0xfffffff0, %esp
/* Save original stack pointer while keeping stack alignment. This
value is also the eregs argument x86_exception(). */
sub $12, %esp
pushl %ebp /* Pointer to structure on the stack */
call x86_exception
pop %eax /* Drop the pointer */
pop %esp /* Unwind the stack alignment and argument passing. */
popl %eax
popl %ecx