11da177e4SLinus Torvalds /****************************************************************************** 21da177e4SLinus Torvalds * 3*793c2388SBob Moore * Name: actbl.h - Basic ACPI Table Definitions 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds *****************************************************************************/ 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds /* 84a90c7e8SBob Moore * Copyright (C) 2000 - 2006, R. Byron Moore 91da177e4SLinus Torvalds * All rights reserved. 101da177e4SLinus Torvalds * 111da177e4SLinus Torvalds * Redistribution and use in source and binary forms, with or without 121da177e4SLinus Torvalds * modification, are permitted provided that the following conditions 131da177e4SLinus Torvalds * are met: 141da177e4SLinus Torvalds * 1. Redistributions of source code must retain the above copyright 151da177e4SLinus Torvalds * notice, this list of conditions, and the following disclaimer, 161da177e4SLinus Torvalds * without modification. 171da177e4SLinus Torvalds * 2. Redistributions in binary form must reproduce at minimum a disclaimer 181da177e4SLinus Torvalds * substantially similar to the "NO WARRANTY" disclaimer below 191da177e4SLinus Torvalds * ("Disclaimer") and any redistribution must be conditioned upon 201da177e4SLinus Torvalds * including a substantially similar Disclaimer requirement for further 211da177e4SLinus Torvalds * binary redistribution. 221da177e4SLinus Torvalds * 3. Neither the names of the above-listed copyright holders nor the names 231da177e4SLinus Torvalds * of any contributors may be used to endorse or promote products derived 241da177e4SLinus Torvalds * from this software without specific prior written permission. 251da177e4SLinus Torvalds * 261da177e4SLinus Torvalds * Alternatively, this software may be distributed under the terms of the 271da177e4SLinus Torvalds * GNU General Public License ("GPL") version 2 as published by the Free 281da177e4SLinus Torvalds * Software Foundation. 291da177e4SLinus Torvalds * 301da177e4SLinus Torvalds * NO WARRANTY 311da177e4SLinus Torvalds * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 321da177e4SLinus Torvalds * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 331da177e4SLinus Torvalds * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 341da177e4SLinus Torvalds * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 351da177e4SLinus Torvalds * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 361da177e4SLinus Torvalds * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 371da177e4SLinus Torvalds * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 381da177e4SLinus Torvalds * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 391da177e4SLinus Torvalds * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 401da177e4SLinus Torvalds * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 411da177e4SLinus Torvalds * POSSIBILITY OF SUCH DAMAGES. 421da177e4SLinus Torvalds */ 431da177e4SLinus Torvalds 441da177e4SLinus Torvalds #ifndef __ACTBL_H__ 451da177e4SLinus Torvalds #define __ACTBL_H__ 461da177e4SLinus Torvalds 471da177e4SLinus Torvalds /* 48*793c2388SBob Moore * Values for description table header signatures. Useful because they make 49*793c2388SBob Moore * it more difficult to inadvertently type in the wrong signature. 50*793c2388SBob Moore */ 51*793c2388SBob Moore #define DSDT_SIG "DSDT" /* Differentiated System Description Table */ 52*793c2388SBob Moore #define FADT_SIG "FACP" /* Fixed ACPI Description Table */ 53*793c2388SBob Moore #define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ 54*793c2388SBob Moore #define PSDT_SIG "PSDT" /* Persistent System Description Table */ 55*793c2388SBob Moore #define RSDP_SIG "RSD PTR " /* Root System Description Pointer */ 56*793c2388SBob Moore #define RSDT_SIG "RSDT" /* Root System Description Table */ 57*793c2388SBob Moore #define XSDT_SIG "XSDT" /* Extended System Description Table */ 58*793c2388SBob Moore #define SSDT_SIG "SSDT" /* Secondary System Description Table */ 59*793c2388SBob Moore #define RSDP_NAME "RSDP" 60*793c2388SBob Moore 61*793c2388SBob Moore /* 62*793c2388SBob Moore * All tables and structures must be byte-packed to match the ACPI 63*793c2388SBob Moore * specification, since the tables are provided by the system BIOS 64*793c2388SBob Moore */ 65*793c2388SBob Moore #pragma pack(1) 66*793c2388SBob Moore 67*793c2388SBob Moore /* 68*793c2388SBob Moore * These are the ACPI tables that are directly consumed by the subsystem. 69*793c2388SBob Moore * 70*793c2388SBob Moore * The RSDP and FACS do not use the common ACPI table header. All other ACPI 71*793c2388SBob Moore * tables use the header. 72*793c2388SBob Moore * 73defba1d8SBob Moore * Note about bitfields: The u8 type is used for bitfields in ACPI tables. 74defba1d8SBob Moore * This is the only type that is even remotely portable. Anything else is not 75defba1d8SBob Moore * portable, so do not use any other bitfield types. 76defba1d8SBob Moore */ 77defba1d8SBob Moore 78*793c2388SBob Moore /******************************************************************************* 791da177e4SLinus Torvalds * 80*793c2388SBob Moore * ACPI Table Header. This common header is used by all tables except the 81*793c2388SBob Moore * RSDP and FACS. The define is used for direct inclusion of header into 82*793c2388SBob Moore * other ACPI tables 83*793c2388SBob Moore * 84*793c2388SBob Moore ******************************************************************************/ 851da177e4SLinus Torvalds 86*793c2388SBob Moore #define ACPI_TABLE_HEADER_DEF \ 87f9f4601fSRobert Moore char signature[4]; /* ASCII table signature */\ 88f9f4601fSRobert Moore u32 length; /* Length of table in bytes, including this header */\ 891da177e4SLinus Torvalds u8 revision; /* ACPI Specification minor version # */\ 901da177e4SLinus Torvalds u8 checksum; /* To make sum of entire table == 0 */\ 91f9f4601fSRobert Moore char oem_id[6]; /* ASCII OEM identification */\ 92f9f4601fSRobert Moore char oem_table_id[8]; /* ASCII OEM table identification */\ 931da177e4SLinus Torvalds u32 oem_revision; /* OEM revision number */\ 94f9f4601fSRobert Moore char asl_compiler_id[4]; /* ASCII ASL compiler vendor ID */\ 95f9f4601fSRobert Moore u32 asl_compiler_revision; /* ASL compiler version */ 961da177e4SLinus Torvalds 97*793c2388SBob Moore struct acpi_table_header { 984be44fcdSLen Brown ACPI_TABLE_HEADER_DEF}; 991da177e4SLinus Torvalds 1001da177e4SLinus Torvalds /* 101*793c2388SBob Moore * GAS - Generic Address Structure (ACPI 2.0+) 1021da177e4SLinus Torvalds */ 103*793c2388SBob Moore struct acpi_generic_address { 104*793c2388SBob Moore u8 address_space_id; /* Address space where struct or register exists */ 105*793c2388SBob Moore u8 register_bit_width; /* Size in bits of given register */ 106*793c2388SBob Moore u8 register_bit_offset; /* Bit offset within the register */ 107*793c2388SBob Moore u8 access_width; /* Minimum Access size (ACPI 3.0) */ 108*793c2388SBob Moore u64 address; /* 64-bit address of struct or register */ 109*793c2388SBob Moore }; 1101da177e4SLinus Torvalds 111*793c2388SBob Moore /******************************************************************************* 112*793c2388SBob Moore * 113*793c2388SBob Moore * RSDP - Root System Description Pointer (Signature is "RSD PTR ") 114*793c2388SBob Moore * 115*793c2388SBob Moore ******************************************************************************/ 1161da177e4SLinus Torvalds 117*793c2388SBob Moore struct rsdp_descriptor { 118*793c2388SBob Moore char signature[8]; /* ACPI signature, contains "RSD PTR " */ 119*793c2388SBob Moore u8 checksum; /* ACPI 1.0 checksum */ 120*793c2388SBob Moore char oem_id[6]; /* OEM identification */ 121*793c2388SBob Moore u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ 122*793c2388SBob Moore u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ 123*793c2388SBob Moore u32 length; /* Table length in bytes, including header (ACPI 2.0+) */ 124*793c2388SBob Moore u64 xsdt_physical_address; /* 64-bit physical address of the XSDT (ACPI 2.0+) */ 125*793c2388SBob Moore u8 extended_checksum; /* Checksum of entire table (ACPI 2.0+) */ 126*793c2388SBob Moore u8 reserved[3]; /* Reserved, must be zero */ 127*793c2388SBob Moore }; 1281da177e4SLinus Torvalds 129*793c2388SBob Moore #define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ 1301da177e4SLinus Torvalds 131*793c2388SBob Moore /******************************************************************************* 132*793c2388SBob Moore * 133*793c2388SBob Moore * RSDT/XSDT - Root System Description Tables 134*793c2388SBob Moore * 135*793c2388SBob Moore ******************************************************************************/ 136*793c2388SBob Moore 137*793c2388SBob Moore struct rsdt_descriptor { 138*793c2388SBob Moore ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ 139*793c2388SBob Moore }; 140*793c2388SBob Moore 141*793c2388SBob Moore struct xsdt_descriptor { 142*793c2388SBob Moore ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ 143*793c2388SBob Moore }; 144*793c2388SBob Moore 145*793c2388SBob Moore /******************************************************************************* 146*793c2388SBob Moore * 147*793c2388SBob Moore * FACS - Firmware ACPI Control Structure (FACS) 148*793c2388SBob Moore * 149*793c2388SBob Moore ******************************************************************************/ 150*793c2388SBob Moore 151*793c2388SBob Moore struct facs_descriptor { 152*793c2388SBob Moore char signature[4]; /* ASCII table signature */ 153*793c2388SBob Moore u32 length; /* Length of structure, in bytes */ 154*793c2388SBob Moore u32 hardware_signature; /* Hardware configuration signature */ 155*793c2388SBob Moore u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */ 156*793c2388SBob Moore u32 global_lock; /* Global Lock for shared hardware resources */ 157f9f4601fSRobert Moore 158f9f4601fSRobert Moore /* Flags (32 bits) */ 159f9f4601fSRobert Moore 160*793c2388SBob Moore u8 S4bios_f:1; /* 00: S4BIOS support is present */ 161f9f4601fSRobert Moore u8:7; /* 01-07: Reserved, must be zero */ 162f9f4601fSRobert Moore u8 reserved1[3]; /* 08-31: Reserved, must be zero */ 163*793c2388SBob Moore 164*793c2388SBob Moore u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ 165*793c2388SBob Moore u8 version; /* Version of this table (ACPI 2.0+) */ 166*793c2388SBob Moore u8 reserved[31]; /* Reserved, must be zero */ 1671da177e4SLinus Torvalds }; 1681da177e4SLinus Torvalds 169*793c2388SBob Moore #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ 170*793c2388SBob Moore #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ 1711da177e4SLinus Torvalds 1721da177e4SLinus Torvalds /* 173*793c2388SBob Moore * Common FACS - This is a version-independent FACS structure used for internal use only 1741da177e4SLinus Torvalds */ 175*793c2388SBob Moore struct acpi_common_facs { 176*793c2388SBob Moore u32 *global_lock; 177*793c2388SBob Moore u64 *firmware_waking_vector; 178*793c2388SBob Moore u8 vector_width; 1791da177e4SLinus Torvalds }; 1801da177e4SLinus Torvalds 181*793c2388SBob Moore /******************************************************************************* 182*793c2388SBob Moore * 183*793c2388SBob Moore * FADT - Fixed ACPI Description Table (Signature "FACP") 184*793c2388SBob Moore * 185*793c2388SBob Moore ******************************************************************************/ 1864be44fcdSLen Brown 187*793c2388SBob Moore /* Fields common to all versions of the FADT */ 1881da177e4SLinus Torvalds 189*793c2388SBob Moore #define ACPI_FADT_COMMON \ 190*793c2388SBob Moore ACPI_TABLE_HEADER_DEF \ 191*793c2388SBob Moore u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ 192*793c2388SBob Moore u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ 193*793c2388SBob Moore u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ 194*793c2388SBob Moore u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ 195*793c2388SBob Moore u16 sci_int; /* System vector of SCI interrupt */ \ 196*793c2388SBob Moore u32 smi_cmd; /* Port address of SMI command port */ \ 197*793c2388SBob Moore u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \ 198*793c2388SBob Moore u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \ 199*793c2388SBob Moore u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \ 200*793c2388SBob Moore u8 pstate_cnt; /* Processor performance state control*/ \ 201*793c2388SBob Moore u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a Event Reg Blk */ \ 202*793c2388SBob Moore u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b Event Reg Blk */ \ 203*793c2388SBob Moore u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ 204*793c2388SBob Moore u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ 205*793c2388SBob Moore u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ 206*793c2388SBob Moore u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ 207*793c2388SBob Moore u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ 208*793c2388SBob Moore u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ 209*793c2388SBob Moore u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ \ 210*793c2388SBob Moore u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ \ 211*793c2388SBob Moore u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ 212*793c2388SBob Moore u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ 213*793c2388SBob Moore u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ 214*793c2388SBob Moore u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \ 215*793c2388SBob Moore u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \ 216*793c2388SBob Moore u8 cst_cnt; /* Support for the _CST object and C States change notification.*/ \ 217*793c2388SBob Moore u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \ 218*793c2388SBob Moore u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \ 219*793c2388SBob Moore u16 flush_size; /* Processor's memory cache line width, in bytes */ \ 220*793c2388SBob Moore u16 flush_stride; /* Number of flush strides that need to be read */ \ 221*793c2388SBob Moore u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/ \ 222*793c2388SBob Moore u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/ \ 223*793c2388SBob Moore u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \ 224*793c2388SBob Moore u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \ 225*793c2388SBob Moore u8 century; /* Index to century in RTC CMOS RAM */ \ 226*793c2388SBob Moore u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \ 227*793c2388SBob Moore u8 reserved2; /* Reserved, must be zero */ 2281da177e4SLinus Torvalds 229*793c2388SBob Moore /* 230*793c2388SBob Moore * ACPI 2.0+ FADT 231*793c2388SBob Moore */ 232*793c2388SBob Moore struct fadt_descriptor { 233*793c2388SBob Moore ACPI_FADT_COMMON 234*793c2388SBob Moore /* Flags (32 bits) */ 235*793c2388SBob Moore u8 wb_invd:1; /* 00: The wbinvd instruction works properly */ 236*793c2388SBob Moore u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */ 237*793c2388SBob Moore u8 proc_c1:1; /* 02: All processors support C1 state */ 238*793c2388SBob Moore u8 plvl2_up:1; /* 03: C2 state works on MP system */ 239*793c2388SBob Moore u8 pwr_button:1; /* 04: Power button is handled as a generic feature */ 240*793c2388SBob Moore u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */ 241*793c2388SBob Moore u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */ 242*793c2388SBob Moore u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */ 243*793c2388SBob Moore u8 tmr_val_ext:1; /* 08: tmr_val is 32 bits 0=24-bits */ 244*793c2388SBob Moore u8 dock_cap:1; /* 09: Docking supported */ 245*793c2388SBob Moore u8 reset_reg_sup:1; /* 10: System reset via the FADT RESET_REG supported */ 246*793c2388SBob Moore u8 sealed_case:1; /* 11: No internal expansion capabilities and case is sealed */ 247*793c2388SBob Moore u8 headless:1; /* 12: No local video capabilities or local input devices */ 248*793c2388SBob Moore u8 cpu_sw_sleep:1; /* 13: Must execute native instruction after writing SLP_TYPx register */ 2491da177e4SLinus Torvalds 250*793c2388SBob Moore u8 pci_exp_wak:1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ 251*793c2388SBob Moore u8 use_platform_clock:1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ 252*793c2388SBob Moore u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ 253*793c2388SBob Moore u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ 254*793c2388SBob Moore u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ 255*793c2388SBob Moore u8 force_apic_physical_destination_mode:1; /* 19: all local x_aPICs must use physical dest mode (ACPI 3.0) */ 256*793c2388SBob Moore u8:4; /* 20-23: Reserved, must be zero */ 257*793c2388SBob Moore u8 reserved3; /* 24-31: Reserved, must be zero */ 2581da177e4SLinus Torvalds 259*793c2388SBob Moore struct acpi_generic_address reset_register; /* Reset register address in GAS format */ 260*793c2388SBob Moore u8 reset_value; /* Value to write to the reset_register port to reset the system */ 261*793c2388SBob Moore u8 reserved4[3]; /* These three bytes must be zero */ 262*793c2388SBob Moore u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ 263*793c2388SBob Moore u64 Xdsdt; /* 64-bit physical address of DSDT */ 264*793c2388SBob Moore struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */ 265*793c2388SBob Moore struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */ 266*793c2388SBob Moore struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */ 267*793c2388SBob Moore struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */ 268*793c2388SBob Moore struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */ 269*793c2388SBob Moore struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ 270*793c2388SBob Moore struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */ 271*793c2388SBob Moore struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */ 2721da177e4SLinus Torvalds }; 2731da177e4SLinus Torvalds 2741da177e4SLinus Torvalds /* 275*793c2388SBob Moore * "Down-revved" ACPI 2.0 FADT descriptor 276*793c2388SBob Moore * Defined here to allow compiler to generate the length of the struct 2771da177e4SLinus Torvalds */ 278*793c2388SBob Moore struct fadt_descriptor_rev2_minus { 279*793c2388SBob Moore ACPI_FADT_COMMON u32 flags; 280*793c2388SBob Moore struct acpi_generic_address reset_register; /* Reset register address in GAS format */ 281*793c2388SBob Moore u8 reset_value; /* Value to write to the reset_register port to reset the system. */ 282*793c2388SBob Moore u8 reserved7[3]; /* Reserved, must be zero */ 2831da177e4SLinus Torvalds }; 2841da177e4SLinus Torvalds 285*793c2388SBob Moore /* 286*793c2388SBob Moore * ACPI 1.0 FADT 287*793c2388SBob Moore * Defined here to allow compiler to generate the length of the struct 288*793c2388SBob Moore */ 289*793c2388SBob Moore struct fadt_descriptor_rev1 { 290*793c2388SBob Moore ACPI_FADT_COMMON u32 flags; 291*793c2388SBob Moore }; 292*793c2388SBob Moore 293*793c2388SBob Moore /* FADT: Prefered Power Management Profiles */ 294*793c2388SBob Moore 295*793c2388SBob Moore #define PM_UNSPECIFIED 0 296*793c2388SBob Moore #define PM_DESKTOP 1 297*793c2388SBob Moore #define PM_MOBILE 2 298*793c2388SBob Moore #define PM_WORKSTATION 3 299*793c2388SBob Moore #define PM_ENTERPRISE_SERVER 4 300*793c2388SBob Moore #define PM_SOHO_SERVER 5 301*793c2388SBob Moore #define PM_APPLIANCE_PC 6 302*793c2388SBob Moore 303*793c2388SBob Moore /* FADT: Boot Arch Flags */ 304*793c2388SBob Moore 305*793c2388SBob Moore #define BAF_LEGACY_DEVICES 0x0001 306*793c2388SBob Moore #define BAF_8042_KEYBOARD_CONTROLLER 0x0002 307*793c2388SBob Moore 308*793c2388SBob Moore #define FADT2_REVISION_ID 3 309*793c2388SBob Moore #define FADT2_MINUS_REVISION_ID 2 310*793c2388SBob Moore 311*793c2388SBob Moore /* Reset to default packing */ 312*793c2388SBob Moore 3131da177e4SLinus Torvalds #pragma pack() 3141da177e4SLinus Torvalds 3151da177e4SLinus Torvalds /* 316*793c2388SBob Moore * This macro is temporary until the table bitfield flag definitions 317*793c2388SBob Moore * are removed and replaced by a Flags field. 318*793c2388SBob Moore */ 319*793c2388SBob Moore #define ACPI_FLAG_OFFSET(d,f,o) (u8) (ACPI_OFFSET (d,f) + \ 320*793c2388SBob Moore sizeof(((d *)0)->f) + o) 321*793c2388SBob Moore /* 322*793c2388SBob Moore * Get the remaining ACPI tables 323*793c2388SBob Moore */ 324*793c2388SBob Moore #include "actbl1.h" 325*793c2388SBob Moore 326*793c2388SBob Moore /* 3271da177e4SLinus Torvalds * ACPI Table information. We save the table address, length, 3281da177e4SLinus Torvalds * and type of memory allocation (mapped or allocated) for each 3291da177e4SLinus Torvalds * table for 1) when we exit, and 2) if a new table is installed 3301da177e4SLinus Torvalds */ 3311da177e4SLinus Torvalds #define ACPI_MEM_NOT_ALLOCATED 0 3321da177e4SLinus Torvalds #define ACPI_MEM_ALLOCATED 1 3331da177e4SLinus Torvalds #define ACPI_MEM_MAPPED 2 3341da177e4SLinus Torvalds 3351da177e4SLinus Torvalds /* Definitions for the Flags bitfield member of struct acpi_table_support */ 3361da177e4SLinus Torvalds 3371da177e4SLinus Torvalds #define ACPI_TABLE_SINGLE 0x00 3381da177e4SLinus Torvalds #define ACPI_TABLE_MULTIPLE 0x01 3391da177e4SLinus Torvalds #define ACPI_TABLE_EXECUTABLE 0x02 3401da177e4SLinus Torvalds 3411da177e4SLinus Torvalds #define ACPI_TABLE_ROOT 0x00 3421da177e4SLinus Torvalds #define ACPI_TABLE_PRIMARY 0x10 3431da177e4SLinus Torvalds #define ACPI_TABLE_SECONDARY 0x20 3441da177e4SLinus Torvalds #define ACPI_TABLE_ALL 0x30 3451da177e4SLinus Torvalds #define ACPI_TABLE_TYPE_MASK 0x30 3461da177e4SLinus Torvalds 3471da177e4SLinus Torvalds /* Data about each known table type */ 3481da177e4SLinus Torvalds 3494be44fcdSLen Brown struct acpi_table_support { 3501da177e4SLinus Torvalds char *name; 3511da177e4SLinus Torvalds char *signature; 3521da177e4SLinus Torvalds void **global_ptr; 3531da177e4SLinus Torvalds u8 sig_length; 3541da177e4SLinus Torvalds u8 flags; 3551da177e4SLinus Torvalds }; 3561da177e4SLinus Torvalds 3571da177e4SLinus Torvalds extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1, 3581da177e4SLinus Torvalds * needed for certain workarounds */ 359*793c2388SBob Moore /* Macros used to generate offsets to specific table fields */ 3601da177e4SLinus Torvalds 361*793c2388SBob Moore #define ACPI_FACS_OFFSET(f) (u8) ACPI_OFFSET (struct facs_descriptor,f) 362*793c2388SBob Moore #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct fadt_descriptor, f) 363*793c2388SBob Moore #define ACPI_GAS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_generic_address,f) 364*793c2388SBob Moore #define ACPI_HDR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_header,f) 365*793c2388SBob Moore #define ACPI_RSDP_OFFSET(f) (u8) ACPI_OFFSET (struct rsdp_descriptor,f) 3661da177e4SLinus Torvalds 367*793c2388SBob Moore #define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct fadt_descriptor,f,o) 368*793c2388SBob Moore #define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct facs_descriptor,f,o) 3691da177e4SLinus Torvalds 3701da177e4SLinus Torvalds #endif /* __ACTBL_H__ */ 371