diff options
Diffstat (limited to 'include/acpi/actbl.h')
-rw-r--r-- | include/acpi/actbl.h | 78 |
1 files changed, 51 insertions, 27 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 222733d01f36..1b6587952604 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -44,9 +44,23 @@ | |||
44 | #ifndef __ACTBL_H__ | 44 | #ifndef __ACTBL_H__ |
45 | #define __ACTBL_H__ | 45 | #define __ACTBL_H__ |
46 | 46 | ||
47 | /******************************************************************************* | ||
48 | * | ||
49 | * Fundamental ACPI tables | ||
50 | * | ||
51 | * This file contains definitions for the ACPI tables that are directly consumed | ||
52 | * by ACPICA. All other tables are consumed by the OS-dependent ACPI-related | ||
53 | * device drivers and other OS support code. | ||
54 | * | ||
55 | * The RSDP and FACS do not use the common ACPI table header. All other ACPI | ||
56 | * tables use the header. | ||
57 | * | ||
58 | ******************************************************************************/ | ||
59 | |||
47 | /* | 60 | /* |
48 | * Values for description table header signatures. Useful because they make | 61 | * Values for description table header signatures for tables defined in this |
49 | * it more difficult to inadvertently type in the wrong signature. | 62 | * file. Useful because they make it more difficult to inadvertently type in |
63 | * the wrong signature. | ||
50 | */ | 64 | */ |
51 | #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ | 65 | #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ |
52 | #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ | 66 | #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ |
@@ -65,11 +79,6 @@ | |||
65 | #pragma pack(1) | 79 | #pragma pack(1) |
66 | 80 | ||
67 | /* | 81 | /* |
68 | * These are the ACPI tables that are directly consumed by the subsystem. | ||
69 | * | ||
70 | * The RSDP and FACS do not use the common ACPI table header. All other ACPI | ||
71 | * tables use the header. | ||
72 | * | ||
73 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | 82 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
74 | * This is the only type that is even remotely portable. Anything else is not | 83 | * This is the only type that is even remotely portable. Anything else is not |
75 | * portable, so do not use any other bitfield types. | 84 | * portable, so do not use any other bitfield types. |
@@ -77,9 +86,8 @@ | |||
77 | 86 | ||
78 | /******************************************************************************* | 87 | /******************************************************************************* |
79 | * | 88 | * |
80 | * ACPI Table Header. This common header is used by all tables except the | 89 | * Master ACPI Table Header. This common header is used by all ACPI tables |
81 | * RSDP and FACS. The define is used for direct inclusion of header into | 90 | * except the RSDP and FACS. |
82 | * other ACPI tables | ||
83 | * | 91 | * |
84 | ******************************************************************************/ | 92 | ******************************************************************************/ |
85 | 93 | ||
@@ -95,13 +103,16 @@ struct acpi_table_header { | |||
95 | u32 asl_compiler_revision; /* ASL compiler version */ | 103 | u32 asl_compiler_revision; /* ASL compiler version */ |
96 | }; | 104 | }; |
97 | 105 | ||
98 | /* | 106 | /******************************************************************************* |
107 | * | ||
99 | * GAS - Generic Address Structure (ACPI 2.0+) | 108 | * GAS - Generic Address Structure (ACPI 2.0+) |
100 | * | 109 | * |
101 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. | 110 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. |
102 | * If misalignment is not supported, access to the Address field must be | 111 | * If misaliged access is not supported by the hardware, accesses to the |
103 | * performed with care. | 112 | * 64-bit Address field must be performed with care. |
104 | */ | 113 | * |
114 | ******************************************************************************/ | ||
115 | |||
105 | struct acpi_generic_address { | 116 | struct acpi_generic_address { |
106 | u8 space_id; /* Address space where struct or register exists */ | 117 | u8 space_id; /* Address space where struct or register exists */ |
107 | u8 bit_width; /* Size in bits of given register */ | 118 | u8 bit_width; /* Size in bits of given register */ |
@@ -113,6 +124,7 @@ struct acpi_generic_address { | |||
113 | /******************************************************************************* | 124 | /******************************************************************************* |
114 | * | 125 | * |
115 | * RSDP - Root System Description Pointer (Signature is "RSD PTR ") | 126 | * RSDP - Root System Description Pointer (Signature is "RSD PTR ") |
127 | * Version 2 | ||
116 | * | 128 | * |
117 | ******************************************************************************/ | 129 | ******************************************************************************/ |
118 | 130 | ||
@@ -133,6 +145,7 @@ struct acpi_table_rsdp { | |||
133 | /******************************************************************************* | 145 | /******************************************************************************* |
134 | * | 146 | * |
135 | * RSDT/XSDT - Root System Description Tables | 147 | * RSDT/XSDT - Root System Description Tables |
148 | * Version 1 (both) | ||
136 | * | 149 | * |
137 | ******************************************************************************/ | 150 | ******************************************************************************/ |
138 | 151 | ||
@@ -161,21 +174,29 @@ struct acpi_table_facs { | |||
161 | u32 flags; | 174 | u32 flags; |
162 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ | 175 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ |
163 | u8 version; /* Version of this table (ACPI 2.0+) */ | 176 | u8 version; /* Version of this table (ACPI 2.0+) */ |
164 | u8 reserved[31]; /* Reserved, must be zero */ | 177 | u8 reserved[3]; /* Reserved, must be zero */ |
178 | u32 ospm_flags; /* Flags to be set by OSPM (ACPI 4.0) */ | ||
179 | u8 reserved1[24]; /* Reserved, must be zero */ | ||
165 | }; | 180 | }; |
166 | 181 | ||
167 | /* Flag macros */ | 182 | /* Masks for global_lock flag field above */ |
168 | 183 | ||
169 | #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ | 184 | #define ACPI_GLOCK_PENDING (1) /* 00: Pending global lock ownership */ |
185 | #define ACPI_GLOCK_OWNED (1<<1) /* 01: Global lock is owned */ | ||
170 | 186 | ||
171 | /* Global lock flags */ | 187 | /* Masks for Flags field above */ |
172 | 188 | ||
173 | #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ | 189 | #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ |
174 | #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ | 190 | #define ACPI_FACS_64BIT_WAKE (1<<1) /* 01: 64-bit wake vector supported (ACPI 4.0) */ |
191 | |||
192 | /* Masks for ospm_flags field above */ | ||
193 | |||
194 | #define ACPI_FACS_64BIT_ENVIRONMENT (1) /* 00: 64-bit wake environment is required (ACPI 4.0) */ | ||
175 | 195 | ||
176 | /******************************************************************************* | 196 | /******************************************************************************* |
177 | * | 197 | * |
178 | * FADT - Fixed ACPI Description Table (Signature "FACP") | 198 | * FADT - Fixed ACPI Description Table (Signature "FACP") |
199 | * Version 4 | ||
179 | * | 200 | * |
180 | ******************************************************************************/ | 201 | ******************************************************************************/ |
181 | 202 | ||
@@ -236,7 +257,7 @@ struct acpi_table_fadt { | |||
236 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
237 | }; | 258 | }; |
238 | 259 | ||
239 | /* FADT Boot Architecture Flags (boot_flags) */ | 260 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ |
240 | 261 | ||
241 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ | 262 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ |
242 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ | 263 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ |
@@ -246,7 +267,7 @@ struct acpi_table_fadt { | |||
246 | 267 | ||
247 | #define FADT2_REVISION_ID 3 | 268 | #define FADT2_REVISION_ID 3 |
248 | 269 | ||
249 | /* FADT flags */ | 270 | /* Masks for FADT flags */ |
250 | 271 | ||
251 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ | 272 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ |
252 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ | 273 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ |
@@ -269,7 +290,7 @@ struct acpi_table_fadt { | |||
269 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
270 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
271 | 292 | ||
272 | /* FADT Prefered Power Management Profiles */ | 293 | /* Values for preferred_profile (Prefered Power Management Profiles) */ |
273 | 294 | ||
274 | enum acpi_prefered_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
275 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
@@ -287,14 +308,16 @@ enum acpi_prefered_pm_profiles { | |||
287 | 308 | ||
288 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) | 309 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) |
289 | 310 | ||
311 | /* | ||
312 | * Internal table-related structures | ||
313 | */ | ||
290 | union acpi_name_union { | 314 | union acpi_name_union { |
291 | u32 integer; | 315 | u32 integer; |
292 | char ascii[4]; | 316 | char ascii[4]; |
293 | }; | 317 | }; |
294 | 318 | ||
295 | /* | 319 | /* Internal ACPI Table Descriptor. One per ACPI table. */ |
296 | * Internal ACPI Table Descriptor. One per ACPI table | 320 | |
297 | */ | ||
298 | struct acpi_table_desc { | 321 | struct acpi_table_desc { |
299 | acpi_physical_address address; | 322 | acpi_physical_address address; |
300 | struct acpi_table_header *pointer; | 323 | struct acpi_table_header *pointer; |
@@ -304,7 +327,7 @@ struct acpi_table_desc { | |||
304 | u8 flags; | 327 | u8 flags; |
305 | }; | 328 | }; |
306 | 329 | ||
307 | /* Flags for above */ | 330 | /* Masks for Flags field above */ |
308 | 331 | ||
309 | #define ACPI_TABLE_ORIGIN_UNKNOWN (0) | 332 | #define ACPI_TABLE_ORIGIN_UNKNOWN (0) |
310 | #define ACPI_TABLE_ORIGIN_MAPPED (1) | 333 | #define ACPI_TABLE_ORIGIN_MAPPED (1) |
@@ -318,5 +341,6 @@ struct acpi_table_desc { | |||
318 | */ | 341 | */ |
319 | 342 | ||
320 | #include <acpi/actbl1.h> | 343 | #include <acpi/actbl1.h> |
344 | #include <acpi/actbl2.h> | ||
321 | 345 | ||
322 | #endif /* __ACTBL_H__ */ | 346 | #endif /* __ACTBL_H__ */ |