diff options
Diffstat (limited to 'include/acpi/actbl.h')
-rw-r--r-- | include/acpi/actbl.h | 328 |
1 files changed, 126 insertions, 202 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index b125ceed9cb7..b455f540a165 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -48,15 +48,15 @@ | |||
48 | * Values for description table header signatures. Useful because they make | 48 | * Values for description table header signatures. Useful because they make |
49 | * it more difficult to inadvertently type in the wrong signature. | 49 | * it more difficult to inadvertently type in the wrong signature. |
50 | */ | 50 | */ |
51 | #define DSDT_SIG "DSDT" /* Differentiated System Description Table */ | 51 | #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ |
52 | #define FADT_SIG "FACP" /* Fixed ACPI Description Table */ | 52 | #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ |
53 | #define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ | 53 | #define ACPI_SIG_FACS "FACS" /* Firmware ACPI Control Structure */ |
54 | #define PSDT_SIG "PSDT" /* Persistent System Description Table */ | 54 | #define ACPI_SIG_PSDT "PSDT" /* Persistent System Description Table */ |
55 | #define RSDP_SIG "RSD PTR " /* Root System Description Pointer */ | 55 | #define ACPI_SIG_RSDP "RSD PTR " /* Root System Description Pointer */ |
56 | #define RSDT_SIG "RSDT" /* Root System Description Table */ | 56 | #define ACPI_SIG_RSDT "RSDT" /* Root System Description Table */ |
57 | #define XSDT_SIG "XSDT" /* Extended System Description Table */ | 57 | #define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */ |
58 | #define SSDT_SIG "SSDT" /* Secondary System Description Table */ | 58 | #define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */ |
59 | #define RSDP_NAME "RSDP" | 59 | #define ACPI_RSDP_NAME "RSDP" |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * All tables and structures must be byte-packed to match the ACPI | 62 | * All tables and structures must be byte-packed to match the ACPI |
@@ -83,27 +83,29 @@ | |||
83 | * | 83 | * |
84 | ******************************************************************************/ | 84 | ******************************************************************************/ |
85 | 85 | ||
86 | #define ACPI_TABLE_HEADER_DEF \ | ||
87 | char signature[4]; /* ASCII table signature */\ | ||
88 | u32 length; /* Length of table in bytes, including this header */\ | ||
89 | u8 revision; /* ACPI Specification minor version # */\ | ||
90 | u8 checksum; /* To make sum of entire table == 0 */\ | ||
91 | char oem_id[6]; /* ASCII OEM identification */\ | ||
92 | char oem_table_id[8]; /* ASCII OEM table identification */\ | ||
93 | u32 oem_revision; /* OEM revision number */\ | ||
94 | char asl_compiler_id[4]; /* ASCII ASL compiler vendor ID */\ | ||
95 | u32 asl_compiler_revision; /* ASL compiler version */ | ||
96 | |||
97 | struct acpi_table_header { | 86 | struct acpi_table_header { |
98 | ACPI_TABLE_HEADER_DEF}; | 87 | char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ |
88 | u32 length; /* Length of table in bytes, including this header */ | ||
89 | u8 revision; /* ACPI Specification minor version # */ | ||
90 | u8 checksum; /* To make sum of entire table == 0 */ | ||
91 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ | ||
92 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ | ||
93 | u32 oem_revision; /* OEM revision number */ | ||
94 | char asl_compiler_id[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ | ||
95 | u32 asl_compiler_revision; /* ASL compiler version */ | ||
96 | }; | ||
99 | 97 | ||
100 | /* | 98 | /* |
101 | * GAS - Generic Address Structure (ACPI 2.0+) | 99 | * GAS - Generic Address Structure (ACPI 2.0+) |
100 | * | ||
101 | * 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 | ||
103 | * performed with care. | ||
102 | */ | 104 | */ |
103 | struct acpi_generic_address { | 105 | struct acpi_generic_address { |
104 | u8 address_space_id; /* Address space where struct or register exists */ | 106 | u8 space_id; /* Address space where struct or register exists */ |
105 | u8 register_bit_width; /* Size in bits of given register */ | 107 | u8 bit_width; /* Size in bits of given register */ |
106 | u8 register_bit_offset; /* Bit offset within the register */ | 108 | u8 bit_offset; /* Bit offset within the register */ |
107 | u8 access_width; /* Minimum Access size (ACPI 3.0) */ | 109 | u8 access_width; /* Minimum Access size (ACPI 3.0) */ |
108 | u64 address; /* 64-bit address of struct or register */ | 110 | u64 address; /* 64-bit address of struct or register */ |
109 | }; | 111 | }; |
@@ -114,10 +116,10 @@ struct acpi_generic_address { | |||
114 | * | 116 | * |
115 | ******************************************************************************/ | 117 | ******************************************************************************/ |
116 | 118 | ||
117 | struct rsdp_descriptor { | 119 | struct acpi_table_rsdp { |
118 | char signature[8]; /* ACPI signature, contains "RSD PTR " */ | 120 | char signature[8]; /* ACPI signature, contains "RSD PTR " */ |
119 | u8 checksum; /* ACPI 1.0 checksum */ | 121 | u8 checksum; /* ACPI 1.0 checksum */ |
120 | char oem_id[6]; /* OEM identification */ | 122 | char oem_id[ACPI_OEM_ID_SIZE]; /* OEM identification */ |
121 | u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ | 123 | 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 */ | 124 | u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ |
123 | u32 length; /* Table length in bytes, including header (ACPI 2.0+) */ | 125 | u32 length; /* Table length in bytes, including header (ACPI 2.0+) */ |
@@ -134,12 +136,14 @@ struct rsdp_descriptor { | |||
134 | * | 136 | * |
135 | ******************************************************************************/ | 137 | ******************************************************************************/ |
136 | 138 | ||
137 | struct rsdt_descriptor { | 139 | struct acpi_table_rsdt { |
138 | ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ | 140 | struct acpi_table_header header; /* Common ACPI table header */ |
141 | u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ | ||
139 | }; | 142 | }; |
140 | 143 | ||
141 | struct xsdt_descriptor { | 144 | struct acpi_table_xsdt { |
142 | ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ | 145 | struct acpi_table_header header; /* Common ACPI table header */ |
146 | u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ | ||
143 | }; | 147 | }; |
144 | 148 | ||
145 | /******************************************************************************* | 149 | /******************************************************************************* |
@@ -148,36 +152,27 @@ struct xsdt_descriptor { | |||
148 | * | 152 | * |
149 | ******************************************************************************/ | 153 | ******************************************************************************/ |
150 | 154 | ||
151 | struct facs_descriptor { | 155 | struct acpi_table_facs { |
152 | char signature[4]; /* ASCII table signature */ | 156 | char signature[4]; /* ASCII table signature */ |
153 | u32 length; /* Length of structure, in bytes */ | 157 | u32 length; /* Length of structure, in bytes */ |
154 | u32 hardware_signature; /* Hardware configuration signature */ | 158 | u32 hardware_signature; /* Hardware configuration signature */ |
155 | u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */ | 159 | u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */ |
156 | u32 global_lock; /* Global Lock for shared hardware resources */ | 160 | u32 global_lock; /* Global Lock for shared hardware resources */ |
157 | 161 | u32 flags; | |
158 | /* Flags (32 bits) */ | ||
159 | |||
160 | u8 S4bios_f:1; /* 00: S4BIOS support is present */ | ||
161 | u8:7; /* 01-07: Reserved, must be zero */ | ||
162 | u8 reserved1[3]; /* 08-31: Reserved, must be zero */ | ||
163 | |||
164 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ | 162 | 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+) */ | 163 | u8 version; /* Version of this table (ACPI 2.0+) */ |
166 | u8 reserved[31]; /* Reserved, must be zero */ | 164 | u8 reserved[31]; /* Reserved, must be zero */ |
167 | }; | 165 | }; |
168 | 166 | ||
167 | /* Flag macros */ | ||
168 | |||
169 | #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ | ||
170 | |||
171 | /* Global lock flags */ | ||
172 | |||
169 | #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ | 173 | #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ |
170 | #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ | 174 | #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ |
171 | 175 | ||
172 | /* | ||
173 | * Common FACS - This is a version-independent FACS structure used for internal use only | ||
174 | */ | ||
175 | struct acpi_common_facs { | ||
176 | u32 *global_lock; | ||
177 | u64 *firmware_waking_vector; | ||
178 | u8 vector_width; | ||
179 | }; | ||
180 | |||
181 | /******************************************************************************* | 176 | /******************************************************************************* |
182 | * | 177 | * |
183 | * FADT - Fixed ACPI Description Table (Signature "FACP") | 178 | * FADT - Fixed ACPI Description Table (Signature "FACP") |
@@ -186,121 +181,98 @@ struct acpi_common_facs { | |||
186 | 181 | ||
187 | /* Fields common to all versions of the FADT */ | 182 | /* Fields common to all versions of the FADT */ |
188 | 183 | ||
189 | #define ACPI_FADT_COMMON \ | 184 | struct acpi_table_fadt { |
190 | ACPI_TABLE_HEADER_DEF \ | 185 | struct acpi_table_header header; /* Common ACPI table header */ |
191 | u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ | 186 | u32 facs; /* 32-bit physical address of FACS */ |
192 | u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ | 187 | u32 dsdt; /* 32-bit physical address of DSDT */ |
193 | u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ | 188 | u8 model; /* System Interrupt Model (ACPI 1.0) not used in ACPI 2.0+ */ |
194 | u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ | 189 | u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */ |
195 | u16 sci_int; /* System vector of SCI interrupt */ \ | 190 | u16 sci_interrupt; /* System vector of SCI interrupt */ |
196 | u32 smi_cmd; /* Port address of SMI command port */ \ | 191 | u32 smi_command; /* Port address of SMI command port */ |
197 | u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \ | 192 | 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 */ \ | 193 | 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 */ \ | 194 | u8 S4bios_request; /* Value to write to SMI CMD to enter S4BIOS state */ |
200 | u8 pstate_cnt; /* Processor performance state control*/ \ | 195 | u8 pstate_control; /* Processor performance state control */ |
201 | u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a Event Reg Blk */ \ | 196 | u32 pm1a_event_block; /* Port address of Power Mgt 1a Event Reg Blk */ |
202 | u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b Event Reg Blk */ \ | 197 | u32 pm1b_event_block; /* Port address of Power Mgt 1b Event Reg Blk */ |
203 | u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ | 198 | u32 pm1a_control_block; /* Port address of Power Mgt 1a Control Reg Blk */ |
204 | u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ | 199 | u32 pm1b_control_block; /* Port address of Power Mgt 1b Control Reg Blk */ |
205 | u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ | 200 | u32 pm2_control_block; /* Port address of Power Mgt 2 Control Reg Blk */ |
206 | u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ | 201 | u32 pm_timer_block; /* Port address of Power Mgt Timer Ctrl Reg Blk */ |
207 | u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ | 202 | u32 gpe0_block; /* 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 */ \ | 203 | u32 gpe1_block; /* Port addr of General Purpose acpi_event 1 Reg Blk */ |
209 | u8 pm1_evt_len; /* Byte Length of ports at pm1_x_evt_blk */ \ | 204 | u8 pm1_event_length; /* Byte Length of ports at pm1_x_evt_blk */ |
210 | u8 pm1_cnt_len; /* Byte Length of ports at pm1_x_cnt_blk */ \ | 205 | u8 pm1_control_length; /* Byte Length of ports at pm1_x_cnt_blk */ |
211 | u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ | 206 | u8 pm2_control_length; /* Byte Length of ports at pm2_cnt_blk */ |
212 | u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ | 207 | u8 pm_timer_length; /* Byte Length of ports at pm_tmr_blk */ |
213 | u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ | 208 | u8 gpe0_block_length; /* Byte Length of ports at gpe0_blk */ |
214 | u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \ | 209 | u8 gpe1_block_length; /* Byte Length of ports at gpe1_blk */ |
215 | u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \ | 210 | 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.*/ \ | 211 | u8 cst_control; /* Support for the _CST object and C States change notification. */ |
217 | u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \ | 212 | u16 C2latency; /* Worst case HW latency to enter/exit C2 state */ |
218 | u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \ | 213 | u16 C3latency; /* Worst case HW latency to enter/exit C3 state */ |
219 | u16 flush_size; /* Processor's memory cache line width, in bytes */ \ | 214 | u16 flush_size; /* Processor's memory cache line width, in bytes */ |
220 | u16 flush_stride; /* Number of flush strides that need to be read */ \ | 215 | 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*/ \ | 216 | 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.*/ \ | 217 | 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 */ \ | 218 | u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ |
224 | u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \ | 219 | u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ |
225 | u8 century; /* Index to century in RTC CMOS RAM */ \ | 220 | 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*/ \ | 221 | u16 boot_flags; /* IA-PC Boot Architecture Flags. See Table 5-10 for description */ |
227 | u8 reserved2; /* Reserved, must be zero */ | 222 | u8 reserved; /* Reserved, must be zero */ |
228 | 223 | u32 flags; /* Miscellaneous flag bits */ | |
229 | /* | ||
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 */ | 224 | 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 */ | 225 | 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 */ | 226 | u8 reserved4[3]; /* These three bytes must be zero */ |
262 | u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ | 227 | u64 Xfacs; /* 64-bit physical address of FACS */ |
263 | u64 Xdsdt; /* 64-bit physical address of DSDT */ | 228 | 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 */ | 229 | struct acpi_generic_address xpm1a_event_block; /* 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 */ | 230 | struct acpi_generic_address xpm1b_event_block; /* 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 */ | 231 | struct acpi_generic_address xpm1a_control_block; /* Extended Power Mgt 1a Control Reg Blk address */ |
267 | struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */ | 232 | struct acpi_generic_address xpm1b_control_block; /* Extended Power Mgt 1b Control Reg Blk address */ |
268 | struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */ | 233 | struct acpi_generic_address xpm2_control_block; /* Extended Power Mgt 2 Control Reg Blk address */ |
269 | struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ | 234 | struct acpi_generic_address xpm_timer_block; /* Extended Power Mgt Timer Ctrl Reg Blk address */ |
270 | struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */ | 235 | struct acpi_generic_address xgpe0_block; /* 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 */ | 236 | struct acpi_generic_address xgpe1_block; /* Extended General Purpose acpi_event 1 Reg Blk address */ |
272 | }; | 237 | }; |
273 | 238 | ||
274 | /* | 239 | /* FADT flags */ |
275 | * "Down-revved" ACPI 2.0 FADT descriptor | 240 | |
276 | * Defined here to allow compiler to generate the length of the struct | 241 | #define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */ |
277 | */ | 242 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: The wbinvd flushes but does not invalidate */ |
278 | struct fadt_descriptor_rev2_minus { | 243 | #define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: All processors support C1 state */ |
279 | ACPI_FADT_COMMON u32 flags; | 244 | #define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: C2 state works on MP system */ |
280 | struct acpi_generic_address reset_register; /* Reset register address in GAS format */ | 245 | #define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */ |
281 | u8 reset_value; /* Value to write to the reset_register port to reset the system. */ | 246 | #define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */ |
282 | u8 reserved7[3]; /* Reserved, must be zero */ | 247 | #define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */ |
283 | }; | 248 | #define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup stat not possible from S4 */ |
249 | #define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */ | ||
250 | #define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */ | ||
251 | #define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */ | ||
252 | #define ACPI_FADT_SEALED_CASE (1<<11) /* 11: No internal expansion capabilities and case is sealed */ | ||
253 | #define ACPI_FADT_HEADLESS (1<<12) /* 12: No local video capabilities or local input devices */ | ||
254 | #define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: Must execute native instruction after writing SLP_TYPx register */ | ||
255 | #define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ | ||
256 | #define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ | ||
257 | #define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ | ||
258 | #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: System is compatible with remote power on (ACPI 3.0) */ | ||
259 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: All local APICs must use cluster model (ACPI 3.0) */ | ||
260 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */ | ||
284 | 261 | ||
285 | /* | 262 | /* |
286 | * ACPI 1.0 FADT | 263 | * FADT Prefered Power Management Profiles |
287 | * Defined here to allow compiler to generate the length of the struct | ||
288 | */ | 264 | */ |
289 | struct fadt_descriptor_rev1 { | 265 | enum acpi_prefered_pm_profiles { |
290 | ACPI_FADT_COMMON u32 flags; | 266 | PM_UNSPECIFIED = 0, |
267 | PM_DESKTOP = 1, | ||
268 | PM_MOBILE = 2, | ||
269 | PM_WORKSTATION = 3, | ||
270 | PM_ENTERPRISE_SERVER = 4, | ||
271 | PM_SOHO_SERVER = 5, | ||
272 | PM_APPLIANCE_PC = 6 | ||
291 | }; | 273 | }; |
292 | 274 | ||
293 | /* FADT: Prefered Power Management Profiles */ | 275 | /* FADT Boot Arch Flags */ |
294 | |||
295 | #define PM_UNSPECIFIED 0 | ||
296 | #define PM_DESKTOP 1 | ||
297 | #define PM_MOBILE 2 | ||
298 | #define PM_WORKSTATION 3 | ||
299 | #define PM_ENTERPRISE_SERVER 4 | ||
300 | #define PM_SOHO_SERVER 5 | ||
301 | #define PM_APPLIANCE_PC 6 | ||
302 | |||
303 | /* FADT: Boot Arch Flags */ | ||
304 | 276 | ||
305 | #define BAF_LEGACY_DEVICES 0x0001 | 277 | #define BAF_LEGACY_DEVICES 0x0001 |
306 | #define BAF_8042_KEYBOARD_CONTROLLER 0x0002 | 278 | #define BAF_8042_KEYBOARD_CONTROLLER 0x0002 |
@@ -312,59 +284,11 @@ struct fadt_descriptor_rev1 { | |||
312 | 284 | ||
313 | #pragma pack() | 285 | #pragma pack() |
314 | 286 | ||
315 | /* | 287 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) |
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 | 288 | ||
326 | /* | 289 | /* |
327 | * ACPI Table information. We save the table address, length, | 290 | * Get the remaining ACPI tables |
328 | * and type of memory allocation (mapped or allocated) for each | ||
329 | * table for 1) when we exit, and 2) if a new table is installed | ||
330 | */ | 291 | */ |
331 | #define ACPI_MEM_NOT_ALLOCATED 0 | 292 | #include <acpi/actbl1.h> |
332 | #define ACPI_MEM_ALLOCATED 1 | ||
333 | #define ACPI_MEM_MAPPED 2 | ||
334 | |||
335 | /* Definitions for the Flags bitfield member of struct acpi_table_support */ | ||
336 | |||
337 | #define ACPI_TABLE_SINGLE 0x00 | ||
338 | #define ACPI_TABLE_MULTIPLE 0x01 | ||
339 | #define ACPI_TABLE_EXECUTABLE 0x02 | ||
340 | |||
341 | #define ACPI_TABLE_ROOT 0x00 | ||
342 | #define ACPI_TABLE_PRIMARY 0x10 | ||
343 | #define ACPI_TABLE_SECONDARY 0x20 | ||
344 | #define ACPI_TABLE_ALL 0x30 | ||
345 | #define ACPI_TABLE_TYPE_MASK 0x30 | ||
346 | |||
347 | /* Data about each known table type */ | ||
348 | |||
349 | struct acpi_table_support { | ||
350 | char *name; | ||
351 | char *signature; | ||
352 | void **global_ptr; | ||
353 | u8 sig_length; | ||
354 | u8 flags; | ||
355 | }; | ||
356 | |||
357 | extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1, | ||
358 | * needed for certain workarounds */ | ||
359 | /* Macros used to generate offsets to specific table fields */ | ||
360 | |||
361 | #define ACPI_FACS_OFFSET(f) (u8) ACPI_OFFSET (struct facs_descriptor,f) | ||
362 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct fadt_descriptor, f) | ||
363 | #define ACPI_GAS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_generic_address,f) | ||
364 | #define ACPI_HDR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_header,f) | ||
365 | #define ACPI_RSDP_OFFSET(f) (u8) ACPI_OFFSET (struct rsdp_descriptor,f) | ||
366 | |||
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) | ||
369 | 293 | ||
370 | #endif /* __ACTBL_H__ */ | 294 | #endif /* __ACTBL_H__ */ |