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