From 03a79520d6f62072ff3de75cc8bbbf0ff4876f62 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 29 Sep 2019 11:08:33 +0200 Subject: cpu/x86/smm: Add support for long mode Enable long mode in SMM handler. x86_32 isn't affected by this change. As the rsm instruction used to leave SMM doesn't restore MSR registers, drop back to protected mode after running the smi_handler and restore IA32_EFER MSR (which enables long mode support) to previous value. NOTE: This commit does NOT introduce a new security model. It uses the same page tables as the remaining firmware does. This can be a security risk if someone is able to manipulate the page tables stored in ROM at runtime. USE FOR TESTING ONLY! Tested on Qemu Q35. Change-Id: I8bba4af4688c723fc079ae905dac95f57ea956f8 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/35681 Reviewed-by: Raul Rangel Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- Documentation/arch/x86/index.md | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/arch') diff --git a/Documentation/arch/x86/index.md b/Documentation/arch/x86/index.md index 30dcc10e91..f5546d18d5 100644 --- a/Documentation/arch/x86/index.md +++ b/Documentation/arch/x86/index.md @@ -45,6 +45,7 @@ At the moment *$n* is 4, which results in identity mapping the lower 4 GiB. * Add x86_64 exception handlers - *DONE* * Setup page tables for long mode - *DONE* * Add assembly code for long mode - *DONE* +* Add assembly code for SMM - *DONE* * Add assembly code for postcar stage - *TODO* * Add assembly code to return to protected mode - *TODO* * Implement reference code for mainboard `emulation/qemu-q35` - *TODO* -- cgit v1.2.3