]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Include/IndustryStandard/Acpi1_0.h
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / Source / C / Include / IndustryStandard / Acpi1_0.h
1 /** @file
2 ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
3
4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
5
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at:
9 http://opensource.org/licenses/bsd-license.php
10
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.
13
14 File Name: Acpi1_0.h
15
16 **/
17
18 #ifndef _ACPI_1_0_H_
19 #define _ACPI_1_0_H_
20
21 #include "IndustryStandard/Acpi.h"
22
23 //
24 // Ensure proper structure formats
25 //
26 #pragma pack(1)
27 //
28 // ACPI 1.0b table structures
29 //
30 //
31 // Root System Description Pointer Structure
32 //
33 typedef struct {
34 UINT64 Signature;
35 UINT8 Checksum;
36 UINT8 OemId[6];
37 UINT8 Reserved;
38 UINT32 RsdtAddress;
39 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
40
41 //
42 // Root System Description Table
43 // No definition needed as it is a common description table header followed by a
44 // variable number of UINT32 table pointers.
45 //
46 //
47 // RSDT Revision (as defined in ACPI 1.0b spec.)
48 //
49 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
50
51 //
52 // Fixed ACPI Description Table Structure (FADT)
53 //
54 typedef struct {
55 EFI_ACPI_DESCRIPTION_HEADER Header;
56 UINT32 FirmwareCtrl;
57 UINT32 Dsdt;
58 UINT8 IntModel;
59 UINT8 Reserved1;
60 UINT16 SciInt;
61 UINT32 SmiCmd;
62 UINT8 AcpiEnable;
63 UINT8 AcpiDisable;
64 UINT8 S4BiosReq;
65 UINT8 Reserved2;
66 UINT32 Pm1aEvtBlk;
67 UINT32 Pm1bEvtBlk;
68 UINT32 Pm1aCntBlk;
69 UINT32 Pm1bCntBlk;
70 UINT32 Pm2CntBlk;
71 UINT32 PmTmrBlk;
72 UINT32 Gpe0Blk;
73 UINT32 Gpe1Blk;
74 UINT8 Pm1EvtLen;
75 UINT8 Pm1CntLen;
76 UINT8 Pm2CntLen;
77 UINT8 PmTmLen;
78 UINT8 Gpe0BlkLen;
79 UINT8 Gpe1BlkLen;
80 UINT8 Gpe1Base;
81 UINT8 Reserved3;
82 UINT16 PLvl2Lat;
83 UINT16 PLvl3Lat;
84 UINT16 FlushSize;
85 UINT16 FlushStride;
86 UINT8 DutyOffset;
87 UINT8 DutyWidth;
88 UINT8 DayAlrm;
89 UINT8 MonAlrm;
90 UINT8 Century;
91 UINT8 Reserved4;
92 UINT8 Reserved5;
93 UINT8 Reserved6;
94 UINT32 Flags;
95 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
96
97 //
98 // FADT Version (as defined in ACPI 1.0b spec.)
99 //
100 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
101
102 //
103 // Fixed ACPI Description Table Fixed Feature Flags
104 // All other bits are reserved and must be set to 0.
105 //
106 #define EFI_ACPI_1_0_WBINVD (1 << 0)
107 #define EFI_ACPI_1_0_WBINVD_FLUSH (1 << 1)
108 #define EFI_ACPI_1_0_PROC_C1 (1 << 2)
109 #define EFI_ACPI_1_0_P_LVL2_UP (1 << 3)
110 #define EFI_ACPI_1_0_PWR_BUTTON (1 << 4)
111 #define EFI_ACPI_1_0_SLP_BUTTON (1 << 5)
112 #define EFI_ACPI_1_0_FIX_RTC (1 << 6)
113 #define EFI_ACPI_1_0_RTC_S4 (1 << 7)
114 #define EFI_ACPI_1_0_TMR_VAL_EXT (1 << 8)
115 #define EFI_ACPI_1_0_DCK_CAP (1 << 9)
116
117 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x0
118 //
119 // Firmware ACPI Control Structure
120 //
121 typedef struct {
122 UINT32 Signature;
123 UINT32 Length;
124 UINT32 HardwareSignature;
125 UINT32 FirmwareWakingVector;
126 UINT32 GlobalLock;
127 UINT32 Flags;
128 UINT8 Reserved[40];
129 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
130
131 //
132 // Firmware Control Structure Feature Flags
133 // All other bits are reserved and must be set to 0.
134 //
135 #define EFI_ACPI_1_0_S4BIOS_F (1 << 0)
136
137 //
138 // Multiple APIC Description Table header definition. The rest of the table
139 // must be defined in a platform specific manner.
140 //
141 typedef struct {
142 EFI_ACPI_DESCRIPTION_HEADER Header;
143 UINT32 LocalApicAddress;
144 UINT32 Flags;
145 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
146
147 //
148 // MADT Revision (as defined in ACPI 1.0b spec.)
149 //
150 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
151
152 //
153 // Multiple APIC Flags
154 // All other bits are reserved and must be set to 0.
155 //
156 #define EFI_ACPI_1_0_PCAT_COMPAT (1 << 0)
157
158 //
159 // Multiple APIC Description Table APIC structure types
160 // All other values between 0x09 an 0xFF are reserved and
161 // will be ignored by OSPM.
162 //
163 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00
164 #define EFI_ACPI_1_0_IO_APIC 0x01
165 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02
166 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
167 #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04
168
169 //
170 // APIC Structure Definitions
171 //
172 //
173 // Processor Local APIC Structure Definition
174 //
175 typedef struct {
176 UINT8 Type;
177 UINT8 Length;
178 UINT8 AcpiProcessorId;
179 UINT8 ApicId;
180 UINT32 Flags;
181 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
182
183 //
184 // Local APIC Flags. All other bits are reserved and must be 0.
185 //
186 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED (1 << 0)
187
188 //
189 // IO APIC Structure
190 //
191 typedef struct {
192 UINT8 Type;
193 UINT8 Length;
194 UINT8 IoApicId;
195 UINT8 Reserved;
196 UINT32 IoApicAddress;
197 UINT32 SystemVectorBase;
198 } EFI_ACPI_1_0_IO_APIC_STRUCTURE;
199
200 //
201 // Interrupt Source Override Structure
202 //
203 typedef struct {
204 UINT8 Type;
205 UINT8 Length;
206 UINT8 Bus;
207 UINT8 Source;
208 UINT32 GlobalSystemInterruptVector;
209 UINT16 Flags;
210 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
211
212 //
213 // Non-Maskable Interrupt Source Structure
214 //
215 typedef struct {
216 UINT8 Type;
217 UINT8 Length;
218 UINT16 Flags;
219 UINT32 GlobalSystemInterruptVector;
220 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
221
222 //
223 // Local APIC NMI Structure
224 //
225 typedef struct {
226 UINT8 Type;
227 UINT8 Length;
228 UINT8 AcpiProcessorId;
229 UINT16 Flags;
230 UINT8 LocalApicInti;
231 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
232
233 //
234 // Smart Battery Description Table (SBST)
235 //
236 typedef struct {
237 EFI_ACPI_DESCRIPTION_HEADER Header;
238 UINT32 WarningEnergyLevel;
239 UINT32 LowEnergyLevel;
240 UINT32 CriticalEnergyLevel;
241 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
242
243 //
244 // Known table signatures
245 //
246 //
247 // "RSD PTR " Root System Description Pointer
248 //
249 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL
250
251 //
252 // "APIC" Multiple APIC Description Table
253 //
254 #define EFI_ACPI_1_0_APIC_SIGNATURE 0x43495041
255
256 //
257 // "DSDT" Differentiated System Description Table
258 //
259 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
260
261 //
262 // "FACS" Firmware ACPI Control Structure
263 //
264 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
265
266 //
267 // "FACP" Fixed ACPI Description Table
268 //
269 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
270
271 //
272 // "PSDT" Persistent System Description Table
273 //
274 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
275
276 //
277 // "RSDT" Root System Description Table
278 //
279 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
280
281 //
282 // "SBST" Smart Battery Specification Table
283 //
284 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
285
286 //
287 // "SSDT" Secondary System Description Table
288 //
289 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
290
291 #pragma pack()
292
293 #endif