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