summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2020-12-01 16:35:30 +0100
committerPatrick Rudolph <siro@das-labor.org>2020-12-02 16:48:35 +0000
commit484adee53ec00db0e107067f4f87727b9b7bf177 (patch)
treeee851d75f7e16b07f649a410e313c68e48697156 /src/cpu/x86
parent9e7497e64fabc9a9f7ab1349c44e917d822dc4fe (diff)
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>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/smm/smm_stub.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 56e2504892..45f634d0c9 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -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