diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-07 18:14:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-07 18:14:06 -0400 |
commit | d8dc91b753b881c60c766c06aeec87675a07df4a (patch) | |
tree | 9a02f81fc5436b424d88c2340dcd6b0fe6ae6cca /include/acpi/actbl.h | |
parent | 7035cdf36d5c4d913f68ff97e1c2e5603500d946 (diff) | |
parent | 3f44ea0d1c3835872033a6633135e16f87161202 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pul ACPI & Power Management updates from Len Brown:
- acpidump utility added
- intel_idle driver now supports IVB Xeon
- turbostat utility can now count SMIs
- ACPI can now bind to USB3 hubs
- misc fixes
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (49 commits)
ACPI: Add new sysfs interface to export device description
ACPI: Harden acpi_table_parse_entries() against BIOS bug
tools/power/turbostat: add option to count SMIs, re-name some options
tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter deltas
intel_idle: enable IVB Xeon support
tools/power turbostat: add [-m MSR#] option
tools/power turbostat: make -M output pretty
tools/power turbostat: print more turbo-limit information
tools/power turbostat: delete unused line
tools/power turbostat: run on IVB Xeon
tools/power/acpi/acpidump: create acpidump(8), local make install targets
tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
ACPI: run _OSC after ACPI_FULL_INITIALIZATION
tools/power/acpi/acpidump: create acpidump(8), local make install targets
tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
tools/power/acpi/acpidump: version 20071116
tools/power/acpi/acpidump: version 20070714
tools/power/acpi/acpidump: version 20060606
tools/power/acpi/acpidump: version 20051111
xo15-ebook: convert to module_acpi_driver()
...
Diffstat (limited to 'include/acpi/actbl.h')
-rw-r--r-- | include/acpi/actbl.h | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 59a73e1b2845..4f94b1d812d5 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -79,9 +79,15 @@ | |||
79 | #pragma pack(1) | 79 | #pragma pack(1) |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | 82 | * Note: C bitfields are not used for this reason: |
83 | * This is the only type that is even remotely portable. Anything else is not | 83 | * |
84 | * portable, so do not use any other bitfield types. | 84 | * "Bitfields are great and easy to read, but unfortunately the C language |
85 | * does not specify the layout of bitfields in memory, which means they are | ||
86 | * essentially useless for dealing with packed data in on-disk formats or | ||
87 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
88 | * this decision was a design error in C. Ritchie could have picked an order | ||
89 | * and stuck with it." Norman Ramsey. | ||
90 | * See http://stackoverflow.com/a/1053662/41661 | ||
85 | */ | 91 | */ |
86 | 92 | ||
87 | /******************************************************************************* | 93 | /******************************************************************************* |
@@ -94,7 +100,7 @@ | |||
94 | struct acpi_table_header { | 100 | struct acpi_table_header { |
95 | char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ | 101 | char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ |
96 | u32 length; /* Length of table in bytes, including this header */ | 102 | u32 length; /* Length of table in bytes, including this header */ |
97 | u8 revision; /* ACPI Specification minor version # */ | 103 | u8 revision; /* ACPI Specification minor version number */ |
98 | u8 checksum; /* To make sum of entire table == 0 */ | 104 | u8 checksum; /* To make sum of entire table == 0 */ |
99 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ | 105 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ |
100 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ | 106 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ |
@@ -108,7 +114,7 @@ struct acpi_table_header { | |||
108 | * GAS - Generic Address Structure (ACPI 2.0+) | 114 | * GAS - Generic Address Structure (ACPI 2.0+) |
109 | * | 115 | * |
110 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. | 116 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. |
111 | * If misaliged access is not supported by the hardware, accesses to the | 117 | * If misaligned access is not supported by the hardware, accesses to the |
112 | * 64-bit Address field must be performed with care. | 118 | * 64-bit Address field must be performed with care. |
113 | * | 119 | * |
114 | ******************************************************************************/ | 120 | ******************************************************************************/ |
@@ -210,18 +216,18 @@ struct acpi_table_fadt { | |||
210 | u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */ | 216 | u8 preferred_profile; /* Conveys preferred power management profile to OSPM. */ |
211 | u16 sci_interrupt; /* System vector of SCI interrupt */ | 217 | u16 sci_interrupt; /* System vector of SCI interrupt */ |
212 | u32 smi_command; /* 32-bit Port address of SMI command port */ | 218 | u32 smi_command; /* 32-bit Port address of SMI command port */ |
213 | u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ | 219 | u8 acpi_enable; /* Value to write to SMI_CMD to enable ACPI */ |
214 | u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ | 220 | u8 acpi_disable; /* Value to write to SMI_CMD to disable ACPI */ |
215 | u8 s4_bios_request; /* Value to write to SMI CMD to enter S4BIOS state */ | 221 | u8 s4_bios_request; /* Value to write to SMI_CMD to enter S4BIOS state */ |
216 | u8 pstate_control; /* Processor performance state control */ | 222 | u8 pstate_control; /* Processor performance state control */ |
217 | u32 pm1a_event_block; /* 32-bit Port address of Power Mgt 1a Event Reg Blk */ | 223 | u32 pm1a_event_block; /* 32-bit port address of Power Mgt 1a Event Reg Blk */ |
218 | u32 pm1b_event_block; /* 32-bit Port address of Power Mgt 1b Event Reg Blk */ | 224 | u32 pm1b_event_block; /* 32-bit port address of Power Mgt 1b Event Reg Blk */ |
219 | u32 pm1a_control_block; /* 32-bit Port address of Power Mgt 1a Control Reg Blk */ | 225 | u32 pm1a_control_block; /* 32-bit port address of Power Mgt 1a Control Reg Blk */ |
220 | u32 pm1b_control_block; /* 32-bit Port address of Power Mgt 1b Control Reg Blk */ | 226 | u32 pm1b_control_block; /* 32-bit port address of Power Mgt 1b Control Reg Blk */ |
221 | u32 pm2_control_block; /* 32-bit Port address of Power Mgt 2 Control Reg Blk */ | 227 | u32 pm2_control_block; /* 32-bit port address of Power Mgt 2 Control Reg Blk */ |
222 | u32 pm_timer_block; /* 32-bit Port address of Power Mgt Timer Ctrl Reg Blk */ | 228 | u32 pm_timer_block; /* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */ |
223 | u32 gpe0_block; /* 32-bit Port address of General Purpose Event 0 Reg Blk */ | 229 | u32 gpe0_block; /* 32-bit port address of General Purpose Event 0 Reg Blk */ |
224 | u32 gpe1_block; /* 32-bit Port address of General Purpose Event 1 Reg Blk */ | 230 | u32 gpe1_block; /* 32-bit port address of General Purpose Event 1 Reg Blk */ |
225 | u8 pm1_event_length; /* Byte Length of ports at pm1x_event_block */ | 231 | u8 pm1_event_length; /* Byte Length of ports at pm1x_event_block */ |
226 | u8 pm1_control_length; /* Byte Length of ports at pm1x_control_block */ | 232 | u8 pm1_control_length; /* Byte Length of ports at pm1x_control_block */ |
227 | u8 pm2_control_length; /* Byte Length of ports at pm2_control_block */ | 233 | u8 pm2_control_length; /* Byte Length of ports at pm2_control_block */ |
@@ -229,12 +235,12 @@ struct acpi_table_fadt { | |||
229 | u8 gpe0_block_length; /* Byte Length of ports at gpe0_block */ | 235 | u8 gpe0_block_length; /* Byte Length of ports at gpe0_block */ |
230 | u8 gpe1_block_length; /* Byte Length of ports at gpe1_block */ | 236 | u8 gpe1_block_length; /* Byte Length of ports at gpe1_block */ |
231 | u8 gpe1_base; /* Offset in GPE number space where GPE1 events start */ | 237 | u8 gpe1_base; /* Offset in GPE number space where GPE1 events start */ |
232 | u8 cst_control; /* Support for the _CST object and C States change notification */ | 238 | u8 cst_control; /* Support for the _CST object and C-States change notification */ |
233 | u16 c2_latency; /* Worst case HW latency to enter/exit C2 state */ | 239 | u16 c2_latency; /* Worst case HW latency to enter/exit C2 state */ |
234 | u16 c3_latency; /* Worst case HW latency to enter/exit C3 state */ | 240 | u16 c3_latency; /* Worst case HW latency to enter/exit C3 state */ |
235 | u16 flush_size; /* Processor's memory cache line width, in bytes */ | 241 | u16 flush_size; /* Processor memory cache line width, in bytes */ |
236 | u16 flush_stride; /* Number of flush strides that need to be read */ | 242 | u16 flush_stride; /* Number of flush strides that need to be read */ |
237 | u8 duty_offset; /* Processor duty cycle index in processor's P_CNT reg */ | 243 | u8 duty_offset; /* Processor duty cycle index in processor P_CNT reg */ |
238 | u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */ | 244 | u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */ |
239 | u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ | 245 | u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ |
240 | u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ | 246 | u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ |
@@ -255,11 +261,11 @@ struct acpi_table_fadt { | |||
255 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ | 261 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ |
256 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ | 262 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ |
257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 263 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
258 | struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register */ | 264 | struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register (ACPI 5.0) */ |
259 | struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register */ | 265 | struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register (ACPI 5.0) */ |
260 | }; | 266 | }; |
261 | 267 | ||
262 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ | 268 | /* Masks for FADT Boot Architecture Flags (boot_flags) [Vx]=Introduced in this FADT revision */ |
263 | 269 | ||
264 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ | 270 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ |
265 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ | 271 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ |
@@ -272,13 +278,13 @@ struct acpi_table_fadt { | |||
272 | 278 | ||
273 | /* Masks for FADT flags */ | 279 | /* Masks for FADT flags */ |
274 | 280 | ||
275 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ | 281 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The WBINVD instruction works properly */ |
276 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ | 282 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] WBINVD flushes but does not invalidate caches */ |
277 | #define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */ | 283 | #define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */ |
278 | #define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */ | 284 | #define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */ |
279 | #define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */ | 285 | #define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */ |
280 | #define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */ | 286 | #define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */ |
281 | #define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status not in fixed register space */ | 287 | #define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status is not in fixed register space */ |
282 | #define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */ | 288 | #define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */ |
283 | #define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */ | 289 | #define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */ |
284 | #define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */ | 290 | #define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */ |
@@ -297,7 +303,7 @@ struct acpi_table_fadt { | |||
297 | 303 | ||
298 | /* Values for preferred_profile (Preferred Power Management Profiles) */ | 304 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
299 | 305 | ||
300 | enum acpi_prefered_pm_profiles { | 306 | enum acpi_preferred_pm_profiles { |
301 | PM_UNSPECIFIED = 0, | 307 | PM_UNSPECIFIED = 0, |
302 | PM_DESKTOP = 1, | 308 | PM_DESKTOP = 1, |
303 | PM_MOBILE = 2, | 309 | PM_MOBILE = 2, |
@@ -335,7 +341,7 @@ union acpi_name_union { | |||
335 | struct acpi_table_desc { | 341 | struct acpi_table_desc { |
336 | acpi_physical_address address; | 342 | acpi_physical_address address; |
337 | struct acpi_table_header *pointer; | 343 | struct acpi_table_header *pointer; |
338 | u32 length; /* Length fixed at 32 bits */ | 344 | u32 length; /* Length fixed at 32 bits (fixed in table header) */ |
339 | union acpi_name_union signature; | 345 | union acpi_name_union signature; |
340 | acpi_owner_id owner_id; | 346 | acpi_owner_id owner_id; |
341 | u8 flags; | 347 | u8 flags; |