cpu/x86/smm/smm_stub: Fix stack canary on x86_64

On x86_64 the cannary is 8 bytes in size, so write the additional
4 bytes to make SMM handler happy.

Tested on Intel Skylake in long mode. No longer dies in SMM.

Change-Id: Id805c65717ec22f413803c21928d070602522b2c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48215
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2020-12-01 16:35:30 +01:00 committed by Patrick Rudolph
parent 9e7497e64f
commit 484adee53e
1 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,9 @@ smm_trampoline32:
movl stack_size, %eax
subl %eax, %ebx /* %ebx(stack_top) - size = %ebx(stack_bottom) */
movl %ebx, (%ebx)
#if ENV_X86_64
movl $0, 4(%ebx)
#endif
/* Create stack frame by pushing a NULL stack base pointer */
pushl $0x0