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