diff options
Diffstat (limited to 'include/acpi/actbl.h')
-rw-r--r-- | include/acpi/actbl.h | 400 |
1 files changed, 227 insertions, 173 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index ed53f842dad4..e1a40135f707 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Name: actbl.h - Table data structures defined in ACPI specification | 3 | * Name: actbl.h - Basic ACPI Table Definitions |
4 | * | 4 | * |
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
@@ -45,66 +45,45 @@ | |||
45 | #define __ACTBL_H__ | 45 | #define __ACTBL_H__ |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | 48 | * Values for description table header signatures. Useful because they make |
49 | * This is the only type that is even remotely portable. Anything else is not | 49 | * it more difficult to inadvertently type in the wrong signature. |
50 | * portable, so do not use any other bitfield types. | ||
51 | */ | ||
52 | |||
53 | /* | ||
54 | * Values for description table header signatures | ||
55 | */ | 50 | */ |
56 | #define RSDP_NAME "RSDP" | ||
57 | #define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ | ||
58 | #define APIC_SIG "APIC" /* Multiple APIC Description Table */ | ||
59 | #define DSDT_SIG "DSDT" /* Differentiated System Description Table */ | 51 | #define DSDT_SIG "DSDT" /* Differentiated System Description Table */ |
60 | #define FADT_SIG "FACP" /* Fixed ACPI Description Table */ | 52 | #define FADT_SIG "FACP" /* Fixed ACPI Description Table */ |
61 | #define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ | 53 | #define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ |
62 | #define PSDT_SIG "PSDT" /* Persistent System Description Table */ | 54 | #define PSDT_SIG "PSDT" /* Persistent System Description Table */ |
55 | #define RSDP_SIG "RSD PTR " /* Root System Description Pointer */ | ||
63 | #define RSDT_SIG "RSDT" /* Root System Description Table */ | 56 | #define RSDT_SIG "RSDT" /* Root System Description Table */ |
64 | #define XSDT_SIG "XSDT" /* Extended System Description Table */ | 57 | #define XSDT_SIG "XSDT" /* Extended System Description Table */ |
65 | #define SSDT_SIG "SSDT" /* Secondary System Description Table */ | 58 | #define SSDT_SIG "SSDT" /* Secondary System Description Table */ |
66 | #define SBST_SIG "SBST" /* Smart Battery Specification Table */ | 59 | #define RSDP_NAME "RSDP" |
67 | #define SPIC_SIG "SPIC" /* IOSAPIC table */ | ||
68 | #define BOOT_SIG "BOOT" /* Boot table */ | ||
69 | |||
70 | #define GL_OWNED 0x02 /* Ownership of global lock is bit 1 */ | ||
71 | 60 | ||
72 | /* | 61 | /* |
73 | * Common table types. The base code can remain | 62 | * All tables and structures must be byte-packed to match the ACPI |
74 | * constant if the underlying tables are changed | 63 | * specification, since the tables are provided by the system BIOS |
75 | */ | 64 | */ |
76 | #define RSDT_DESCRIPTOR struct rsdt_descriptor_rev2 | ||
77 | #define XSDT_DESCRIPTOR struct xsdt_descriptor_rev2 | ||
78 | #define FACS_DESCRIPTOR struct facs_descriptor_rev2 | ||
79 | #define FADT_DESCRIPTOR struct fadt_descriptor_rev2 | ||
80 | |||
81 | #pragma pack(1) | 65 | #pragma pack(1) |
82 | 66 | ||
83 | /* | 67 | /* |
84 | * ACPI Version-independent tables | 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. | ||
85 | * | 72 | * |
86 | * NOTE: The tables that are specific to ACPI versions (1.0, 2.0, etc.) | 73 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
87 | * are in separate files. | 74 | * This is the only type that is even remotely portable. Anything else is not |
75 | * portable, so do not use any other bitfield types. | ||
88 | */ | 76 | */ |
89 | struct rsdp_descriptor { /* Root System Descriptor Pointer */ | ||
90 | char signature[8]; /* ACPI signature, contains "RSD PTR " */ | ||
91 | u8 checksum; /* ACPI 1.0 checksum */ | ||
92 | char oem_id[6]; /* OEM identification */ | ||
93 | u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ | ||
94 | u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ | ||
95 | u32 length; /* XSDT Length in bytes, including header */ | ||
96 | u64 xsdt_physical_address; /* 64-bit physical address of the XSDT */ | ||
97 | u8 extended_checksum; /* Checksum of entire table (ACPI 2.0) */ | ||
98 | char reserved[3]; /* Reserved, must be zero */ | ||
99 | }; | ||
100 | 77 | ||
101 | struct acpi_common_facs { /* Common FACS for internal use */ | 78 | /******************************************************************************* |
102 | u32 *global_lock; | 79 | * |
103 | u64 *firmware_waking_vector; | 80 | * ACPI Table Header. This common header is used by all tables except the |
104 | u8 vector_width; | 81 | * RSDP and FACS. The define is used for direct inclusion of header into |
105 | }; | 82 | * other ACPI tables |
83 | * | ||
84 | ******************************************************************************/ | ||
106 | 85 | ||
107 | #define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \ | 86 | #define ACPI_TABLE_HEADER_DEF \ |
108 | char signature[4]; /* ASCII table signature */\ | 87 | char signature[4]; /* ASCII table signature */\ |
109 | u32 length; /* Length of table in bytes, including this header */\ | 88 | u32 length; /* Length of table in bytes, including this header */\ |
110 | u8 revision; /* ACPI Specification minor version # */\ | 89 | u8 revision; /* ACPI Specification minor version # */\ |
@@ -112,154 +91,239 @@ struct acpi_common_facs { /* Common FACS for internal use */ | |||
112 | char oem_id[6]; /* ASCII OEM identification */\ | 91 | char oem_id[6]; /* ASCII OEM identification */\ |
113 | char oem_table_id[8]; /* ASCII OEM table identification */\ | 92 | char oem_table_id[8]; /* ASCII OEM table identification */\ |
114 | u32 oem_revision; /* OEM revision number */\ | 93 | u32 oem_revision; /* OEM revision number */\ |
115 | char asl_compiler_id [4]; /* ASCII ASL compiler vendor ID */\ | 94 | char asl_compiler_id[4]; /* ASCII ASL compiler vendor ID */\ |
116 | u32 asl_compiler_revision; /* ASL compiler version */ | 95 | u32 asl_compiler_revision; /* ASL compiler version */ |
117 | 96 | ||
118 | struct acpi_table_header { /* ACPI common table header */ | 97 | struct acpi_table_header { |
119 | ACPI_TABLE_HEADER_DEF}; | 98 | ACPI_TABLE_HEADER_DEF}; |
120 | 99 | ||
121 | /* | 100 | /* |
122 | * MADT values and structures | 101 | * GAS - Generic Address Structure (ACPI 2.0+) |
123 | */ | 102 | */ |
103 | struct acpi_generic_address { | ||
104 | u8 address_space_id; /* Address space where struct or register exists */ | ||
105 | u8 register_bit_width; /* Size in bits of given register */ | ||
106 | u8 register_bit_offset; /* Bit offset within the register */ | ||
107 | u8 access_width; /* Minimum Access size (ACPI 3.0) */ | ||
108 | u64 address; /* 64-bit address of struct or register */ | ||
109 | }; | ||
124 | 110 | ||
125 | /* Values for MADT PCATCompat */ | 111 | /******************************************************************************* |
112 | * | ||
113 | * RSDP - Root System Description Pointer (Signature is "RSD PTR ") | ||
114 | * | ||
115 | ******************************************************************************/ | ||
116 | |||
117 | struct rsdp_descriptor { | ||
118 | char signature[8]; /* ACPI signature, contains "RSD PTR " */ | ||
119 | u8 checksum; /* ACPI 1.0 checksum */ | ||
120 | char oem_id[6]; /* OEM identification */ | ||
121 | u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ | ||
122 | u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ | ||
123 | u32 length; /* Table length in bytes, including header (ACPI 2.0+) */ | ||
124 | u64 xsdt_physical_address; /* 64-bit physical address of the XSDT (ACPI 2.0+) */ | ||
125 | u8 extended_checksum; /* Checksum of entire table (ACPI 2.0+) */ | ||
126 | u8 reserved[3]; /* Reserved, must be zero */ | ||
127 | }; | ||
126 | 128 | ||
127 | #define DUAL_PIC 0 | 129 | #define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ |
128 | #define MULTIPLE_APIC 1 | ||
129 | 130 | ||
130 | /* Master MADT */ | 131 | /******************************************************************************* |
132 | * | ||
133 | * RSDT/XSDT - Root System Description Tables | ||
134 | * | ||
135 | ******************************************************************************/ | ||
131 | 136 | ||
132 | struct multiple_apic_table { | 137 | struct rsdt_descriptor { |
133 | ACPI_TABLE_HEADER_DEF /* ACPI common table header */ | 138 | ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ |
134 | u32 local_apic_address; /* Physical address of local APIC */ | 139 | }; |
140 | |||
141 | struct xsdt_descriptor { | ||
142 | ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ | ||
143 | }; | ||
144 | |||
145 | /******************************************************************************* | ||
146 | * | ||
147 | * FACS - Firmware ACPI Control Structure (FACS) | ||
148 | * | ||
149 | ******************************************************************************/ | ||
150 | |||
151 | struct facs_descriptor { | ||
152 | char signature[4]; /* ASCII table signature */ | ||
153 | u32 length; /* Length of structure, in bytes */ | ||
154 | u32 hardware_signature; /* Hardware configuration signature */ | ||
155 | u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */ | ||
156 | u32 global_lock; /* Global Lock for shared hardware resources */ | ||
135 | 157 | ||
136 | /* Flags (32 bits) */ | 158 | /* Flags (32 bits) */ |
137 | 159 | ||
138 | u8 PCATcompat:1; /* 00: System also has dual 8259s */ | 160 | u8 S4bios_f:1; /* 00: S4BIOS support is present */ |
139 | u8:7; /* 01-07: Reserved, must be zero */ | 161 | u8:7; /* 01-07: Reserved, must be zero */ |
140 | u8 reserved1[3]; /* 08-31: Reserved, must be zero */ | 162 | u8 reserved1[3]; /* 08-31: Reserved, must be zero */ |
141 | }; | ||
142 | 163 | ||
143 | /* Values for Type in APIC_HEADER_DEF */ | 164 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ |
165 | u8 version; /* Version of this table (ACPI 2.0+) */ | ||
166 | u8 reserved[31]; /* Reserved, must be zero */ | ||
167 | }; | ||
144 | 168 | ||
145 | #define APIC_PROCESSOR 0 | 169 | #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ |
146 | #define APIC_IO 1 | 170 | #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ |
147 | #define APIC_XRUPT_OVERRIDE 2 | ||
148 | #define APIC_NMI 3 | ||
149 | #define APIC_LOCAL_NMI 4 | ||
150 | #define APIC_ADDRESS_OVERRIDE 5 | ||
151 | #define APIC_IO_SAPIC 6 | ||
152 | #define APIC_LOCAL_SAPIC 7 | ||
153 | #define APIC_XRUPT_SOURCE 8 | ||
154 | #define APIC_RESERVED 9 /* 9 and greater are reserved */ | ||
155 | 171 | ||
156 | /* | 172 | /* |
157 | * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE) | 173 | * Common FACS - This is a version-independent FACS structure used for internal use only |
158 | */ | 174 | */ |
159 | #define APIC_HEADER_DEF /* Common APIC sub-structure header */\ | 175 | struct acpi_common_facs { |
160 | u8 type; \ | 176 | u32 *global_lock; |
161 | u8 length; | 177 | u64 *firmware_waking_vector; |
162 | 178 | u8 vector_width; | |
163 | struct apic_header { | ||
164 | APIC_HEADER_DEF}; | ||
165 | |||
166 | /* Values for MPS INTI flags */ | ||
167 | |||
168 | #define POLARITY_CONFORMS 0 | ||
169 | #define POLARITY_ACTIVE_HIGH 1 | ||
170 | #define POLARITY_RESERVED 2 | ||
171 | #define POLARITY_ACTIVE_LOW 3 | ||
172 | |||
173 | #define TRIGGER_CONFORMS 0 | ||
174 | #define TRIGGER_EDGE 1 | ||
175 | #define TRIGGER_RESERVED 2 | ||
176 | #define TRIGGER_LEVEL 3 | ||
177 | |||
178 | /* Common flag definitions (16 bits each) */ | ||
179 | |||
180 | #define MPS_INTI_FLAGS \ | ||
181 | u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\ | ||
182 | u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\ | ||
183 | u8 : 4; /* 04-07: Reserved, must be zero */\ | ||
184 | u8 reserved1; /* 08-15: Reserved, must be zero */ | ||
185 | |||
186 | #define LOCAL_APIC_FLAGS \ | ||
187 | u8 processor_enabled: 1; /* 00: Processor is usable if set */\ | ||
188 | u8 : 7; /* 01-07: Reserved, must be zero */\ | ||
189 | u8 reserved2; /* 08-15: Reserved, must be zero */ | ||
190 | |||
191 | /* Sub-structures for MADT */ | ||
192 | |||
193 | struct madt_processor_apic { | ||
194 | APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ | ||
195 | u8 local_apic_id; /* Processor's local APIC id */ | ||
196 | LOCAL_APIC_FLAGS}; | ||
197 | |||
198 | struct madt_io_apic { | ||
199 | APIC_HEADER_DEF u8 io_apic_id; /* I/O APIC ID */ | ||
200 | u8 reserved; /* Reserved - must be zero */ | ||
201 | u32 address; /* APIC physical address */ | ||
202 | u32 interrupt; /* Global system interrupt where INTI | ||
203 | * lines start */ | ||
204 | }; | 179 | }; |
205 | 180 | ||
206 | struct madt_interrupt_override { | 181 | /******************************************************************************* |
207 | APIC_HEADER_DEF u8 bus; /* 0 - ISA */ | 182 | * |
208 | u8 source; /* Interrupt source (IRQ) */ | 183 | * FADT - Fixed ACPI Description Table (Signature "FACP") |
209 | u32 interrupt; /* Global system interrupt */ | 184 | * |
210 | MPS_INTI_FLAGS}; | 185 | ******************************************************************************/ |
186 | |||
187 | /* Fields common to all versions of the FADT */ | ||
188 | |||
189 | #define ACPI_FADT_COMMON \ | ||
190 | ACPI_TABLE_HEADER_DEF \ | ||
191 | u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ | ||
192 | u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ | ||
193 | u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ | ||
194 | u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ | ||
195 | u16 sci_int; /* System vector of SCI interrupt */ \ | ||
196 | u32 smi_cmd; /* Port address of SMI command port */ \ | ||
197 | u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \ | ||
198 | u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \ | ||
199 | u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \ | ||
200 | u8 pstate_cnt; /* Processor performance state control*/ \ | ||
201 | u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a Event Reg Blk */ \ | ||
202 | u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b Event Reg Blk */ \ | ||
203 | u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ | ||
204 | u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ | ||
205 | u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ | ||
206 | u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ | ||
207 | u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ | ||
208 | u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ | ||
209 | u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ \ | ||
210 | u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ \ | ||
211 | u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ | ||
212 | u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ | ||
213 | u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ | ||
214 | u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \ | ||
215 | u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \ | ||
216 | u8 cst_cnt; /* Support for the _CST object and C States change notification.*/ \ | ||
217 | u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \ | ||
218 | u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \ | ||
219 | u16 flush_size; /* Processor's memory cache line width, in bytes */ \ | ||
220 | u16 flush_stride; /* Number of flush strides that need to be read */ \ | ||
221 | u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/ \ | ||
222 | u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/ \ | ||
223 | u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \ | ||
224 | u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \ | ||
225 | u8 century; /* Index to century in RTC CMOS RAM */ \ | ||
226 | u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \ | ||
227 | u8 reserved2; /* Reserved, must be zero */ | ||
211 | 228 | ||
212 | struct madt_nmi_source { | 229 | /* |
213 | APIC_HEADER_DEF MPS_INTI_FLAGS u32 interrupt; /* Global system interrupt */ | 230 | * ACPI 2.0+ FADT |
231 | */ | ||
232 | struct fadt_descriptor { | ||
233 | ACPI_FADT_COMMON | ||
234 | /* Flags (32 bits) */ | ||
235 | u8 wb_invd:1; /* 00: The wbinvd instruction works properly */ | ||
236 | u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */ | ||
237 | u8 proc_c1:1; /* 02: All processors support C1 state */ | ||
238 | u8 plvl2_up:1; /* 03: C2 state works on MP system */ | ||
239 | u8 pwr_button:1; /* 04: Power button is handled as a generic feature */ | ||
240 | u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */ | ||
241 | u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */ | ||
242 | u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */ | ||
243 | u8 tmr_val_ext:1; /* 08: tmr_val is 32 bits 0=24-bits */ | ||
244 | u8 dock_cap:1; /* 09: Docking supported */ | ||
245 | u8 reset_reg_sup:1; /* 10: System reset via the FADT RESET_REG supported */ | ||
246 | u8 sealed_case:1; /* 11: No internal expansion capabilities and case is sealed */ | ||
247 | u8 headless:1; /* 12: No local video capabilities or local input devices */ | ||
248 | u8 cpu_sw_sleep:1; /* 13: Must execute native instruction after writing SLP_TYPx register */ | ||
249 | |||
250 | u8 pci_exp_wak:1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ | ||
251 | u8 use_platform_clock:1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ | ||
252 | u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ | ||
253 | u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ | ||
254 | u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ | ||
255 | u8 force_apic_physical_destination_mode:1; /* 19: all local x_aPICs must use physical dest mode (ACPI 3.0) */ | ||
256 | u8:4; /* 20-23: Reserved, must be zero */ | ||
257 | u8 reserved3; /* 24-31: Reserved, must be zero */ | ||
258 | |||
259 | struct acpi_generic_address reset_register; /* Reset register address in GAS format */ | ||
260 | u8 reset_value; /* Value to write to the reset_register port to reset the system */ | ||
261 | u8 reserved4[3]; /* These three bytes must be zero */ | ||
262 | u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ | ||
263 | u64 Xdsdt; /* 64-bit physical address of DSDT */ | ||
264 | struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */ | ||
265 | struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */ | ||
266 | struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */ | ||
267 | struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */ | ||
268 | struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */ | ||
269 | struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ | ||
270 | struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */ | ||
271 | struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */ | ||
214 | }; | 272 | }; |
215 | 273 | ||
216 | struct madt_local_apic_nmi { | 274 | /* |
217 | APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ | 275 | * "Down-revved" ACPI 2.0 FADT descriptor |
218 | MPS_INTI_FLAGS u8 lint; /* LINTn to which NMI is connected */ | 276 | * Defined here to allow compiler to generate the length of the struct |
277 | */ | ||
278 | struct fadt_descriptor_rev2_minus { | ||
279 | ACPI_FADT_COMMON u32 flags; | ||
280 | struct acpi_generic_address reset_register; /* Reset register address in GAS format */ | ||
281 | u8 reset_value; /* Value to write to the reset_register port to reset the system. */ | ||
282 | u8 reserved7[3]; /* Reserved, must be zero */ | ||
219 | }; | 283 | }; |
220 | 284 | ||
221 | struct madt_address_override { | 285 | /* |
222 | APIC_HEADER_DEF u16 reserved; /* Reserved, must be zero */ | 286 | * ACPI 1.0 FADT |
223 | u64 address; /* APIC physical address */ | 287 | * Defined here to allow compiler to generate the length of the struct |
288 | */ | ||
289 | struct fadt_descriptor_rev1 { | ||
290 | ACPI_FADT_COMMON u32 flags; | ||
224 | }; | 291 | }; |
225 | 292 | ||
226 | struct madt_io_sapic { | 293 | /* FADT: Prefered Power Management Profiles */ |
227 | APIC_HEADER_DEF u8 io_sapic_id; /* I/O SAPIC ID */ | ||
228 | u8 reserved; /* Reserved, must be zero */ | ||
229 | u32 interrupt_base; /* Glocal interrupt for SAPIC start */ | ||
230 | u64 address; /* SAPIC physical address */ | ||
231 | }; | ||
232 | 294 | ||
233 | struct madt_local_sapic { | 295 | #define PM_UNSPECIFIED 0 |
234 | APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ | 296 | #define PM_DESKTOP 1 |
235 | u8 local_sapic_id; /* SAPIC ID */ | 297 | #define PM_MOBILE 2 |
236 | u8 local_sapic_eid; /* SAPIC EID */ | 298 | #define PM_WORKSTATION 3 |
237 | u8 reserved[3]; /* Reserved, must be zero */ | 299 | #define PM_ENTERPRISE_SERVER 4 |
238 | LOCAL_APIC_FLAGS u32 processor_uID; /* Numeric UID - ACPI 3.0 */ | 300 | #define PM_SOHO_SERVER 5 |
239 | char processor_uIDstring[1]; /* String UID - ACPI 3.0 */ | 301 | #define PM_APPLIANCE_PC 6 |
240 | }; | ||
241 | 302 | ||
242 | struct madt_interrupt_source { | 303 | /* FADT: Boot Arch Flags */ |
243 | APIC_HEADER_DEF MPS_INTI_FLAGS u8 interrupt_type; /* 1=PMI, 2=INIT, 3=corrected */ | ||
244 | u8 processor_id; /* Processor ID */ | ||
245 | u8 processor_eid; /* Processor EID */ | ||
246 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ | ||
247 | u32 interrupt; /* Global system interrupt */ | ||
248 | u32 flags; /* Interrupt Source Flags */ | ||
249 | }; | ||
250 | 304 | ||
251 | /* | 305 | #define BAF_LEGACY_DEVICES 0x0001 |
252 | * Smart Battery | 306 | #define BAF_8042_KEYBOARD_CONTROLLER 0x0002 |
253 | */ | 307 | |
254 | struct smart_battery_table { | 308 | #define FADT2_REVISION_ID 3 |
255 | ACPI_TABLE_HEADER_DEF u32 warning_level; | 309 | #define FADT2_MINUS_REVISION_ID 2 |
256 | u32 low_level; | 310 | |
257 | u32 critical_level; | 311 | /* Reset to default packing */ |
258 | }; | ||
259 | 312 | ||
260 | #pragma pack() | 313 | #pragma pack() |
261 | 314 | ||
262 | /* | 315 | /* |
316 | * This macro is temporary until the table bitfield flag definitions | ||
317 | * are removed and replaced by a Flags field. | ||
318 | */ | ||
319 | #define ACPI_FLAG_OFFSET(d,f,o) (u8) (ACPI_OFFSET (d,f) + \ | ||
320 | sizeof(((d *)0)->f) + o) | ||
321 | /* | ||
322 | * Get the remaining ACPI tables | ||
323 | */ | ||
324 | #include "actbl1.h" | ||
325 | |||
326 | /* | ||
263 | * ACPI Table information. We save the table address, length, | 327 | * ACPI Table information. We save the table address, length, |
264 | * and type of memory allocation (mapped or allocated) for each | 328 | * and type of memory allocation (mapped or allocated) for each |
265 | * table for 1) when we exit, and 2) if a new table is installed | 329 | * table for 1) when we exit, and 2) if a new table is installed |
@@ -290,27 +354,17 @@ struct acpi_table_support { | |||
290 | u8 flags; | 354 | u8 flags; |
291 | }; | 355 | }; |
292 | 356 | ||
293 | /* | ||
294 | * Get the ACPI version-specific tables | ||
295 | */ | ||
296 | #include "actbl1.h" /* Acpi 1.0 table definitions */ | ||
297 | #include "actbl2.h" /* Acpi 2.0 table definitions */ | ||
298 | |||
299 | extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1, | 357 | extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1, |
300 | * needed for certain workarounds */ | 358 | * needed for certain workarounds */ |
359 | /* Macros used to generate offsets to specific table fields */ | ||
301 | 360 | ||
302 | #pragma pack(1) | 361 | #define ACPI_FACS_OFFSET(f) (u8) ACPI_OFFSET (struct facs_descriptor,f) |
303 | /* | 362 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct fadt_descriptor, f) |
304 | * High performance timer | 363 | #define ACPI_GAS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_generic_address,f) |
305 | */ | 364 | #define ACPI_HDR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_header,f) |
306 | struct hpet_table { | 365 | #define ACPI_RSDP_OFFSET(f) (u8) ACPI_OFFSET (struct rsdp_descriptor,f) |
307 | ACPI_TABLE_HEADER_DEF u32 hardware_id; | ||
308 | struct acpi_generic_address base_address; | ||
309 | u8 hpet_number; | ||
310 | u16 clock_tick; | ||
311 | u8 attributes; | ||
312 | }; | ||
313 | 366 | ||
314 | #pragma pack() | 367 | #define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct fadt_descriptor,f,o) |
368 | #define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct facs_descriptor,f,o) | ||
315 | 369 | ||
316 | #endif /* __ACTBL_H__ */ | 370 | #endif /* __ACTBL_H__ */ |