diff options
author | Patrick Rudolph <siro@das-labor.org> | 2020-08-25 20:41:11 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2020-08-30 14:48:35 +0000 |
commit | 9256e51f48550c83f5425550b8feee9fc2b7366c (patch) | |
tree | ea3c9f7ace400621a4ea2610d237ecda83dda81a /src/cpu/x86/smm | |
parent | 2e29c3b0d5168fdc96c3d85c9b54b5a01c950261 (diff) |
cpu/x86/smm/smmhandler: Fix x86_64 assembly exit
Fix an issue the assembler didn't warn about to fix a crash on real
hardware. qemu didn't catch this issue either.
The linker uses the same address for variables in BSS if they aren't
initialized in the code. This results in %edx being set to the value
of %eax, which causes an exception restoring IA32_EFER on real
hardware.
Tested on qemu with KVM enabled.
Change-Id: Ie36a88a2a11a6d755f06eff9b119e5b9398c6dec
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44780
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/cpu/x86/smm')
-rw-r--r-- | src/cpu/x86/smm/smmhandler.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S index 340840f685..1cff23afe6 100644 --- a/src/cpu/x86/smm/smmhandler.S +++ b/src/cpu/x86/smm/smmhandler.S @@ -46,9 +46,9 @@ #if defined(__x86_64__) .bss ia32efer_backup_eax: -.long +.long 0 ia32efer_backup_edx: -.long +.long 0 #endif /* initially SMM is some sort of real mode. Let gcc know |