actbl2.h 9.88 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3
/******************************************************************************
 *
 * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
Andy Grover's avatar
Andy Grover committed
4
 *       $Revision: 28 $
Linus Torvalds's avatar
Linus Torvalds committed
5 6 7 8
 *
 *****************************************************************************/

/*
Andy Grover's avatar
Andy Grover committed
9
 *  Copyright (C) 2000 - 2002, R. Byron Moore
Linus Torvalds's avatar
Linus Torvalds committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __ACTBL2_H__
#define __ACTBL2_H__

Linus Torvalds's avatar
Linus Torvalds committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
/*
 * Prefered Power Management Profiles
 */
#define PM_UNSPECIFIED                  0
#define PM_DESKTOP                      1
#define PM_MOBILE                       2
#define PM_WORKSTATION                  3
#define PM_ENTERPRISE_SERVER            4
#define PM_SOHO_SERVER                  5
#define PM_APPLIANCE_PC                 6

/*
 * ACPI Boot Arch Flags
 */
#define BAF_LEGACY_DEVICES              0x0001
#define BAF_8042_KEYBOARD_CONTROLLER    0x0002

#define FADT2_REVISION_ID               3

Linus Torvalds's avatar
Linus Torvalds committed
48 49 50

#pragma pack(1)

Linus Torvalds's avatar
Linus Torvalds committed
51
/*
Andy Grover's avatar
Andy Grover committed
52
 * ACPI 2.0 Root System Description Table (RSDT)
Linus Torvalds's avatar
Linus Torvalds committed
53
 */
Linus Torvalds's avatar
Linus Torvalds committed
54 55
typedef struct
{
Andy Grover's avatar
Andy Grover committed
56
	acpi_table_header       header;                 /* ACPI table header */
Linus Torvalds's avatar
Linus Torvalds committed
57
	u32                     table_offset_entry [1]; /* Array of pointers to  */
Andy Grover's avatar
Andy Grover committed
58
			 /* ACPI table headers */
Linus Torvalds's avatar
Linus Torvalds committed
59 60 61
} RSDT_DESCRIPTOR_REV2;


Linus Torvalds's avatar
Linus Torvalds committed
62
/*
Andy Grover's avatar
Andy Grover committed
63
 * ACPI 2.0 Extended System Description Table (XSDT)
Linus Torvalds's avatar
Linus Torvalds committed
64
 */
Linus Torvalds's avatar
Linus Torvalds committed
65 66
typedef struct
{
Andy Grover's avatar
Andy Grover committed
67
	acpi_table_header       header;                 /* ACPI table header */
Linus Torvalds's avatar
Linus Torvalds committed
68
	u64                     table_offset_entry [1]; /* Array of pointers to  */
Andy Grover's avatar
Andy Grover committed
69
			 /* ACPI table headers */
Linus Torvalds's avatar
Linus Torvalds committed
70 71
} XSDT_DESCRIPTOR_REV2;

Linus Torvalds's avatar
Linus Torvalds committed
72 73

/*
Andy Grover's avatar
Andy Grover committed
74
 * ACPI 2.0 Firmware ACPI Control Structure (FACS)
Linus Torvalds's avatar
Linus Torvalds committed
75
 */
Linus Torvalds's avatar
Linus Torvalds committed
76 77
typedef struct
{
Andy Grover's avatar
Andy Grover committed
78 79 80
	NATIVE_CHAR             signature[4];           /* ACPI signature */
	u32                     length;                 /* Length of structure, in bytes */
	u32                     hardware_signature;     /* Hardware configuration signature */
Linus Torvalds's avatar
Linus Torvalds committed
81 82
	u32                     firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
	u32                     global_lock;            /* Global Lock used to synchronize access to shared hardware resources */
Andy Grover's avatar
Andy Grover committed
83 84
	u32                     S4bios_f        : 1;    /* S4Bios_f - Indicates if S4BIOS support is present */
	u32                     reserved1       : 31;   /* Must be 0 */
Linus Torvalds's avatar
Linus Torvalds committed
85
	u64                     Xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
Linus Torvalds's avatar
Linus Torvalds committed
86
	u8                      version;                /* Version of this table */
Andy Grover's avatar
Andy Grover committed
87
	u8                      reserved3 [31];         /* Reserved - must be zero */
Linus Torvalds's avatar
Linus Torvalds committed
88

Linus Torvalds's avatar
Linus Torvalds committed
89
} facs_descriptor_rev2;
Linus Torvalds's avatar
Linus Torvalds committed
90 91


Linus Torvalds's avatar
Linus Torvalds committed
92
/*
Andy Grover's avatar
Andy Grover committed
93
 * ACPI 2.0 Generic Address Structure (GAS)
Linus Torvalds's avatar
Linus Torvalds committed
94
 */
Linus Torvalds's avatar
Linus Torvalds committed
95 96
typedef struct
{
Linus Torvalds's avatar
Linus Torvalds committed
97 98 99 100
	u8                      address_space_id;       /* Address space where struct or register exists. */
	u8                      register_bit_width;     /* Size in bits of given register */
	u8                      register_bit_offset;    /* Bit offset within the register */
	u8                      reserved;               /* Must be 0 */
Linus Torvalds's avatar
Linus Torvalds committed
101
	u64                     address;                /* 64-bit address of struct or register */
Linus Torvalds's avatar
Linus Torvalds committed
102

Linus Torvalds's avatar
Linus Torvalds committed
103
} acpi_generic_address;
Linus Torvalds's avatar
Linus Torvalds committed
104 105


Linus Torvalds's avatar
Linus Torvalds committed
106
/*
Andy Grover's avatar
Andy Grover committed
107
 * ACPI 2.0 Fixed ACPI Description Table (FADT)
Linus Torvalds's avatar
Linus Torvalds committed
108
 */
Linus Torvalds's avatar
Linus Torvalds committed
109 110
typedef struct
{
Andy Grover's avatar
Andy Grover committed
111
	acpi_table_header       header;             /* ACPI table header */
Linus Torvalds's avatar
Linus Torvalds committed
112 113 114 115 116 117
	u32                     V1_firmware_ctrl;   /* 32-bit physical address of FACS */
	u32                     V1_dsdt;            /* 32-bit physical address of DSDT */
	u8                      reserved1;          /* System Interrupt Model isn't used in ACPI 2.0*/
	u8                      prefer_PM_profile;  /* Conveys preferred power management profile to OSPM. */
	u16                     sci_int;            /* System vector of SCI interrupt */
	u32                     smi_cmd;            /* Port address of SMI command port */
Andy Grover's avatar
Andy Grover committed
118 119
	u8                      acpi_enable;        /* Value to write to smi_cmd to enable ACPI */
	u8                      acpi_disable;       /* Value to write to smi_cmd to disable ACPI */
Linus Torvalds's avatar
Linus Torvalds committed
120
	u8                      S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */
Andy Grover's avatar
Andy Grover committed
121
	u8                      pstate_cnt;         /* Processor performance state control*/
Linus Torvalds's avatar
Linus Torvalds committed
122 123 124 125 126 127
	u32                     V1_pm1a_evt_blk;    /* Port address of Power Mgt 1a Acpi_event Reg Blk */
	u32                     V1_pm1b_evt_blk;    /* Port address of Power Mgt 1b Acpi_event Reg Blk */
	u32                     V1_pm1a_cnt_blk;    /* Port address of Power Mgt 1a Control Reg Blk */
	u32                     V1_pm1b_cnt_blk;    /* Port address of Power Mgt 1b Control Reg Blk */
	u32                     V1_pm2_cnt_blk;     /* Port address of Power Mgt 2 Control Reg Blk */
	u32                     V1_pm_tmr_blk;      /* Port address of Power Mgt Timer Ctrl Reg Blk */
Andy Grover's avatar
Andy Grover committed
128
	u32                     V1_gpe0_blk;        /* Port addr of General Purpose Acpi_event 0 Reg Blk */
Linus Torvalds's avatar
Linus Torvalds committed
129 130 131 132 133
	u32                     V1_gpe1_blk;        /* Port addr of General Purpose Acpi_event 1 Reg Blk */
	u8                      pm1_evt_len;        /* Byte Length of ports at pm1_x_evt_blk */
	u8                      pm1_cnt_len;        /* Byte Length of ports at pm1_x_cnt_blk */
	u8                      pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */
	u8                      pm_tm_len;          /* Byte Length of ports at pm_tm_blk */
Andy Grover's avatar
Andy Grover committed
134
	u8                      gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */
Linus Torvalds's avatar
Linus Torvalds committed
135
	u8                      gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */
Andy Grover's avatar
Andy Grover committed
136
	u8                      gpe1_base;          /* Offset in gpe model where gpe1 events start */
Linus Torvalds's avatar
Linus Torvalds committed
137
	u8                      cst_cnt;            /* Support for the _CST object and C States change notification.*/
Andy Grover's avatar
Andy Grover committed
138 139 140
	u16                     plvl2_lat;          /* Worst case HW latency to enter/exit C2 state */
	u16                     plvl3_lat;          /* Worst case HW latency to enter/exit C3 state */
	u16                     flush_size;         /* Number of flush strides that need to be read */
Linus Torvalds's avatar
Linus Torvalds committed
141
	u16                     flush_stride;       /* Processor's memory cache line width, in bytes */
Andy Grover's avatar
Andy Grover committed
142 143
	u8                      duty_offset;        /* Processor's duty cycle index in processor's P_CNT reg*/
	u8                      duty_width;         /* Processor's duty cycle value bit width in P_CNT register.*/
Andy Grover's avatar
Andy Grover committed
144 145 146
	u8                      day_alrm;           /* Index to day-of-month alarm in RTC CMOS RAM */
	u8                      mon_alrm;           /* Index to month-of-year alarm in RTC CMOS RAM */
	u8                      century;            /* Index to century in RTC CMOS RAM */
Linus Torvalds's avatar
Linus Torvalds committed
147
	u16                     iapc_boot_arch;     /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
Andy Grover's avatar
Andy Grover committed
148 149 150 151
	u8                      reserved2;          /* Reserved */
	u32                     wb_invd     : 1;    /* The wbinvd instruction works properly */
	u32                     wb_invd_flush : 1;  /* The wbinvd flushes but does not invalidate */
	u32                     proc_c1     : 1;    /* All processors support C1 state */
Linus Torvalds's avatar
Linus Torvalds committed
152 153 154 155 156
	u32                     plvl2_up    : 1;    /* C2 state works on MP system */
	u32                     pwr_button  : 1;    /* Power button is handled as a generic feature */
	u32                     sleep_button : 1;   /* Sleep button is handled as a generic feature, or not present */
	u32                     fixed_rTC   : 1;    /* RTC wakeup stat not in fixed register space */
	u32                     rtcs4       : 1;    /* RTC wakeup stat not possible from S4 */
Andy Grover's avatar
Andy Grover committed
157
	u32                     tmr_val_ext : 1;    /* Indicates tmr_val is 32 bits 0=24-bits*/
Linus Torvalds's avatar
Linus Torvalds committed
158 159 160 161 162
	u32                     dock_cap    : 1;    /* Supports Docking */
	u32                     reset_reg_sup : 1;  /* Indicates system supports system reset via the FADT RESET_REG*/
	u32                     sealed_case : 1;    /* Indicates system has no internal expansion capabilities and case is sealed. */
	u32                     headless    : 1;    /* Indicates system does not have local video capabilities or local input devices.*/
	u32                     cpu_sw_sleep : 1;   /* Indicates to OSPM that a processor native instruction */
Andy Grover's avatar
Andy Grover committed
163 164
			   /* Must be executed after writing the SLP_TYPx register. */
	u32                     reserved6   : 18;   /* Reserved - must be zero */
Linus Torvalds's avatar
Linus Torvalds committed
165

Linus Torvalds's avatar
Linus Torvalds committed
166
	acpi_generic_address    reset_register;     /* Reset register address in GAS format */
Linus Torvalds's avatar
Linus Torvalds committed
167 168
	u8                      reset_value;        /* Value to write to the Reset_register port to reset the system. */
	u8                      reserved7[3];       /* These three bytes must be zero */
Linus Torvalds's avatar
Linus Torvalds committed
169 170
	u64                     Xfirmware_ctrl;     /* 64-bit physical address of FACS */
	u64                     Xdsdt;              /* 64-bit physical address of DSDT */
Linus Torvalds's avatar
Linus Torvalds committed
171 172 173 174 175 176
	acpi_generic_address    Xpm1a_evt_blk;      /* Extended Power Mgt 1a Acpi_event Reg Blk address */
	acpi_generic_address    Xpm1b_evt_blk;      /* Extended Power Mgt 1b Acpi_event Reg Blk address */
	acpi_generic_address    Xpm1a_cnt_blk;      /* Extended Power Mgt 1a Control Reg Blk address */
	acpi_generic_address    Xpm1b_cnt_blk;      /* Extended Power Mgt 1b Control Reg Blk address */
	acpi_generic_address    Xpm2_cnt_blk;       /* Extended Power Mgt 2 Control Reg Blk address */
	acpi_generic_address    Xpm_tmr_blk;        /* Extended Power Mgt Timer Ctrl Reg Blk address */
Andy Grover's avatar
Andy Grover committed
177
	acpi_generic_address    Xgpe0_blk;          /* Extended General Purpose Acpi_event 0 Reg Blk address */
Linus Torvalds's avatar
Linus Torvalds committed
178 179 180
	acpi_generic_address    Xgpe1_blk;          /* Extended General Purpose Acpi_event 1 Reg Blk address */

}  fadt_descriptor_rev2;
Linus Torvalds's avatar
Linus Torvalds committed
181 182 183 184 185 186


#pragma pack()

#endif /* __ACTBL2_H__ */