2 This file declares the SMM CPU Save State protocol, which provides the processor
3 save-state information for IA-32 and Itanium processors.
5 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 This Protocol is defined in Framework of EFI SMM Core Interface Spec
19 #ifndef _SMM_CPU_SAVE_STATE_H_
20 #define _SMM_CPU_SAVE_STATE_H_
22 #define EFI_SMM_CPU_SAVE_STATE_PROTOCOL_GUID \
24 0x21f302ad, 0x6e94, 0x471b, {0x84, 0xbc, 0xb1, 0x48, 0x0, 0x40, 0x3a, 0x1d} \
27 typedef struct _EFI_SMM_CPU_SAVE_STATE_PROTOCOL EFI_SMM_CPU_SAVE_STATE_PROTOCOL
;
29 #define EFI_SMM_MIN_REV_ID_x64 0x30006
34 /// CPU save-state strcuture for IA32 and X64.
36 /// This struct declaration does not exctly match the Framework SMM CIS 0.91 because the
37 /// union in the Framework SMM CIS 0.91 contains an unnamed union member that causes build
38 /// breaks on many compilers with high warning levels. Instead, the UINT8 Reserved[0x200]
39 /// field has been moved into EFI_SMM_CPU_STATE32. This maintains binary compatibility for
40 /// the layout and also maintains source comaptibility for access of all fields in this
43 /// This struct declaration does not exctly match the Framework SMM CIS 0.91 because
44 /// the Framework SMM CIS 0.91 uses ASM_XXX for base types in this structure. These
45 /// have been changed to use the base types defined in the UEFI Specification.
48 UINT8 Reserved
[0x200];
49 UINT8 Reserved1
[0xf8]; // fe00h
50 UINT32 SMBASE
; // fef8h
51 UINT32 SMMRevId
; // fefch
52 UINT16 IORestart
; // ff00h
53 UINT16 AutoHALTRestart
; // ff02h
54 UINT32 IEDBASE
; // ff04h
55 UINT8 Reserved2
[0x98]; // ff08h
56 UINT32 IOMemAddr
; // ffa0h
57 UINT32 IOMisc
; // ffa4h
80 } EFI_SMM_CPU_STATE32
;
83 /// This struct declaration does not exctly match the Framework SMM CIS 0.91 because
84 /// the Framework SMM CIS 0.91 uses ASM_XXX for base types in this structure. These
85 /// have been changed to use the base types defined in the UEFI Specification.
88 UINT8 Reserved1
[0x1d0]; // fc00h
89 UINT32 GdtBaseHiDword
; // fdd0h
90 UINT32 LdtBaseHiDword
; // fdd4h
91 UINT32 IdtBaseHiDword
; // fdd8h
92 UINT8 Reserved2
[0xc]; // fddch
93 UINT64 IO_EIP
; // fde8h
94 UINT8 Reserved3
[0x50]; // fdf0h
96 UINT8 Reserved4
[0x48]; // fe44h
97 UINT32 GdtBaseLoDword
; // fe8ch
98 UINT32 GdtLimit
; // fe90h
99 UINT32 IdtBaseLoDword
; // fe94h
100 UINT32 IdtLimit
; // fe98h
101 UINT32 LdtBaseLoDword
; // fe9ch
102 UINT32 LdtLimit
; // fea0h
103 UINT32 LdtInfo
; // fea4h
104 UINT8 Reserved5
[0x50]; // fea8h
105 UINT32 SMBASE
; // fef8h
106 UINT32 SMMRevId
; // fefch
107 UINT16 AutoHALTRestart
; // ff00h
108 UINT16 IORestart
; // ff02h
109 UINT32 IEDBASE
; // ff04h
110 UINT8 Reserved6
[0x14]; // ff08h
111 UINT64 _R15
; // ff1ch
119 UINT64 _RAX
; // ff5ch
127 UINT64 IOMemAddr
; // ff9ch
128 UINT32 IOMisc
; // ffa4h
135 UINT32 _LDTR
; // ffc0h
137 UINT64 _DR7
; // ffc8h
139 UINT64 _RIP
; // ffd8h
140 UINT64 IA32_EFER
; // ffe0h
141 UINT64 _RFLAGS
; // ffe8h
142 UINT64 _CR3
; // fff0h
143 UINT64 _CR0
; // fff8h
144 } EFI_SMM_CPU_STATE64
;
147 /// Union of CPU save-state strcutures for IA32 and X64.
149 /// This union declaration does not exctly match the Framework SMM CIS 0.91 because the
150 /// union in the Framework SMM CIS 0.91 contains an unnamed union member that causes build
151 /// breaks on many compilers with high warning levels. Instead, the UINT8 Reserved[0x200]
152 /// field has been moved into EFI_SMM_CPU_STATE32. This maintains binary compatibility for
153 /// the layout and also maintains source comaptibility for access of all fields in this
157 EFI_SMM_CPU_STATE32 x86
;
158 EFI_SMM_CPU_STATE64 x64
;
164 /// Provides a programatic means to access SMM save state.
166 struct _EFI_SMM_CPU_SAVE_STATE_PROTOCOL
{
168 /// Reference to a list of save states.
170 EFI_SMM_CPU_STATE
**CpuSaveState
;
173 extern EFI_GUID gEfiSmmCpuSaveStateProtocolGuid
;