Patrick Rudolph has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48215 )
Change subject: cpu/x86/smm/smm_stub: Fix stack canary on x86_64 ......................................................................
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 --- M src/cpu/x86/smm/smm_stub.S 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index 56e2504..45f634d 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -144,6 +144,9 @@ 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