]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Include/Guid/AcpiVariable.h
6df9ddb100cf747d5d46316ae63ef17ad00f1d23
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Guid / AcpiVariable.h
1 /** @file
2 Provides the data format and Name and GUID definition for the EFI Variable ACPI_VARIABLE_SET and the Framework version's correponding
3 EFI Variable.
4 This variable is the persistent data that will be saved to NV EFI Variable. It is the central repository
5 for configuration data saved by the CPU Driver, Platform SMM Handler. It is read by
6 Platform PEIM and PEIM on S3 boot path to restore the system configuration.
7
8 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
9
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions
12 of the BSD License which accompanies this distribution. The
13 full text of the license may be found at
14 http://opensource.org/licenses/bsd-license.php
15
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18
19 **/
20
21 #ifndef _ACPI_VARIABLE_H_
22 #define _ACPI_VARIABLE_H_
23
24 #define EFI_ACPI_VARIABLE_GUID \
25 { \
26 0xaf9ffd67, 0xec10, 0x488a, {0x9d, 0xfc, 0x6c, 0xbf, 0x5e, 0xe2, 0x2c, 0x2e } \
27 }
28
29 #define ACPI_GLOBAL_VARIABLE L"AcpiGlobalVariable"
30
31 #define EFI_ACPI_VARIABLE_COMPATIBILITY_GUID \
32 { \
33 0xc020489e, 0x6db2, 0x4ef2, {0x9a, 0xa5, 0xca, 0x6, 0xfc, 0x11, 0xd3, 0x6a } \
34 }
35 //
36 // The following structure boosts performance by combining all ACPI related variables into one.
37 //
38 #pragma pack(1)
39 typedef struct {
40 UINT16 Limit;
41 UINTN Base;
42 } PSEUDO_DESCRIPTOR;
43 #pragma pack()
44
45 typedef struct {
46 BOOLEAN APState;
47 BOOLEAN S3BootPath;
48 EFI_PHYSICAL_ADDRESS WakeUpBuffer;
49 EFI_PHYSICAL_ADDRESS GdtrProfile;
50 EFI_PHYSICAL_ADDRESS IdtrProfile;
51 EFI_PHYSICAL_ADDRESS CpuPrivateData;
52 EFI_PHYSICAL_ADDRESS StackAddress;
53 EFI_PHYSICAL_ADDRESS MicrocodePointerBuffer;
54 EFI_PHYSICAL_ADDRESS SmramBase;
55 EFI_PHYSICAL_ADDRESS SmmStartImageBase;
56 UINT32 SmmStartImageSize;
57 UINT32 NumberOfCpus;
58 } ACPI_CPU_DATA_COMPATIBILITY;
59
60 typedef struct {
61 //
62 // Acpi Related variables
63 //
64 EFI_PHYSICAL_ADDRESS AcpiReservedMemoryBase;
65 UINT32 AcpiReservedMemorySize;
66 EFI_PHYSICAL_ADDRESS S3ReservedLowMemoryBase;
67 EFI_PHYSICAL_ADDRESS AcpiBootScriptTable;
68 EFI_PHYSICAL_ADDRESS RuntimeScriptTableBase;
69 EFI_PHYSICAL_ADDRESS AcpiFacsTable;
70 UINT64 SystemMemoryLength;
71 ACPI_CPU_DATA_COMPATIBILITY AcpiCpuData;
72 //
73 // VGA OPROM to support Video Re-POST for Linux S3
74 //
75 EFI_PHYSICAL_ADDRESS VideoOpromAddress;
76 UINT32 VideoOpromSize;
77
78 //
79 // S3 Debug extension
80 //
81 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
82 EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint;
83 } ACPI_VARIABLE_SET_COMPATIBILITY;
84
85 typedef struct {
86 BOOLEAN APState;
87 EFI_PHYSICAL_ADDRESS StartupVector;
88 EFI_PHYSICAL_ADDRESS GdtrProfile;
89 EFI_PHYSICAL_ADDRESS IdtrProfile;
90 EFI_PHYSICAL_ADDRESS StackAddress;
91 UINT32 StackSize;
92 UINT32 NumberOfCpus;
93 EFI_PHYSICAL_ADDRESS MtrrTable;
94 EFI_PHYSICAL_ADDRESS RegisterTable;
95 EFI_PHYSICAL_ADDRESS Microcode;
96 } ACPI_CPU_DATA;
97
98 typedef struct {
99 //
100 // Acpi Related variables
101 //
102 EFI_PHYSICAL_ADDRESS AcpiReservedMemoryBase;
103 UINT32 AcpiReservedMemorySize;
104 EFI_PHYSICAL_ADDRESS S3ReservedLowMemoryBase;
105 EFI_PHYSICAL_ADDRESS AcpiFacsTable;
106 UINT64 SystemMemoryLength;
107 ACPI_CPU_DATA AcpiCpuData;
108
109 //
110 // VGA OPROM to support Video Re-POST for Linux S3
111 //
112 EFI_PHYSICAL_ADDRESS VideoOpromAddress;
113 UINT32 VideoOpromSize;
114 EFI_PHYSICAL_ADDRESS S3PostVideoStatusRestoreEntryPoint;
115
116 EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;
117 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
118 } ACPI_VARIABLE_SET;
119
120 #define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')
121 #define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')
122
123 typedef struct {
124 UINT64 Signature;
125 EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;
126 EFI_PHYSICAL_ADDRESS SmmS3StackBase;
127 UINT64 SmmS3StackSize;
128 UINT64 SmmS3Cr0;
129 UINT64 SmmS3Cr3;
130 UINT64 SmmS3Cr4;
131 UINT16 ReturnCs;
132 EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
133 EFI_PHYSICAL_ADDRESS ReturnContext1;
134 EFI_PHYSICAL_ADDRESS ReturnContext2;
135 EFI_PHYSICAL_ADDRESS ReturnStackPointer;
136 EFI_PHYSICAL_ADDRESS Smst;
137 } SMM_S3_RESUME_STATE;
138
139
140 typedef struct {
141 EFI_PHYSICAL_ADDRESS AcpiFacsTable;
142 EFI_PHYSICAL_ADDRESS IdtrProfile;
143 EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;
144 EFI_PHYSICAL_ADDRESS BootScriptStackBase;
145 UINT64 BootScriptStackSize;
146 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress;
147 } ACPI_S3_CONTEXT;
148
149 typedef struct {
150 UINT16 ReturnCs;
151 EFI_PHYSICAL_ADDRESS ReturnEntryPoint;
152 EFI_PHYSICAL_ADDRESS ReturnStackPointer;
153 EFI_PHYSICAL_ADDRESS AsmTransferControl;
154 PSEUDO_DESCRIPTOR Idtr;
155 } PEI_S3_RESUME_STATE;
156
157 #define EFI_ACPI_S3_CONTEXT_GUID \
158 { \
159 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \
160 }
161
162 extern EFI_GUID gEfiAcpiS3ContextGuid;
163
164 extern EFI_GUID gEfiAcpiVariableGuid;
165 extern EFI_GUID gEfiAcpiVariableCompatiblityGuid;
166
167 #endif