From a4677e426a78f81e2a53b374f3508f717b8b2f05 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sat, 10 Jun 2017 08:58:00 +0200 Subject: cpu/x86/smm/smihandler: Apply cosmetic changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use define for SSA base address. Move EM64T area to 0x7c00 and add reserved area of size 0x100, as there's no indication that the address 0x7d00 exists on any platform. No functional change. Change-Id: I38c405c8977f5dd571e0da3a44fcad4738b696b2 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/20146 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Paul Menzel --- src/include/cpu/x86/smm.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/include/cpu') diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 1892119d53..a88537b44b 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -32,6 +32,11 @@ #define SMM_ENTRY_OFFSET 0x8000 #define SMM_SAVE_STATE_BEGIN(x) (SMM_ENTRY_OFFSET + (x)) +/* AMD64 x86 SMM State-Save Area + * starts @ 0x7e00 + */ +#define SMM_AMD64_ARCH_OFFSET 0x7e00 + typedef struct { u16 es_selector; u16 es_attributes; @@ -128,16 +133,20 @@ typedef struct { /* Intel Core 2 (EM64T) SMM State-Save Area - * starts @ 0x7d00 + * starts @ 0x7c00 */ +#define SMM_EM64T_ARCH_OFFSET 0x7c00 +#define SMM_EM64T_SAVE_STATE_OFFSET \ + SMM_SAVE_STATE_BEGIN(SMM_EM64T_ARCH_OFFSET) typedef struct { - u8 reserved0[208]; + u8 reserved0[256]; + u8 reserved1[208]; u32 gdtr_upper_base; u32 ldtr_upper_base; u32 idtr_upper_base; - u8 reserved1[4]; + u8 reserved2[4]; u64 io_rdi; u64 io_rip; @@ -145,13 +154,13 @@ typedef struct { u64 io_rsi; u64 cr4; - u8 reserved2[68]; + u8 reserved3[68]; u64 gdtr_base; u64 idtr_base; u64 ldtr_base; - u8 reserved3[84]; + u8 reserved4[84]; u32 smm_revision; u32 smbase; @@ -159,7 +168,7 @@ typedef struct { u16 io_restart; u16 autohalt_restart; - u8 reserved4[24]; + u8 reserved5[24]; u64 r15; u64 r14; @@ -394,6 +403,7 @@ typedef struct { /* Legacy x86 SMM State-Save Area * starts @ 0x7e00 */ +#define SMM_LEGACY_ARCH_OFFSET 0x7e00 typedef struct { u8 reserved0[248]; -- cgit v1.2.3