Patrick Rudolph has uploaded this change for review. ( 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(a)9elements.com>
---
M src/cpu/x86/smm/smm_stub.S
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/48215/1
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
--
To view, visit https://review.coreboot.org/c/coreboot/+/48215
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id805c65717ec22f413803c21928d070602522b2c
Gerrit-Change-Number: 48215
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48214 )
Change subject: cpu/x86/smm/smm_stub: Fix GDT for x86_64
......................................................................
cpu/x86/smm/smm_stub: Fix GDT for x86_64
The previous code was crashing when jumping back to ramstage, now it
works. The GDT is now using the same values as the other ones in
coreboot.
Change-Id: Id00467d9d8a4138ddea73adbda4b39f12def583f
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/cpu/x86/smm/smm_stub.S
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/48214/1
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 11ea9a7..56e2504 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -91,7 +91,7 @@
/* gdt selector 0x18, flat code segment (64-bit) */
.word 0xffff, 0x0000
- .byte 0x00, 0x9b, 0xcf, 0x00
+ .byte 0x00, 0x9b, 0xaf, 0x00
/* gdt selector 0x20 tss segment */
.word 0xffff, 0x0000
--
To view, visit https://review.coreboot.org/c/coreboot/+/48214
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id00467d9d8a4138ddea73adbda4b39f12def583f
Gerrit-Change-Number: 48214
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange