diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
commit | c11f6c82581e8be4e1829c677db54e7f55cebece (patch) | |
tree | 1a116241b0831ded998aabe800bdc24104cbd826 /include/acpi | |
parent | 40aba218969914d1b225e742617adb921cf94eae (diff) | |
parent | 193a6dec1c0246a80b6d0101e4f351ccf877bcac (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (119 commits)
ACPI: don't pass handle for fixed hardware notifications
ACPI: remove null pointer checks in deferred execution path
ACPI: simplify deferred execution path
acerhdf: additional BIOS versions
acerhdf: convert to dev_pm_ops
acerhdf: fix fan control for AOA150 model
thermal: add missing Kconfig dependency
acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file
hp-wmi: fix rfkill memory leak on unload
ACPI: remove unnecessary #ifdef CONFIG_DMI
ACPI: linux/acpi.h should not include linux/dmi.h
hwmon driver for ACPI 4.0 power meters
topstar-laptop: add new driver for hotkeys support on Topstar N01
thinkpad_acpi: fix rfkill memory leak on unload
thinkpad-acpi: report brightness events when required
thinkpad-acpi: don't poll by default any of the reserved hotkeys
thinkpad-acpi: Fix procfs hotkey reset command
thinkpad-acpi: deprecate hotkey_bios_mask
thinkpad-acpi: hotkey poll fixes
thinkpad-acpi: be more strict when detecting a ThinkPad
...
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 16 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 3 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 10 | ||||
-rw-r--r-- | include/acpi/actbl.h | 78 | ||||
-rw-r--r-- | include/acpi/actbl1.h | 872 | ||||
-rw-r--r-- | include/acpi/actbl2.h | 868 | ||||
-rw-r--r-- | include/acpi/actypes.h | 92 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 4 |
8 files changed, 1203 insertions, 740 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1b3b36068ca5..1cef1398e358 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | #include <acpi/acpi.h> | 31 | #include <acpi/acpi.h> |
32 | 32 | ||
33 | #define PREFIX "ACPI: " | ||
34 | |||
35 | /* TBD: Make dynamic */ | 33 | /* TBD: Make dynamic */ |
36 | #define ACPI_MAX_HANDLES 10 | 34 | #define ACPI_MAX_HANDLES 10 |
37 | struct acpi_handle_list { | 35 | struct acpi_handle_list { |
@@ -89,7 +87,6 @@ struct acpi_device; | |||
89 | typedef int (*acpi_op_add) (struct acpi_device * device); | 87 | typedef int (*acpi_op_add) (struct acpi_device * device); |
90 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); | 88 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); |
91 | typedef int (*acpi_op_start) (struct acpi_device * device); | 89 | typedef int (*acpi_op_start) (struct acpi_device * device); |
92 | typedef int (*acpi_op_stop) (struct acpi_device * device, int type); | ||
93 | typedef int (*acpi_op_suspend) (struct acpi_device * device, | 90 | typedef int (*acpi_op_suspend) (struct acpi_device * device, |
94 | pm_message_t state); | 91 | pm_message_t state); |
95 | typedef int (*acpi_op_resume) (struct acpi_device * device); | 92 | typedef int (*acpi_op_resume) (struct acpi_device * device); |
@@ -106,7 +103,6 @@ struct acpi_device_ops { | |||
106 | acpi_op_add add; | 103 | acpi_op_add add; |
107 | acpi_op_remove remove; | 104 | acpi_op_remove remove; |
108 | acpi_op_start start; | 105 | acpi_op_start start; |
109 | acpi_op_stop stop; | ||
110 | acpi_op_suspend suspend; | 106 | acpi_op_suspend suspend; |
111 | acpi_op_resume resume; | 107 | acpi_op_resume resume; |
112 | acpi_op_bind bind; | 108 | acpi_op_bind bind; |
@@ -173,17 +169,15 @@ struct acpi_device_dir { | |||
173 | 169 | ||
174 | typedef char acpi_bus_id[8]; | 170 | typedef char acpi_bus_id[8]; |
175 | typedef unsigned long acpi_bus_address; | 171 | typedef unsigned long acpi_bus_address; |
176 | typedef char acpi_hardware_id[15]; | ||
177 | typedef char acpi_unique_id[9]; | ||
178 | typedef char acpi_device_name[40]; | 172 | typedef char acpi_device_name[40]; |
179 | typedef char acpi_device_class[20]; | 173 | typedef char acpi_device_class[20]; |
180 | 174 | ||
181 | struct acpi_device_pnp { | 175 | struct acpi_device_pnp { |
182 | acpi_bus_id bus_id; /* Object name */ | 176 | acpi_bus_id bus_id; /* Object name */ |
183 | acpi_bus_address bus_address; /* _ADR */ | 177 | acpi_bus_address bus_address; /* _ADR */ |
184 | acpi_hardware_id hardware_id; /* _HID */ | 178 | char *hardware_id; /* _HID */ |
185 | struct acpi_compatible_id_list *cid_list; /* _CIDs */ | 179 | struct acpica_device_id_list *cid_list; /* _CIDs */ |
186 | acpi_unique_id unique_id; /* _UID */ | 180 | char *unique_id; /* _UID */ |
187 | acpi_device_name device_name; /* Driver-determined */ | 181 | acpi_device_name device_name; /* Driver-determined */ |
188 | acpi_device_class device_class; /* " */ | 182 | acpi_device_class device_class; /* " */ |
189 | }; | 183 | }; |
@@ -314,7 +308,7 @@ struct acpi_bus_event { | |||
314 | 308 | ||
315 | extern struct kobject *acpi_kobj; | 309 | extern struct kobject *acpi_kobj; |
316 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); | 310 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
317 | void acpi_bus_private_data_handler(acpi_handle, u32, void *); | 311 | void acpi_bus_private_data_handler(acpi_handle, void *); |
318 | int acpi_bus_get_private_data(acpi_handle, void **); | 312 | int acpi_bus_get_private_data(acpi_handle, void **); |
319 | extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); | 313 | extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); |
320 | extern int register_acpi_notifier(struct notifier_block *); | 314 | extern int register_acpi_notifier(struct notifier_block *); |
@@ -327,7 +321,7 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb); | |||
327 | */ | 321 | */ |
328 | 322 | ||
329 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); | 323 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); |
330 | void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); | 324 | void acpi_bus_data_handler(acpi_handle handle, void *context); |
331 | int acpi_bus_get_status(struct acpi_device *device); | 325 | int acpi_bus_get_status(struct acpi_device *device); |
332 | int acpi_bus_get_power(acpi_handle handle, int *state); | 326 | int acpi_bus_get_power(acpi_handle handle, int *state); |
333 | int acpi_bus_set_power(acpi_handle handle, int state); | 327 | int acpi_bus_set_power(acpi_handle handle, int state); |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index ab0b85cf21f3..eb0e7189075f 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -245,6 +245,9 @@ acpi_status acpi_osi_invalidate(char* interface); | |||
245 | acpi_status | 245 | acpi_status |
246 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | 246 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, |
247 | acpi_size length, char *name); | 247 | acpi_size length, char *name); |
248 | acpi_status | ||
249 | acpi_os_invalidate_address(u8 space_id, acpi_physical_address address, | ||
250 | acpi_size length); | ||
248 | 251 | ||
249 | u64 acpi_os_get_timer(void); | 252 | u64 acpi_os_get_timer(void); |
250 | 253 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 82ec6a3c0500..e723b0fd8e41 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
49 | 49 | ||
50 | #define ACPI_CA_VERSION 0x20090521 | 50 | #define ACPI_CA_VERSION 0x20090903 |
51 | 51 | ||
52 | #include "actypes.h" | 52 | #include "actypes.h" |
53 | #include "actbl.h" | 53 | #include "actbl.h" |
@@ -64,6 +64,7 @@ extern u8 acpi_gbl_enable_interpreter_slack; | |||
64 | extern u8 acpi_gbl_all_methods_serialized; | 64 | extern u8 acpi_gbl_all_methods_serialized; |
65 | extern u8 acpi_gbl_create_osi_method; | 65 | extern u8 acpi_gbl_create_osi_method; |
66 | extern u8 acpi_gbl_leave_wake_gpes_disabled; | 66 | extern u8 acpi_gbl_leave_wake_gpes_disabled; |
67 | extern u8 acpi_gbl_use_default_register_widths; | ||
67 | extern acpi_name acpi_gbl_trace_method_name; | 68 | extern acpi_name acpi_gbl_trace_method_name; |
68 | extern u32 acpi_gbl_trace_flags; | 69 | extern u32 acpi_gbl_trace_flags; |
69 | 70 | ||
@@ -199,7 +200,8 @@ acpi_evaluate_object_typed(acpi_handle object, | |||
199 | acpi_object_type return_type); | 200 | acpi_object_type return_type); |
200 | 201 | ||
201 | acpi_status | 202 | acpi_status |
202 | acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); | 203 | acpi_get_object_info(acpi_handle handle, |
204 | struct acpi_device_info **return_buffer); | ||
203 | 205 | ||
204 | acpi_status acpi_install_method(u8 *buffer); | 206 | acpi_status acpi_install_method(u8 *buffer); |
205 | 207 | ||
@@ -359,9 +361,9 @@ acpi_status acpi_set_firmware_waking_vector(u32 physical_address); | |||
359 | acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); | 361 | acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); |
360 | #endif | 362 | #endif |
361 | 363 | ||
362 | acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg); | 364 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); |
363 | 365 | ||
364 | acpi_status acpi_write(u32 value, struct acpi_generic_address *reg); | 366 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); |
365 | 367 | ||
366 | acpi_status | 368 | acpi_status |
367 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | 369 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 222733d01f36..1b6587952604 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -44,9 +44,23 @@ | |||
44 | #ifndef __ACTBL_H__ | 44 | #ifndef __ACTBL_H__ |
45 | #define __ACTBL_H__ | 45 | #define __ACTBL_H__ |
46 | 46 | ||
47 | /******************************************************************************* | ||
48 | * | ||
49 | * Fundamental ACPI tables | ||
50 | * | ||
51 | * This file contains definitions for the ACPI tables that are directly consumed | ||
52 | * by ACPICA. All other tables are consumed by the OS-dependent ACPI-related | ||
53 | * device drivers and other OS support code. | ||
54 | * | ||
55 | * The RSDP and FACS do not use the common ACPI table header. All other ACPI | ||
56 | * tables use the header. | ||
57 | * | ||
58 | ******************************************************************************/ | ||
59 | |||
47 | /* | 60 | /* |
48 | * Values for description table header signatures. Useful because they make | 61 | * Values for description table header signatures for tables defined in this |
49 | * it more difficult to inadvertently type in the wrong signature. | 62 | * file. Useful because they make it more difficult to inadvertently type in |
63 | * the wrong signature. | ||
50 | */ | 64 | */ |
51 | #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ | 65 | #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ |
52 | #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ | 66 | #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ |
@@ -65,11 +79,6 @@ | |||
65 | #pragma pack(1) | 79 | #pragma pack(1) |
66 | 80 | ||
67 | /* | 81 | /* |
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. | ||
72 | * | ||
73 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | 82 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
74 | * This is the only type that is even remotely portable. Anything else is not | 83 | * This is the only type that is even remotely portable. Anything else is not |
75 | * portable, so do not use any other bitfield types. | 84 | * portable, so do not use any other bitfield types. |
@@ -77,9 +86,8 @@ | |||
77 | 86 | ||
78 | /******************************************************************************* | 87 | /******************************************************************************* |
79 | * | 88 | * |
80 | * ACPI Table Header. This common header is used by all tables except the | 89 | * Master ACPI Table Header. This common header is used by all ACPI tables |
81 | * RSDP and FACS. The define is used for direct inclusion of header into | 90 | * except the RSDP and FACS. |
82 | * other ACPI tables | ||
83 | * | 91 | * |
84 | ******************************************************************************/ | 92 | ******************************************************************************/ |
85 | 93 | ||
@@ -95,13 +103,16 @@ struct acpi_table_header { | |||
95 | u32 asl_compiler_revision; /* ASL compiler version */ | 103 | u32 asl_compiler_revision; /* ASL compiler version */ |
96 | }; | 104 | }; |
97 | 105 | ||
98 | /* | 106 | /******************************************************************************* |
107 | * | ||
99 | * GAS - Generic Address Structure (ACPI 2.0+) | 108 | * GAS - Generic Address Structure (ACPI 2.0+) |
100 | * | 109 | * |
101 | * Note: Since this structure is used in the ACPI tables, it is byte aligned. | 110 | * 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 | 111 | * If misaliged access is not supported by the hardware, accesses to the |
103 | * performed with care. | 112 | * 64-bit Address field must be performed with care. |
104 | */ | 113 | * |
114 | ******************************************************************************/ | ||
115 | |||
105 | struct acpi_generic_address { | 116 | struct acpi_generic_address { |
106 | u8 space_id; /* Address space where struct or register exists */ | 117 | u8 space_id; /* Address space where struct or register exists */ |
107 | u8 bit_width; /* Size in bits of given register */ | 118 | u8 bit_width; /* Size in bits of given register */ |
@@ -113,6 +124,7 @@ struct acpi_generic_address { | |||
113 | /******************************************************************************* | 124 | /******************************************************************************* |
114 | * | 125 | * |
115 | * RSDP - Root System Description Pointer (Signature is "RSD PTR ") | 126 | * RSDP - Root System Description Pointer (Signature is "RSD PTR ") |
127 | * Version 2 | ||
116 | * | 128 | * |
117 | ******************************************************************************/ | 129 | ******************************************************************************/ |
118 | 130 | ||
@@ -133,6 +145,7 @@ struct acpi_table_rsdp { | |||
133 | /******************************************************************************* | 145 | /******************************************************************************* |
134 | * | 146 | * |
135 | * RSDT/XSDT - Root System Description Tables | 147 | * RSDT/XSDT - Root System Description Tables |
148 | * Version 1 (both) | ||
136 | * | 149 | * |
137 | ******************************************************************************/ | 150 | ******************************************************************************/ |
138 | 151 | ||
@@ -161,21 +174,29 @@ struct acpi_table_facs { | |||
161 | u32 flags; | 174 | u32 flags; |
162 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ | 175 | u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ |
163 | u8 version; /* Version of this table (ACPI 2.0+) */ | 176 | u8 version; /* Version of this table (ACPI 2.0+) */ |
164 | u8 reserved[31]; /* Reserved, must be zero */ | 177 | u8 reserved[3]; /* Reserved, must be zero */ |
178 | u32 ospm_flags; /* Flags to be set by OSPM (ACPI 4.0) */ | ||
179 | u8 reserved1[24]; /* Reserved, must be zero */ | ||
165 | }; | 180 | }; |
166 | 181 | ||
167 | /* Flag macros */ | 182 | /* Masks for global_lock flag field above */ |
168 | 183 | ||
169 | #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ | 184 | #define ACPI_GLOCK_PENDING (1) /* 00: Pending global lock ownership */ |
185 | #define ACPI_GLOCK_OWNED (1<<1) /* 01: Global lock is owned */ | ||
170 | 186 | ||
171 | /* Global lock flags */ | 187 | /* Masks for Flags field above */ |
172 | 188 | ||
173 | #define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ | 189 | #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ |
174 | #define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ | 190 | #define ACPI_FACS_64BIT_WAKE (1<<1) /* 01: 64-bit wake vector supported (ACPI 4.0) */ |
191 | |||
192 | /* Masks for ospm_flags field above */ | ||
193 | |||
194 | #define ACPI_FACS_64BIT_ENVIRONMENT (1) /* 00: 64-bit wake environment is required (ACPI 4.0) */ | ||
175 | 195 | ||
176 | /******************************************************************************* | 196 | /******************************************************************************* |
177 | * | 197 | * |
178 | * FADT - Fixed ACPI Description Table (Signature "FACP") | 198 | * FADT - Fixed ACPI Description Table (Signature "FACP") |
199 | * Version 4 | ||
179 | * | 200 | * |
180 | ******************************************************************************/ | 201 | ******************************************************************************/ |
181 | 202 | ||
@@ -236,7 +257,7 @@ struct acpi_table_fadt { | |||
236 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
237 | }; | 258 | }; |
238 | 259 | ||
239 | /* FADT Boot Architecture Flags (boot_flags) */ | 260 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ |
240 | 261 | ||
241 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ | 262 | #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ |
242 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ | 263 | #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ |
@@ -246,7 +267,7 @@ struct acpi_table_fadt { | |||
246 | 267 | ||
247 | #define FADT2_REVISION_ID 3 | 268 | #define FADT2_REVISION_ID 3 |
248 | 269 | ||
249 | /* FADT flags */ | 270 | /* Masks for FADT flags */ |
250 | 271 | ||
251 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ | 272 | #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ |
252 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ | 273 | #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ |
@@ -269,7 +290,7 @@ struct acpi_table_fadt { | |||
269 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
270 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
271 | 292 | ||
272 | /* FADT Prefered Power Management Profiles */ | 293 | /* Values for preferred_profile (Prefered Power Management Profiles) */ |
273 | 294 | ||
274 | enum acpi_prefered_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
275 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
@@ -287,14 +308,16 @@ enum acpi_prefered_pm_profiles { | |||
287 | 308 | ||
288 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) | 309 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) |
289 | 310 | ||
311 | /* | ||
312 | * Internal table-related structures | ||
313 | */ | ||
290 | union acpi_name_union { | 314 | union acpi_name_union { |
291 | u32 integer; | 315 | u32 integer; |
292 | char ascii[4]; | 316 | char ascii[4]; |
293 | }; | 317 | }; |
294 | 318 | ||
295 | /* | 319 | /* Internal ACPI Table Descriptor. One per ACPI table. */ |
296 | * Internal ACPI Table Descriptor. One per ACPI table | 320 | |
297 | */ | ||
298 | struct acpi_table_desc { | 321 | struct acpi_table_desc { |
299 | acpi_physical_address address; | 322 | acpi_physical_address address; |
300 | struct acpi_table_header *pointer; | 323 | struct acpi_table_header *pointer; |
@@ -304,7 +327,7 @@ struct acpi_table_desc { | |||
304 | u8 flags; | 327 | u8 flags; |
305 | }; | 328 | }; |
306 | 329 | ||
307 | /* Flags for above */ | 330 | /* Masks for Flags field above */ |
308 | 331 | ||
309 | #define ACPI_TABLE_ORIGIN_UNKNOWN (0) | 332 | #define ACPI_TABLE_ORIGIN_UNKNOWN (0) |
310 | #define ACPI_TABLE_ORIGIN_MAPPED (1) | 333 | #define ACPI_TABLE_ORIGIN_MAPPED (1) |
@@ -318,5 +341,6 @@ struct acpi_table_desc { | |||
318 | */ | 341 | */ |
319 | 342 | ||
320 | #include <acpi/actbl1.h> | 343 | #include <acpi/actbl1.h> |
344 | #include <acpi/actbl2.h> | ||
321 | 345 | ||
322 | #endif /* __ACTBL_H__ */ | 346 | #endif /* __ACTBL_H__ */ |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 59ade0752473..0b9b430b092b 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -46,41 +46,31 @@ | |||
46 | 46 | ||
47 | /******************************************************************************* | 47 | /******************************************************************************* |
48 | * | 48 | * |
49 | * Additional ACPI Tables | 49 | * Additional ACPI Tables (1) |
50 | * | 50 | * |
51 | * These tables are not consumed directly by the ACPICA subsystem, but are | 51 | * These tables are not consumed directly by the ACPICA subsystem, but are |
52 | * included here to support device drivers and the AML disassembler. | 52 | * included here to support device drivers and the AML disassembler. |
53 | * | 53 | * |
54 | * The tables in this file are fully defined within the ACPI specification. | ||
55 | * | ||
54 | ******************************************************************************/ | 56 | ******************************************************************************/ |
55 | 57 | ||
56 | /* | 58 | /* |
57 | * Values for description table header signatures. Useful because they make | 59 | * Values for description table header signatures for tables defined in this |
58 | * it more difficult to inadvertently type in the wrong signature. | 60 | * file. Useful because they make it more difficult to inadvertently type in |
61 | * the wrong signature. | ||
59 | */ | 62 | */ |
60 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ | ||
61 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ | 63 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ |
62 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ | ||
63 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ | 64 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ |
64 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ | ||
65 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ | ||
66 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ | 65 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
67 | #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ | 66 | #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ |
68 | #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ | 67 | #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ |
69 | #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ | 68 | #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ |
70 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ | ||
71 | #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ | ||
72 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ | 69 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ |
73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | 70 | #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ |
74 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ | 71 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
75 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ | ||
76 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ | 72 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
77 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | ||
78 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | ||
79 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ | 73 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
80 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | ||
81 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ | ||
82 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ | ||
83 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ | ||
84 | 74 | ||
85 | /* | 75 | /* |
86 | * All tables must be byte-packed to match the ACPI specification, since | 76 | * All tables must be byte-packed to match the ACPI specification, since |
@@ -94,14 +84,20 @@ | |||
94 | * portable, so do not use any other bitfield types. | 84 | * portable, so do not use any other bitfield types. |
95 | */ | 85 | */ |
96 | 86 | ||
97 | /* Common Subtable header (used in MADT, SRAT, etc.) */ | 87 | /******************************************************************************* |
88 | * | ||
89 | * Common subtable headers | ||
90 | * | ||
91 | ******************************************************************************/ | ||
92 | |||
93 | /* Generic subtable header (used in MADT, SRAT, etc.) */ | ||
98 | 94 | ||
99 | struct acpi_subtable_header { | 95 | struct acpi_subtable_header { |
100 | u8 type; | 96 | u8 type; |
101 | u8 length; | 97 | u8 length; |
102 | }; | 98 | }; |
103 | 99 | ||
104 | /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */ | 100 | /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */ |
105 | 101 | ||
106 | struct acpi_whea_header { | 102 | struct acpi_whea_header { |
107 | u8 action; | 103 | u8 action; |
@@ -115,116 +111,8 @@ struct acpi_whea_header { | |||
115 | 111 | ||
116 | /******************************************************************************* | 112 | /******************************************************************************* |
117 | * | 113 | * |
118 | * ASF - Alert Standard Format table (Signature "ASF!") | 114 | * BERT - Boot Error Record Table (ACPI 4.0) |
119 | * | 115 | * Version 1 |
120 | * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 | ||
121 | * | ||
122 | ******************************************************************************/ | ||
123 | |||
124 | struct acpi_table_asf { | ||
125 | struct acpi_table_header header; /* Common ACPI table header */ | ||
126 | }; | ||
127 | |||
128 | /* ASF subtable header */ | ||
129 | |||
130 | struct acpi_asf_header { | ||
131 | u8 type; | ||
132 | u8 reserved; | ||
133 | u16 length; | ||
134 | }; | ||
135 | |||
136 | /* Values for Type field above */ | ||
137 | |||
138 | enum acpi_asf_type { | ||
139 | ACPI_ASF_TYPE_INFO = 0, | ||
140 | ACPI_ASF_TYPE_ALERT = 1, | ||
141 | ACPI_ASF_TYPE_CONTROL = 2, | ||
142 | ACPI_ASF_TYPE_BOOT = 3, | ||
143 | ACPI_ASF_TYPE_ADDRESS = 4, | ||
144 | ACPI_ASF_TYPE_RESERVED = 5 | ||
145 | }; | ||
146 | |||
147 | /* | ||
148 | * ASF subtables | ||
149 | */ | ||
150 | |||
151 | /* 0: ASF Information */ | ||
152 | |||
153 | struct acpi_asf_info { | ||
154 | struct acpi_asf_header header; | ||
155 | u8 min_reset_value; | ||
156 | u8 min_poll_interval; | ||
157 | u16 system_id; | ||
158 | u32 mfg_id; | ||
159 | u8 flags; | ||
160 | u8 reserved2[3]; | ||
161 | }; | ||
162 | |||
163 | /* 1: ASF Alerts */ | ||
164 | |||
165 | struct acpi_asf_alert { | ||
166 | struct acpi_asf_header header; | ||
167 | u8 assert_mask; | ||
168 | u8 deassert_mask; | ||
169 | u8 alerts; | ||
170 | u8 data_length; | ||
171 | }; | ||
172 | |||
173 | struct acpi_asf_alert_data { | ||
174 | u8 address; | ||
175 | u8 command; | ||
176 | u8 mask; | ||
177 | u8 value; | ||
178 | u8 sensor_type; | ||
179 | u8 type; | ||
180 | u8 offset; | ||
181 | u8 source_type; | ||
182 | u8 severity; | ||
183 | u8 sensor_number; | ||
184 | u8 entity; | ||
185 | u8 instance; | ||
186 | }; | ||
187 | |||
188 | /* 2: ASF Remote Control */ | ||
189 | |||
190 | struct acpi_asf_remote { | ||
191 | struct acpi_asf_header header; | ||
192 | u8 controls; | ||
193 | u8 data_length; | ||
194 | u16 reserved2; | ||
195 | }; | ||
196 | |||
197 | struct acpi_asf_control_data { | ||
198 | u8 function; | ||
199 | u8 address; | ||
200 | u8 command; | ||
201 | u8 value; | ||
202 | }; | ||
203 | |||
204 | /* 3: ASF RMCP Boot Options */ | ||
205 | |||
206 | struct acpi_asf_rmcp { | ||
207 | struct acpi_asf_header header; | ||
208 | u8 capabilities[7]; | ||
209 | u8 completion_code; | ||
210 | u32 enterprise_id; | ||
211 | u8 command; | ||
212 | u16 parameter; | ||
213 | u16 boot_options; | ||
214 | u16 oem_parameters; | ||
215 | }; | ||
216 | |||
217 | /* 4: ASF Address */ | ||
218 | |||
219 | struct acpi_asf_address { | ||
220 | struct acpi_asf_header header; | ||
221 | u8 eprom_address; | ||
222 | u8 devices; | ||
223 | }; | ||
224 | |||
225 | /******************************************************************************* | ||
226 | * | ||
227 | * BERT - Boot Error Record Table | ||
228 | * | 116 | * |
229 | ******************************************************************************/ | 117 | ******************************************************************************/ |
230 | 118 | ||
@@ -234,38 +122,43 @@ struct acpi_table_bert { | |||
234 | u64 address; /* Physical addresss of the error region */ | 122 | u64 address; /* Physical addresss of the error region */ |
235 | }; | 123 | }; |
236 | 124 | ||
237 | /* Boot Error Region */ | 125 | /* Boot Error Region (not a subtable, pointed to by Address field above) */ |
238 | 126 | ||
239 | struct acpi_bert_region { | 127 | struct acpi_bert_region { |
240 | u32 block_status; | 128 | u32 block_status; /* Type of error information */ |
241 | u32 raw_data_offset; | 129 | u32 raw_data_offset; /* Offset to raw error data */ |
242 | u32 raw_data_length; | 130 | u32 raw_data_length; /* Length of raw error data */ |
243 | u32 data_length; | 131 | u32 data_length; /* Length of generic error data */ |
244 | u32 error_severity; | 132 | u32 error_severity; /* Severity code */ |
245 | }; | 133 | }; |
246 | 134 | ||
247 | /* block_status Flags */ | 135 | /* Values for block_status flags above */ |
248 | 136 | ||
249 | #define ACPI_BERT_UNCORRECTABLE (1) | 137 | #define ACPI_BERT_UNCORRECTABLE (1) |
250 | #define ACPI_BERT_CORRECTABLE (2) | 138 | #define ACPI_BERT_CORRECTABLE (1<<1) |
251 | #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4) | 139 | #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2) |
252 | #define ACPI_BERT_MULTIPLE_CORRECTABLE (8) | 140 | #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3) |
141 | #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ | ||
253 | 142 | ||
254 | /******************************************************************************* | 143 | /* Values for error_severity above */ |
255 | * | ||
256 | * BOOT - Simple Boot Flag Table | ||
257 | * | ||
258 | ******************************************************************************/ | ||
259 | 144 | ||
260 | struct acpi_table_boot { | 145 | enum acpi_bert_error_severity { |
261 | struct acpi_table_header header; /* Common ACPI table header */ | 146 | ACPI_BERT_ERROR_CORRECTABLE = 0, |
262 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ | 147 | ACPI_BERT_ERROR_FATAL = 1, |
263 | u8 reserved[3]; | 148 | ACPI_BERT_ERROR_CORRECTED = 2, |
149 | ACPI_BERT_ERROR_NONE = 3, | ||
150 | ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */ | ||
264 | }; | 151 | }; |
265 | 152 | ||
153 | /* | ||
154 | * Note: The generic error data that follows the error_severity field above | ||
155 | * uses the struct acpi_hest_generic_data defined under the HEST table below | ||
156 | */ | ||
157 | |||
266 | /******************************************************************************* | 158 | /******************************************************************************* |
267 | * | 159 | * |
268 | * CPEP - Corrected Platform Error Polling table | 160 | * CPEP - Corrected Platform Error Polling table (ACPI 4.0) |
161 | * Version 1 | ||
269 | * | 162 | * |
270 | ******************************************************************************/ | 163 | ******************************************************************************/ |
271 | 164 | ||
@@ -277,8 +170,7 @@ struct acpi_table_cpep { | |||
277 | /* Subtable */ | 170 | /* Subtable */ |
278 | 171 | ||
279 | struct acpi_cpep_polling { | 172 | struct acpi_cpep_polling { |
280 | u8 type; | 173 | struct acpi_subtable_header header; |
281 | u8 length; | ||
282 | u8 id; /* Processor ID */ | 174 | u8 id; /* Processor ID */ |
283 | u8 eid; /* Processor EID */ | 175 | u8 eid; /* Processor EID */ |
284 | u32 interval; /* Polling interval (msec) */ | 176 | u32 interval; /* Polling interval (msec) */ |
@@ -286,124 +178,8 @@ struct acpi_cpep_polling { | |||
286 | 178 | ||
287 | /******************************************************************************* | 179 | /******************************************************************************* |
288 | * | 180 | * |
289 | * DBGP - Debug Port table | ||
290 | * | ||
291 | ******************************************************************************/ | ||
292 | |||
293 | struct acpi_table_dbgp { | ||
294 | struct acpi_table_header header; /* Common ACPI table header */ | ||
295 | u8 type; /* 0=full 16550, 1=subset of 16550 */ | ||
296 | u8 reserved[3]; | ||
297 | struct acpi_generic_address debug_port; | ||
298 | }; | ||
299 | |||
300 | /******************************************************************************* | ||
301 | * | ||
302 | * DMAR - DMA Remapping table | ||
303 | * From "Intel Virtualization Technology for Directed I/O", Sept. 2007 | ||
304 | * | ||
305 | ******************************************************************************/ | ||
306 | |||
307 | struct acpi_table_dmar { | ||
308 | struct acpi_table_header header; /* Common ACPI table header */ | ||
309 | u8 width; /* Host Address Width */ | ||
310 | u8 flags; | ||
311 | u8 reserved[10]; | ||
312 | }; | ||
313 | |||
314 | /* Flags */ | ||
315 | |||
316 | #define ACPI_DMAR_INTR_REMAP (1) | ||
317 | |||
318 | /* DMAR subtable header */ | ||
319 | |||
320 | struct acpi_dmar_header { | ||
321 | u16 type; | ||
322 | u16 length; | ||
323 | }; | ||
324 | |||
325 | /* Values for subtable type in struct acpi_dmar_header */ | ||
326 | |||
327 | enum acpi_dmar_type { | ||
328 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, | ||
329 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, | ||
330 | ACPI_DMAR_TYPE_ATSR = 2, | ||
331 | ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */ | ||
332 | }; | ||
333 | |||
334 | struct acpi_dmar_device_scope { | ||
335 | u8 entry_type; | ||
336 | u8 length; | ||
337 | u16 reserved; | ||
338 | u8 enumeration_id; | ||
339 | u8 bus; | ||
340 | }; | ||
341 | |||
342 | /* Values for entry_type in struct acpi_dmar_device_scope */ | ||
343 | |||
344 | enum acpi_dmar_scope_type { | ||
345 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, | ||
346 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, | ||
347 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, | ||
348 | ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, | ||
349 | ACPI_DMAR_SCOPE_TYPE_HPET = 4, | ||
350 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */ | ||
351 | }; | ||
352 | |||
353 | struct acpi_dmar_pci_path { | ||
354 | u8 dev; | ||
355 | u8 fn; | ||
356 | }; | ||
357 | |||
358 | /* | ||
359 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header | ||
360 | */ | ||
361 | |||
362 | /* 0: Hardware Unit Definition */ | ||
363 | |||
364 | struct acpi_dmar_hardware_unit { | ||
365 | struct acpi_dmar_header header; | ||
366 | u8 flags; | ||
367 | u8 reserved; | ||
368 | u16 segment; | ||
369 | u64 address; /* Register Base Address */ | ||
370 | }; | ||
371 | |||
372 | /* Flags */ | ||
373 | |||
374 | #define ACPI_DMAR_INCLUDE_ALL (1) | ||
375 | |||
376 | /* 1: Reserved Memory Defininition */ | ||
377 | |||
378 | struct acpi_dmar_reserved_memory { | ||
379 | struct acpi_dmar_header header; | ||
380 | u16 reserved; | ||
381 | u16 segment; | ||
382 | u64 base_address; /* 4_k aligned base address */ | ||
383 | u64 end_address; /* 4_k aligned limit address */ | ||
384 | }; | ||
385 | |||
386 | /* Flags */ | ||
387 | |||
388 | #define ACPI_DMAR_ALLOW_ALL (1) | ||
389 | |||
390 | |||
391 | /* 2: Root Port ATS Capability Reporting Structure */ | ||
392 | |||
393 | struct acpi_dmar_atsr { | ||
394 | struct acpi_dmar_header header; | ||
395 | u8 flags; | ||
396 | u8 reserved; | ||
397 | u16 segment; | ||
398 | }; | ||
399 | |||
400 | /* Flags */ | ||
401 | |||
402 | #define ACPI_DMAR_ALL_PORTS (1) | ||
403 | |||
404 | /******************************************************************************* | ||
405 | * | ||
406 | * ECDT - Embedded Controller Boot Resources Table | 181 | * ECDT - Embedded Controller Boot Resources Table |
182 | * Version 1 | ||
407 | * | 183 | * |
408 | ******************************************************************************/ | 184 | ******************************************************************************/ |
409 | 185 | ||
@@ -418,14 +194,16 @@ struct acpi_table_ecdt { | |||
418 | 194 | ||
419 | /******************************************************************************* | 195 | /******************************************************************************* |
420 | * | 196 | * |
421 | * EINJ - Error Injection Table | 197 | * EINJ - Error Injection Table (ACPI 4.0) |
198 | * Version 1 | ||
422 | * | 199 | * |
423 | ******************************************************************************/ | 200 | ******************************************************************************/ |
424 | 201 | ||
425 | struct acpi_table_einj { | 202 | struct acpi_table_einj { |
426 | struct acpi_table_header header; /* Common ACPI table header */ | 203 | struct acpi_table_header header; /* Common ACPI table header */ |
427 | u32 header_length; | 204 | u32 header_length; |
428 | u32 reserved; | 205 | u8 flags; |
206 | u8 reserved[3]; | ||
429 | u32 entries; | 207 | u32 entries; |
430 | }; | 208 | }; |
431 | 209 | ||
@@ -435,6 +213,10 @@ struct acpi_einj_entry { | |||
435 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ | 213 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
436 | }; | 214 | }; |
437 | 215 | ||
216 | /* Masks for Flags field above */ | ||
217 | |||
218 | #define ACPI_EINJ_PRESERVE (1) | ||
219 | |||
438 | /* Values for Action field above */ | 220 | /* Values for Action field above */ |
439 | 221 | ||
440 | enum acpi_einj_actions { | 222 | enum acpi_einj_actions { |
@@ -470,9 +252,34 @@ struct acpi_einj_trigger { | |||
470 | u32 entry_count; | 252 | u32 entry_count; |
471 | }; | 253 | }; |
472 | 254 | ||
255 | /* Command status return values */ | ||
256 | |||
257 | enum acpi_einj_command_status { | ||
258 | ACPI_EINJ_SUCCESS = 0, | ||
259 | ACPI_EINJ_FAILURE = 1, | ||
260 | ACPI_EINJ_INVALID_ACCESS = 2, | ||
261 | ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */ | ||
262 | }; | ||
263 | |||
264 | /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */ | ||
265 | |||
266 | #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1) | ||
267 | #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1) | ||
268 | #define ACPI_EINJ_PROCESSOR_FATAL (1<<2) | ||
269 | #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3) | ||
270 | #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4) | ||
271 | #define ACPI_EINJ_MEMORY_FATAL (1<<5) | ||
272 | #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6) | ||
273 | #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7) | ||
274 | #define ACPI_EINJ_PCIX_FATAL (1<<8) | ||
275 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) | ||
276 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) | ||
277 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) | ||
278 | |||
473 | /******************************************************************************* | 279 | /******************************************************************************* |
474 | * | 280 | * |
475 | * ERST - Error Record Serialization Table | 281 | * ERST - Error Record Serialization Table (ACPI 4.0) |
282 | * Version 1 | ||
476 | * | 283 | * |
477 | ******************************************************************************/ | 284 | ******************************************************************************/ |
478 | 285 | ||
@@ -489,19 +296,23 @@ struct acpi_erst_entry { | |||
489 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ | 296 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
490 | }; | 297 | }; |
491 | 298 | ||
299 | /* Masks for Flags field above */ | ||
300 | |||
301 | #define ACPI_ERST_PRESERVE (1) | ||
302 | |||
492 | /* Values for Action field above */ | 303 | /* Values for Action field above */ |
493 | 304 | ||
494 | enum acpi_erst_actions { | 305 | enum acpi_erst_actions { |
495 | ACPI_ERST_BEGIN_WRITE_OPERATION = 0, | 306 | ACPI_ERST_BEGIN_WRITE = 0, |
496 | ACPI_ERST_BEGIN_READ_OPERATION = 1, | 307 | ACPI_ERST_BEGIN_READ = 1, |
497 | ACPI_ERST_BETGIN_CLEAR_OPERATION = 2, | 308 | ACPI_ERST_BEGIN_CLEAR = 2, |
498 | ACPI_ERST_END_OPERATION = 3, | 309 | ACPI_ERST_END = 3, |
499 | ACPI_ERST_SET_RECORD_OFFSET = 4, | 310 | ACPI_ERST_SET_RECORD_OFFSET = 4, |
500 | ACPI_ERST_EXECUTE_OPERATION = 5, | 311 | ACPI_ERST_EXECUTE_OPERATION = 5, |
501 | ACPI_ERST_CHECK_BUSY_STATUS = 6, | 312 | ACPI_ERST_CHECK_BUSY_STATUS = 6, |
502 | ACPI_ERST_GET_COMMAND_STATUS = 7, | 313 | ACPI_ERST_GET_COMMAND_STATUS = 7, |
503 | ACPI_ERST_GET_RECORD_IDENTIFIER = 8, | 314 | ACPI_ERST_GET_RECORD_ID = 8, |
504 | ACPI_ERST_SET_RECORD_IDENTIFIER = 9, | 315 | ACPI_ERST_SET_RECORD_ID = 9, |
505 | ACPI_ERST_GET_RECORD_COUNT = 10, | 316 | ACPI_ERST_GET_RECORD_COUNT = 10, |
506 | ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, | 317 | ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, |
507 | ACPI_ERST_NOT_USED = 12, | 318 | ACPI_ERST_NOT_USED = 12, |
@@ -536,9 +347,29 @@ enum acpi_erst_instructions { | |||
536 | ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ | 347 | ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ |
537 | }; | 348 | }; |
538 | 349 | ||
350 | /* Command status return values */ | ||
351 | |||
352 | enum acpi_erst_command_status { | ||
353 | ACPI_ERST_SUCESS = 0, | ||
354 | ACPI_ERST_NO_SPACE = 1, | ||
355 | ACPI_ERST_NOT_AVAILABLE = 2, | ||
356 | ACPI_ERST_FAILURE = 3, | ||
357 | ACPI_ERST_RECORD_EMPTY = 4, | ||
358 | ACPI_ERST_NOT_FOUND = 5, | ||
359 | ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */ | ||
360 | }; | ||
361 | |||
362 | /* Error Record Serialization Information */ | ||
363 | |||
364 | struct acpi_erst_info { | ||
365 | u16 signature; /* Should be "ER" */ | ||
366 | u8 data[48]; | ||
367 | }; | ||
368 | |||
539 | /******************************************************************************* | 369 | /******************************************************************************* |
540 | * | 370 | * |
541 | * HEST - Hardware Error Source Table | 371 | * HEST - Hardware Error Source Table (ACPI 4.0) |
372 | * Version 1 | ||
542 | * | 373 | * |
543 | ******************************************************************************/ | 374 | ******************************************************************************/ |
544 | 375 | ||
@@ -551,85 +382,69 @@ struct acpi_table_hest { | |||
551 | 382 | ||
552 | struct acpi_hest_header { | 383 | struct acpi_hest_header { |
553 | u16 type; | 384 | u16 type; |
385 | u16 source_id; | ||
554 | }; | 386 | }; |
555 | 387 | ||
556 | /* Values for Type field above for subtables */ | 388 | /* Values for Type field above for subtables */ |
557 | 389 | ||
558 | enum acpi_hest_types { | 390 | enum acpi_hest_types { |
559 | ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0, | 391 | ACPI_HEST_TYPE_IA32_CHECK = 0, |
560 | ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1, | 392 | ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1, |
561 | ACPI_HEST_TYPE_XPF_UNUSED = 2, | 393 | ACPI_HEST_TYPE_IA32_NMI = 2, |
562 | ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3, | 394 | ACPI_HEST_TYPE_NOT_USED3 = 3, |
563 | ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4, | 395 | ACPI_HEST_TYPE_NOT_USED4 = 4, |
564 | ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5, | 396 | ACPI_HEST_TYPE_NOT_USED5 = 5, |
565 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, | 397 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, |
566 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, | 398 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, |
567 | ACPI_HEST_TYPE_AER_BRIDGE = 8, | 399 | ACPI_HEST_TYPE_AER_BRIDGE = 8, |
568 | ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9, | 400 | ACPI_HEST_TYPE_GENERIC_ERROR = 9, |
569 | ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */ | 401 | ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */ |
570 | }; | 402 | }; |
571 | 403 | ||
572 | /* | 404 | /* |
573 | * HEST Sub-subtables | 405 | * HEST substructures contained in subtables |
574 | */ | 406 | */ |
575 | 407 | ||
576 | /* XPF Machine Check Error Bank */ | 408 | /* |
577 | 409 | * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and | |
578 | struct acpi_hest_xpf_error_bank { | 410 | * struct acpi_hest_ia_corrected structures. |
411 | */ | ||
412 | struct acpi_hest_ia_error_bank { | ||
579 | u8 bank_number; | 413 | u8 bank_number; |
580 | u8 clear_status_on_init; | 414 | u8 clear_status_on_init; |
581 | u8 status_format; | 415 | u8 status_format; |
582 | u8 config_write_enable; | 416 | u8 reserved; |
583 | u32 control_register; | 417 | u32 control_register; |
584 | u64 control_init_data; | 418 | u64 control_data; |
585 | u32 status_register; | 419 | u32 status_register; |
586 | u32 address_register; | 420 | u32 address_register; |
587 | u32 misc_register; | 421 | u32 misc_register; |
588 | }; | 422 | }; |
589 | 423 | ||
590 | /* Generic Error Status */ | 424 | /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */ |
591 | |||
592 | struct acpi_hest_generic_status { | ||
593 | u32 block_status; | ||
594 | u32 raw_data_offset; | ||
595 | u32 raw_data_length; | ||
596 | u32 data_length; | ||
597 | u32 error_severity; | ||
598 | }; | ||
599 | |||
600 | /* Generic Error Data */ | ||
601 | |||
602 | struct acpi_hest_generic_data { | ||
603 | u8 section_type[16]; | ||
604 | u32 error_severity; | ||
605 | u16 revision; | ||
606 | u8 validation_bits; | ||
607 | u8 flags; | ||
608 | u32 error_data_length; | ||
609 | u8 fru_id[16]; | ||
610 | u8 fru_text[20]; | ||
611 | }; | ||
612 | |||
613 | /* Common HEST structure for PCI/AER types below (6,7,8) */ | ||
614 | 425 | ||
615 | struct acpi_hest_aer_common { | 426 | struct acpi_hest_aer_common { |
616 | u16 source_id; | 427 | u16 reserved1; |
617 | u16 config_write_enable; | ||
618 | u8 flags; | 428 | u8 flags; |
619 | u8 enabled; | 429 | u8 enabled; |
620 | u32 records_to_pre_allocate; | 430 | u32 records_to_preallocate; |
621 | u32 max_sections_per_record; | 431 | u32 max_sections_per_record; |
622 | u32 bus; | 432 | u32 bus; |
623 | u16 device; | 433 | u16 device; |
624 | u16 function; | 434 | u16 function; |
625 | u16 device_control; | 435 | u16 device_control; |
626 | u16 reserved; | 436 | u16 reserved2; |
627 | u32 uncorrectable_error_mask; | 437 | u32 uncorrectable_mask; |
628 | u32 uncorrectable_error_severity; | 438 | u32 uncorrectable_severity; |
629 | u32 correctable_error_mask; | 439 | u32 correctable_mask; |
630 | u32 advanced_error_capabilities; | 440 | u32 advanced_capabilities; |
631 | }; | 441 | }; |
632 | 442 | ||
443 | /* Masks for HEST Flags fields */ | ||
444 | |||
445 | #define ACPI_HEST_FIRMWARE_FIRST (1) | ||
446 | #define ACPI_HEST_GLOBAL (1<<1) | ||
447 | |||
633 | /* Hardware Error Notification */ | 448 | /* Hardware Error Notification */ |
634 | 449 | ||
635 | struct acpi_hest_notify { | 450 | struct acpi_hest_notify { |
@@ -655,71 +470,59 @@ enum acpi_hest_notify_types { | |||
655 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ | 470 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ |
656 | }; | 471 | }; |
657 | 472 | ||
473 | /* Values for config_write_enable bitfield above */ | ||
474 | |||
475 | #define ACPI_HEST_TYPE (1) | ||
476 | #define ACPI_HEST_POLL_INTERVAL (1<<1) | ||
477 | #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2) | ||
478 | #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3) | ||
479 | #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4) | ||
480 | #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5) | ||
481 | |||
658 | /* | 482 | /* |
659 | * HEST subtables | 483 | * HEST subtables |
660 | * | ||
661 | * From WHEA Design Document, 16 May 2007. | ||
662 | * Note: There is no subtable type 2 in this version of the document, | ||
663 | * and there are two different subtable type 3s. | ||
664 | */ | 484 | */ |
665 | 485 | ||
666 | /* 0: XPF Machine Check Exception */ | 486 | /* 0: IA32 Machine Check Exception */ |
667 | 487 | ||
668 | struct acpi_hest_xpf_machine_check { | 488 | struct acpi_hest_ia_machine_check { |
669 | struct acpi_hest_header header; | 489 | struct acpi_hest_header header; |
670 | u16 source_id; | 490 | u16 reserved1; |
671 | u16 config_write_enable; | ||
672 | u8 flags; | 491 | u8 flags; |
673 | u8 reserved1; | 492 | u8 enabled; |
674 | u32 records_to_pre_allocate; | 493 | u32 records_to_preallocate; |
675 | u32 max_sections_per_record; | 494 | u32 max_sections_per_record; |
676 | u64 global_capability_data; | 495 | u64 global_capability_data; |
677 | u64 global_control_data; | 496 | u64 global_control_data; |
678 | u8 num_hardware_banks; | 497 | u8 num_hardware_banks; |
679 | u8 reserved2[7]; | 498 | u8 reserved3[7]; |
680 | }; | 499 | }; |
681 | 500 | ||
682 | /* 1: XPF Corrected Machine Check */ | 501 | /* 1: IA32 Corrected Machine Check */ |
683 | 502 | ||
684 | struct acpi_table_hest_xpf_corrected { | 503 | struct acpi_hest_ia_corrected { |
685 | struct acpi_hest_header header; | 504 | struct acpi_hest_header header; |
686 | u16 source_id; | 505 | u16 reserved1; |
687 | u16 config_write_enable; | ||
688 | u8 flags; | 506 | u8 flags; |
689 | u8 enabled; | 507 | u8 enabled; |
690 | u32 records_to_pre_allocate; | 508 | u32 records_to_preallocate; |
691 | u32 max_sections_per_record; | 509 | u32 max_sections_per_record; |
692 | struct acpi_hest_notify notify; | 510 | struct acpi_hest_notify notify; |
693 | u8 num_hardware_banks; | 511 | u8 num_hardware_banks; |
694 | u8 reserved[3]; | 512 | u8 reserved2[3]; |
695 | }; | 513 | }; |
696 | 514 | ||
697 | /* 3: XPF Non-Maskable Interrupt */ | 515 | /* 2: IA32 Non-Maskable Interrupt */ |
698 | 516 | ||
699 | struct acpi_hest_xpf_nmi { | 517 | struct acpi_hest_ia_nmi { |
700 | struct acpi_hest_header header; | 518 | struct acpi_hest_header header; |
701 | u16 source_id; | ||
702 | u32 reserved; | 519 | u32 reserved; |
703 | u32 records_to_pre_allocate; | 520 | u32 records_to_preallocate; |
704 | u32 max_sections_per_record; | 521 | u32 max_sections_per_record; |
705 | u32 max_raw_data_length; | 522 | u32 max_raw_data_length; |
706 | }; | 523 | }; |
707 | 524 | ||
708 | /* 4: IPF Corrected Machine Check */ | 525 | /* 3,4,5: Not used */ |
709 | |||
710 | struct acpi_hest_ipf_corrected { | ||
711 | struct acpi_hest_header header; | ||
712 | u8 enabled; | ||
713 | u8 reserved; | ||
714 | }; | ||
715 | |||
716 | /* 5: IPF Corrected Platform Error */ | ||
717 | |||
718 | struct acpi_hest_ipf_corrected_platform { | ||
719 | struct acpi_hest_header header; | ||
720 | u8 enabled; | ||
721 | u8 reserved; | ||
722 | }; | ||
723 | 526 | ||
724 | /* 6: PCI Express Root Port AER */ | 527 | /* 6: PCI Express Root Port AER */ |
725 | 528 | ||
@@ -741,143 +544,61 @@ struct acpi_hest_aer { | |||
741 | struct acpi_hest_aer_bridge { | 544 | struct acpi_hest_aer_bridge { |
742 | struct acpi_hest_header header; | 545 | struct acpi_hest_header header; |
743 | struct acpi_hest_aer_common aer; | 546 | struct acpi_hest_aer_common aer; |
744 | u32 secondary_uncorrectable_error_mask; | 547 | u32 uncorrectable_mask2; |
745 | u32 secondary_uncorrectable_error_severity; | 548 | u32 uncorrectable_severity2; |
746 | u32 secondary_advanced_capabilities; | 549 | u32 advanced_capabilities2; |
747 | }; | 550 | }; |
748 | 551 | ||
749 | /* 9: Generic Hardware Error Source */ | 552 | /* 9: Generic Hardware Error Source */ |
750 | 553 | ||
751 | struct acpi_hest_generic { | 554 | struct acpi_hest_generic { |
752 | struct acpi_hest_header header; | 555 | struct acpi_hest_header header; |
753 | u16 source_id; | ||
754 | u16 related_source_id; | 556 | u16 related_source_id; |
755 | u8 config_write_enable; | 557 | u8 reserved; |
756 | u8 enabled; | 558 | u8 enabled; |
757 | u32 records_to_pre_allocate; | 559 | u32 records_to_preallocate; |
758 | u32 max_sections_per_record; | 560 | u32 max_sections_per_record; |
759 | u32 max_raw_data_length; | 561 | u32 max_raw_data_length; |
760 | struct acpi_generic_address error_status_address; | 562 | struct acpi_generic_address error_status_address; |
761 | struct acpi_hest_notify notify; | 563 | struct acpi_hest_notify notify; |
762 | u32 error_status_block_length; | 564 | u32 error_block_length; |
763 | }; | 565 | }; |
764 | 566 | ||
765 | /******************************************************************************* | 567 | /* Generic Error Status block */ |
766 | * | ||
767 | * HPET - High Precision Event Timer table | ||
768 | * | ||
769 | ******************************************************************************/ | ||
770 | 568 | ||
771 | struct acpi_table_hpet { | 569 | struct acpi_hest_generic_status { |
772 | struct acpi_table_header header; /* Common ACPI table header */ | 570 | u32 block_status; |
773 | u32 id; /* Hardware ID of event timer block */ | 571 | u32 raw_data_offset; |
774 | struct acpi_generic_address address; /* Address of event timer block */ | 572 | u32 raw_data_length; |
775 | u8 sequence; /* HPET sequence number */ | 573 | u32 data_length; |
776 | u16 minimum_tick; /* Main counter min tick, periodic mode */ | 574 | u32 error_severity; |
777 | u8 flags; | ||
778 | }; | 575 | }; |
779 | 576 | ||
780 | /*! Flags */ | 577 | /* Values for block_status flags above */ |
781 | 578 | ||
782 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ | 579 | #define ACPI_HEST_UNCORRECTABLE (1) |
783 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ | 580 | #define ACPI_HEST_CORRECTABLE (1<<1) |
784 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ | 581 | #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2) |
582 | #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3) | ||
583 | #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ | ||
785 | 584 | ||
786 | /*! [End] no source code translation !*/ | 585 | /* Generic Error Data entry */ |
787 | 586 | ||
788 | /******************************************************************************* | 587 | struct acpi_hest_generic_data { |
789 | * | 588 | u8 section_type[16]; |
790 | * IBFT - Boot Firmware Table | 589 | u32 error_severity; |
791 | * | 590 | u16 revision; |
792 | ******************************************************************************/ | 591 | u8 validation_bits; |
793 | |||
794 | struct acpi_table_ibft { | ||
795 | struct acpi_table_header header; /* Common ACPI table header */ | ||
796 | u8 reserved[12]; | ||
797 | }; | ||
798 | |||
799 | /* IBFT common subtable header */ | ||
800 | |||
801 | struct acpi_ibft_header { | ||
802 | u8 type; | ||
803 | u8 version; | ||
804 | u16 length; | ||
805 | u8 index; | ||
806 | u8 flags; | 592 | u8 flags; |
807 | }; | 593 | u32 error_data_length; |
808 | 594 | u8 fru_id[16]; | |
809 | /* Values for Type field above */ | 595 | u8 fru_text[20]; |
810 | |||
811 | enum acpi_ibft_type { | ||
812 | ACPI_IBFT_TYPE_NOT_USED = 0, | ||
813 | ACPI_IBFT_TYPE_CONTROL = 1, | ||
814 | ACPI_IBFT_TYPE_INITIATOR = 2, | ||
815 | ACPI_IBFT_TYPE_NIC = 3, | ||
816 | ACPI_IBFT_TYPE_TARGET = 4, | ||
817 | ACPI_IBFT_TYPE_EXTENSIONS = 5, | ||
818 | ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ | ||
819 | }; | ||
820 | |||
821 | /* IBFT subtables */ | ||
822 | |||
823 | struct acpi_ibft_control { | ||
824 | struct acpi_ibft_header header; | ||
825 | u16 extensions; | ||
826 | u16 initiator_offset; | ||
827 | u16 nic0_offset; | ||
828 | u16 target0_offset; | ||
829 | u16 nic1_offset; | ||
830 | u16 target1_offset; | ||
831 | }; | ||
832 | |||
833 | struct acpi_ibft_initiator { | ||
834 | struct acpi_ibft_header header; | ||
835 | u8 sns_server[16]; | ||
836 | u8 slp_server[16]; | ||
837 | u8 primary_server[16]; | ||
838 | u8 secondary_server[16]; | ||
839 | u16 name_length; | ||
840 | u16 name_offset; | ||
841 | }; | ||
842 | |||
843 | struct acpi_ibft_nic { | ||
844 | struct acpi_ibft_header header; | ||
845 | u8 ip_address[16]; | ||
846 | u8 subnet_mask_prefix; | ||
847 | u8 origin; | ||
848 | u8 gateway[16]; | ||
849 | u8 primary_dns[16]; | ||
850 | u8 secondary_dns[16]; | ||
851 | u8 dhcp[16]; | ||
852 | u16 vlan; | ||
853 | u8 mac_address[6]; | ||
854 | u16 pci_address; | ||
855 | u16 name_length; | ||
856 | u16 name_offset; | ||
857 | }; | ||
858 | |||
859 | struct acpi_ibft_target { | ||
860 | struct acpi_ibft_header header; | ||
861 | u8 target_ip_address[16]; | ||
862 | u16 target_ip_socket; | ||
863 | u8 target_boot_lun[8]; | ||
864 | u8 chap_type; | ||
865 | u8 nic_association; | ||
866 | u16 target_name_length; | ||
867 | u16 target_name_offset; | ||
868 | u16 chap_name_length; | ||
869 | u16 chap_name_offset; | ||
870 | u16 chap_secret_length; | ||
871 | u16 chap_secret_offset; | ||
872 | u16 reverse_chap_name_length; | ||
873 | u16 reverse_chap_name_offset; | ||
874 | u16 reverse_chap_secret_length; | ||
875 | u16 reverse_chap_secret_offset; | ||
876 | }; | 596 | }; |
877 | 597 | ||
878 | /******************************************************************************* | 598 | /******************************************************************************* |
879 | * | 599 | * |
880 | * MADT - Multiple APIC Description Table | 600 | * MADT - Multiple APIC Description Table |
601 | * Version 3 | ||
881 | * | 602 | * |
882 | ******************************************************************************/ | 603 | ******************************************************************************/ |
883 | 604 | ||
@@ -887,16 +608,16 @@ struct acpi_table_madt { | |||
887 | u32 flags; | 608 | u32 flags; |
888 | }; | 609 | }; |
889 | 610 | ||
890 | /* Flags */ | 611 | /* Masks for Flags field above */ |
891 | 612 | ||
892 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ | 613 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
893 | 614 | ||
894 | /* Values for PCATCompat flag */ | 615 | /* Values for PCATCompat flag */ |
895 | 616 | ||
896 | #define ACPI_MADT_DUAL_PIC 0 | 617 | #define ACPI_MADT_DUAL_PIC 0 |
897 | #define ACPI_MADT_MULTIPLE_APIC 1 | 618 | #define ACPI_MADT_MULTIPLE_APIC 1 |
898 | 619 | ||
899 | /* Values for subtable type in struct acpi_subtable_header */ | 620 | /* Values for MADT subtable type in struct acpi_subtable_header */ |
900 | 621 | ||
901 | enum acpi_madt_type { | 622 | enum acpi_madt_type { |
902 | ACPI_MADT_TYPE_LOCAL_APIC = 0, | 623 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
@@ -1007,11 +728,11 @@ struct acpi_madt_interrupt_source { | |||
1007 | u32 flags; /* Interrupt Source Flags */ | 728 | u32 flags; /* Interrupt Source Flags */ |
1008 | }; | 729 | }; |
1009 | 730 | ||
1010 | /* Flags field above */ | 731 | /* Masks for Flags field above */ |
1011 | 732 | ||
1012 | #define ACPI_MADT_CPEI_OVERRIDE (1) | 733 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
1013 | 734 | ||
1014 | /* 9: Processor Local X2_APIC (07/2008) */ | 735 | /* 9: Processor Local X2APIC (ACPI 4.0) */ |
1015 | 736 | ||
1016 | struct acpi_madt_local_x2apic { | 737 | struct acpi_madt_local_x2apic { |
1017 | struct acpi_subtable_header header; | 738 | struct acpi_subtable_header header; |
@@ -1021,7 +742,7 @@ struct acpi_madt_local_x2apic { | |||
1021 | u32 uid; /* ACPI processor UID */ | 742 | u32 uid; /* ACPI processor UID */ |
1022 | }; | 743 | }; |
1023 | 744 | ||
1024 | /* 10: Local X2APIC NMI (07/2008) */ | 745 | /* 10: Local X2APIC NMI (ACPI 4.0) */ |
1025 | 746 | ||
1026 | struct acpi_madt_local_x2apic_nmi { | 747 | struct acpi_madt_local_x2apic_nmi { |
1027 | struct acpi_subtable_header header; | 748 | struct acpi_subtable_header header; |
@@ -1058,28 +779,34 @@ struct acpi_madt_local_x2apic_nmi { | |||
1058 | 779 | ||
1059 | /******************************************************************************* | 780 | /******************************************************************************* |
1060 | * | 781 | * |
1061 | * MCFG - PCI Memory Mapped Configuration table and sub-table | 782 | * MSCT - Maximum System Characteristics Table (ACPI 4.0) |
783 | * Version 1 | ||
1062 | * | 784 | * |
1063 | ******************************************************************************/ | 785 | ******************************************************************************/ |
1064 | 786 | ||
1065 | struct acpi_table_mcfg { | 787 | struct acpi_table_msct { |
1066 | struct acpi_table_header header; /* Common ACPI table header */ | 788 | struct acpi_table_header header; /* Common ACPI table header */ |
1067 | u8 reserved[8]; | 789 | u32 proximity_offset; /* Location of proximity info struct(s) */ |
790 | u32 max_proximity_domains; /* Max number of proximity domains */ | ||
791 | u32 max_clock_domains; /* Max number of clock domains */ | ||
792 | u64 max_address; /* Max physical address in system */ | ||
1068 | }; | 793 | }; |
1069 | 794 | ||
1070 | /* Subtable */ | 795 | /* Subtable - Maximum Proximity Domain Information. Version 1 */ |
1071 | 796 | ||
1072 | struct acpi_mcfg_allocation { | 797 | struct acpi_msct_proximity { |
1073 | u64 address; /* Base address, processor-relative */ | 798 | u8 revision; |
1074 | u16 pci_segment; /* PCI segment group number */ | 799 | u8 length; |
1075 | u8 start_bus_number; /* Starting PCI Bus number */ | 800 | u32 range_start; /* Start of domain range */ |
1076 | u8 end_bus_number; /* Final PCI Bus number */ | 801 | u32 range_end; /* End of domain range */ |
1077 | u32 reserved; | 802 | u32 processor_capacity; |
803 | u64 memory_capacity; /* In bytes */ | ||
1078 | }; | 804 | }; |
1079 | 805 | ||
1080 | /******************************************************************************* | 806 | /******************************************************************************* |
1081 | * | 807 | * |
1082 | * SBST - Smart Battery Specification Table | 808 | * SBST - Smart Battery Specification Table |
809 | * Version 1 | ||
1083 | * | 810 | * |
1084 | ******************************************************************************/ | 811 | ******************************************************************************/ |
1085 | 812 | ||
@@ -1093,6 +820,7 @@ struct acpi_table_sbst { | |||
1093 | /******************************************************************************* | 820 | /******************************************************************************* |
1094 | * | 821 | * |
1095 | * SLIT - System Locality Distance Information Table | 822 | * SLIT - System Locality Distance Information Table |
823 | * Version 1 | ||
1096 | * | 824 | * |
1097 | ******************************************************************************/ | 825 | ******************************************************************************/ |
1098 | 826 | ||
@@ -1104,60 +832,8 @@ struct acpi_table_slit { | |||
1104 | 832 | ||
1105 | /******************************************************************************* | 833 | /******************************************************************************* |
1106 | * | 834 | * |
1107 | * SPCR - Serial Port Console Redirection table | ||
1108 | * | ||
1109 | ******************************************************************************/ | ||
1110 | |||
1111 | struct acpi_table_spcr { | ||
1112 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1113 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ | ||
1114 | u8 reserved[3]; | ||
1115 | struct acpi_generic_address serial_port; | ||
1116 | u8 interrupt_type; | ||
1117 | u8 pc_interrupt; | ||
1118 | u32 interrupt; | ||
1119 | u8 baud_rate; | ||
1120 | u8 parity; | ||
1121 | u8 stop_bits; | ||
1122 | u8 flow_control; | ||
1123 | u8 terminal_type; | ||
1124 | u8 reserved1; | ||
1125 | u16 pci_device_id; | ||
1126 | u16 pci_vendor_id; | ||
1127 | u8 pci_bus; | ||
1128 | u8 pci_device; | ||
1129 | u8 pci_function; | ||
1130 | u32 pci_flags; | ||
1131 | u8 pci_segment; | ||
1132 | u32 reserved2; | ||
1133 | }; | ||
1134 | |||
1135 | /******************************************************************************* | ||
1136 | * | ||
1137 | * SPMI - Server Platform Management Interface table | ||
1138 | * | ||
1139 | ******************************************************************************/ | ||
1140 | |||
1141 | struct acpi_table_spmi { | ||
1142 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1143 | u8 reserved; | ||
1144 | u8 interface_type; | ||
1145 | u16 spec_revision; /* Version of IPMI */ | ||
1146 | u8 interrupt_type; | ||
1147 | u8 gpe_number; /* GPE assigned */ | ||
1148 | u8 reserved1; | ||
1149 | u8 pci_device_flag; | ||
1150 | u32 interrupt; | ||
1151 | struct acpi_generic_address ipmi_register; | ||
1152 | u8 pci_segment; | ||
1153 | u8 pci_bus; | ||
1154 | u8 pci_device; | ||
1155 | u8 pci_function; | ||
1156 | }; | ||
1157 | |||
1158 | /******************************************************************************* | ||
1159 | * | ||
1160 | * SRAT - System Resource Affinity Table | 835 | * SRAT - System Resource Affinity Table |
836 | * Version 3 | ||
1161 | * | 837 | * |
1162 | ******************************************************************************/ | 838 | ******************************************************************************/ |
1163 | 839 | ||
@@ -1192,6 +868,10 @@ struct acpi_srat_cpu_affinity { | |||
1192 | u32 reserved; /* Reserved, must be zero */ | 868 | u32 reserved; /* Reserved, must be zero */ |
1193 | }; | 869 | }; |
1194 | 870 | ||
871 | /* Flags */ | ||
872 | |||
873 | #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ | ||
874 | |||
1195 | /* 1: Memory Affinity */ | 875 | /* 1: Memory Affinity */ |
1196 | 876 | ||
1197 | struct acpi_srat_mem_affinity { | 877 | struct acpi_srat_mem_affinity { |
@@ -1211,7 +891,7 @@ struct acpi_srat_mem_affinity { | |||
1211 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ | 891 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
1212 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ | 892 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ |
1213 | 893 | ||
1214 | /* 2: Processor Local X2_APIC Affinity (07/2008) */ | 894 | /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ |
1215 | 895 | ||
1216 | struct acpi_srat_x2apic_cpu_affinity { | 896 | struct acpi_srat_x2apic_cpu_affinity { |
1217 | struct acpi_subtable_header header; | 897 | struct acpi_subtable_header header; |
@@ -1219,122 +899,14 @@ struct acpi_srat_x2apic_cpu_affinity { | |||
1219 | u32 proximity_domain; | 899 | u32 proximity_domain; |
1220 | u32 apic_id; | 900 | u32 apic_id; |
1221 | u32 flags; | 901 | u32 flags; |
902 | u32 clock_domain; | ||
903 | u32 reserved2; | ||
1222 | }; | 904 | }; |
1223 | 905 | ||
1224 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ | 906 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
1225 | 907 | ||
1226 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ | 908 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
1227 | 909 | ||
1228 | /******************************************************************************* | ||
1229 | * | ||
1230 | * TCPA - Trusted Computing Platform Alliance table | ||
1231 | * | ||
1232 | ******************************************************************************/ | ||
1233 | |||
1234 | struct acpi_table_tcpa { | ||
1235 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1236 | u16 reserved; | ||
1237 | u32 max_log_length; /* Maximum length for the event log area */ | ||
1238 | u64 log_address; /* Address of the event log area */ | ||
1239 | }; | ||
1240 | |||
1241 | /******************************************************************************* | ||
1242 | * | ||
1243 | * UEFI - UEFI Boot optimization Table | ||
1244 | * | ||
1245 | ******************************************************************************/ | ||
1246 | |||
1247 | struct acpi_table_uefi { | ||
1248 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1249 | u8 identifier[16]; /* UUID identifier */ | ||
1250 | u16 data_offset; /* Offset of remaining data in table */ | ||
1251 | u8 data; | ||
1252 | }; | ||
1253 | |||
1254 | /******************************************************************************* | ||
1255 | * | ||
1256 | * WDAT - Watchdog Action Table | ||
1257 | * | ||
1258 | ******************************************************************************/ | ||
1259 | |||
1260 | struct acpi_table_wdat { | ||
1261 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1262 | u32 header_length; /* Watchdog Header Length */ | ||
1263 | u16 pci_segment; /* PCI Segment number */ | ||
1264 | u8 pci_bus; /* PCI Bus number */ | ||
1265 | u8 pci_device; /* PCI Device number */ | ||
1266 | u8 pci_function; /* PCI Function number */ | ||
1267 | u8 reserved[3]; | ||
1268 | u32 timer_period; /* Period of one timer count (msec) */ | ||
1269 | u32 max_count; /* Maximum counter value supported */ | ||
1270 | u32 min_count; /* Minimum counter value */ | ||
1271 | u8 flags; | ||
1272 | u8 reserved2[3]; | ||
1273 | u32 entries; /* Number of watchdog entries that follow */ | ||
1274 | }; | ||
1275 | |||
1276 | /* WDAT Instruction Entries (actions) */ | ||
1277 | |||
1278 | struct acpi_wdat_entry { | ||
1279 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ | ||
1280 | }; | ||
1281 | |||
1282 | /* Values for Action field above */ | ||
1283 | |||
1284 | enum acpi_wdat_actions { | ||
1285 | ACPI_WDAT_RESET = 1, | ||
1286 | ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, | ||
1287 | ACPI_WDAT_GET_COUNTDOWN = 5, | ||
1288 | ACPI_WDAT_SET_COUNTDOWN = 6, | ||
1289 | ACPI_WDAT_GET_RUNNING_STATE = 8, | ||
1290 | ACPI_WDAT_SET_RUNNING_STATE = 9, | ||
1291 | ACPI_WDAT_GET_STOPPED_STATE = 10, | ||
1292 | ACPI_WDAT_SET_STOPPED_STATE = 11, | ||
1293 | ACPI_WDAT_GET_REBOOT = 16, | ||
1294 | ACPI_WDAT_SET_REBOOT = 17, | ||
1295 | ACPI_WDAT_GET_SHUTDOWN = 18, | ||
1296 | ACPI_WDAT_SET_SHUTDOWN = 19, | ||
1297 | ACPI_WDAT_GET_STATUS = 32, | ||
1298 | ACPI_WDAT_SET_STATUS = 33, | ||
1299 | ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ | ||
1300 | }; | ||
1301 | |||
1302 | /* Values for Instruction field above */ | ||
1303 | |||
1304 | enum acpi_wdat_instructions { | ||
1305 | ACPI_WDAT_READ_VALUE = 0, | ||
1306 | ACPI_WDAT_READ_COUNTDOWN = 1, | ||
1307 | ACPI_WDAT_WRITE_VALUE = 2, | ||
1308 | ACPI_WDAT_WRITE_COUNTDOWN = 3, | ||
1309 | ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ | ||
1310 | ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ | ||
1311 | }; | ||
1312 | |||
1313 | /******************************************************************************* | ||
1314 | * | ||
1315 | * WDRT - Watchdog Resource Table | ||
1316 | * | ||
1317 | ******************************************************************************/ | ||
1318 | |||
1319 | struct acpi_table_wdrt { | ||
1320 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1321 | u32 header_length; /* Watchdog Header Length */ | ||
1322 | u8 pci_segment; /* PCI Segment number */ | ||
1323 | u8 pci_bus; /* PCI Bus number */ | ||
1324 | u8 pci_device; /* PCI Device number */ | ||
1325 | u8 pci_function; /* PCI Function number */ | ||
1326 | u32 timer_period; /* Period of one timer count (msec) */ | ||
1327 | u32 max_count; /* Maximum counter value supported */ | ||
1328 | u32 min_count; /* Minimum counter value */ | ||
1329 | u8 flags; | ||
1330 | u8 reserved[3]; | ||
1331 | u32 entries; /* Number of watchdog entries that follow */ | ||
1332 | }; | ||
1333 | |||
1334 | /* Flags */ | ||
1335 | |||
1336 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ | ||
1337 | |||
1338 | /* Reset to default packing */ | 910 | /* Reset to default packing */ |
1339 | 911 | ||
1340 | #pragma pack() | 912 | #pragma pack() |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h new file mode 100644 index 000000000000..6f3dce9991e1 --- /dev/null +++ b/include/acpi/actbl2.h | |||
@@ -0,0 +1,868 @@ | |||
1 | #ifndef __ACTBL2_H__ | ||
2 | #define __ACTBL2_H__ | ||
3 | |||
4 | /******************************************************************************* | ||
5 | * | ||
6 | * Additional ACPI Tables (2) | ||
7 | * | ||
8 | * These tables are not consumed directly by the ACPICA subsystem, but are | ||
9 | * included here to support device drivers and the AML disassembler. | ||
10 | * | ||
11 | * The tables in this file are defined by third-party specifications, and are | ||
12 | * not defined directly by the ACPI specification itself. | ||
13 | * | ||
14 | ******************************************************************************/ | ||
15 | |||
16 | /* | ||
17 | * Values for description table header signatures for tables defined in this | ||
18 | * file. Useful because they make it more difficult to inadvertently type in | ||
19 | * the wrong signature. | ||
20 | */ | ||
21 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ | ||
22 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ | ||
23 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ | ||
24 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ | ||
25 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ | ||
26 | #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ | ||
27 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ | ||
28 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | ||
29 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ | ||
30 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | ||
31 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | ||
32 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | ||
33 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ | ||
34 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ | ||
35 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ | ||
36 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ | ||
37 | |||
38 | /* | ||
39 | * All tables must be byte-packed to match the ACPI specification, since | ||
40 | * the tables are provided by the system BIOS. | ||
41 | */ | ||
42 | #pragma pack(1) | ||
43 | |||
44 | /* | ||
45 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | ||
46 | * This is the only type that is even remotely portable. Anything else is not | ||
47 | * portable, so do not use any other bitfield types. | ||
48 | */ | ||
49 | |||
50 | /******************************************************************************* | ||
51 | * | ||
52 | * ASF - Alert Standard Format table (Signature "ASF!") | ||
53 | * Revision 0x10 | ||
54 | * | ||
55 | * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 | ||
56 | * | ||
57 | ******************************************************************************/ | ||
58 | |||
59 | struct acpi_table_asf { | ||
60 | struct acpi_table_header header; /* Common ACPI table header */ | ||
61 | }; | ||
62 | |||
63 | /* ASF subtable header */ | ||
64 | |||
65 | struct acpi_asf_header { | ||
66 | u8 type; | ||
67 | u8 reserved; | ||
68 | u16 length; | ||
69 | }; | ||
70 | |||
71 | /* Values for Type field above */ | ||
72 | |||
73 | enum acpi_asf_type { | ||
74 | ACPI_ASF_TYPE_INFO = 0, | ||
75 | ACPI_ASF_TYPE_ALERT = 1, | ||
76 | ACPI_ASF_TYPE_CONTROL = 2, | ||
77 | ACPI_ASF_TYPE_BOOT = 3, | ||
78 | ACPI_ASF_TYPE_ADDRESS = 4, | ||
79 | ACPI_ASF_TYPE_RESERVED = 5 | ||
80 | }; | ||
81 | |||
82 | /* | ||
83 | * ASF subtables | ||
84 | */ | ||
85 | |||
86 | /* 0: ASF Information */ | ||
87 | |||
88 | struct acpi_asf_info { | ||
89 | struct acpi_asf_header header; | ||
90 | u8 min_reset_value; | ||
91 | u8 min_poll_interval; | ||
92 | u16 system_id; | ||
93 | u32 mfg_id; | ||
94 | u8 flags; | ||
95 | u8 reserved2[3]; | ||
96 | }; | ||
97 | |||
98 | /* Masks for Flags field above */ | ||
99 | |||
100 | #define ACPI_ASF_SMBUS_PROTOCOLS (1) | ||
101 | |||
102 | /* 1: ASF Alerts */ | ||
103 | |||
104 | struct acpi_asf_alert { | ||
105 | struct acpi_asf_header header; | ||
106 | u8 assert_mask; | ||
107 | u8 deassert_mask; | ||
108 | u8 alerts; | ||
109 | u8 data_length; | ||
110 | }; | ||
111 | |||
112 | struct acpi_asf_alert_data { | ||
113 | u8 address; | ||
114 | u8 command; | ||
115 | u8 mask; | ||
116 | u8 value; | ||
117 | u8 sensor_type; | ||
118 | u8 type; | ||
119 | u8 offset; | ||
120 | u8 source_type; | ||
121 | u8 severity; | ||
122 | u8 sensor_number; | ||
123 | u8 entity; | ||
124 | u8 instance; | ||
125 | }; | ||
126 | |||
127 | /* 2: ASF Remote Control */ | ||
128 | |||
129 | struct acpi_asf_remote { | ||
130 | struct acpi_asf_header header; | ||
131 | u8 controls; | ||
132 | u8 data_length; | ||
133 | u16 reserved2; | ||
134 | }; | ||
135 | |||
136 | struct acpi_asf_control_data { | ||
137 | u8 function; | ||
138 | u8 address; | ||
139 | u8 command; | ||
140 | u8 value; | ||
141 | }; | ||
142 | |||
143 | /* 3: ASF RMCP Boot Options */ | ||
144 | |||
145 | struct acpi_asf_rmcp { | ||
146 | struct acpi_asf_header header; | ||
147 | u8 capabilities[7]; | ||
148 | u8 completion_code; | ||
149 | u32 enterprise_id; | ||
150 | u8 command; | ||
151 | u16 parameter; | ||
152 | u16 boot_options; | ||
153 | u16 oem_parameters; | ||
154 | }; | ||
155 | |||
156 | /* 4: ASF Address */ | ||
157 | |||
158 | struct acpi_asf_address { | ||
159 | struct acpi_asf_header header; | ||
160 | u8 eprom_address; | ||
161 | u8 devices; | ||
162 | }; | ||
163 | |||
164 | /******************************************************************************* | ||
165 | * | ||
166 | * BOOT - Simple Boot Flag Table | ||
167 | * Version 1 | ||
168 | * | ||
169 | * Conforms to the "Simple Boot Flag Specification", Version 2.1 | ||
170 | * | ||
171 | ******************************************************************************/ | ||
172 | |||
173 | struct acpi_table_boot { | ||
174 | struct acpi_table_header header; /* Common ACPI table header */ | ||
175 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ | ||
176 | u8 reserved[3]; | ||
177 | }; | ||
178 | |||
179 | /******************************************************************************* | ||
180 | * | ||
181 | * DBGP - Debug Port table | ||
182 | * Version 1 | ||
183 | * | ||
184 | * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000 | ||
185 | * | ||
186 | ******************************************************************************/ | ||
187 | |||
188 | struct acpi_table_dbgp { | ||
189 | struct acpi_table_header header; /* Common ACPI table header */ | ||
190 | u8 type; /* 0=full 16550, 1=subset of 16550 */ | ||
191 | u8 reserved[3]; | ||
192 | struct acpi_generic_address debug_port; | ||
193 | }; | ||
194 | |||
195 | /******************************************************************************* | ||
196 | * | ||
197 | * DMAR - DMA Remapping table | ||
198 | * Version 1 | ||
199 | * | ||
200 | * Conforms to "Intel Virtualization Technology for Directed I/O", | ||
201 | * Version 1.2, Sept. 2008 | ||
202 | * | ||
203 | ******************************************************************************/ | ||
204 | |||
205 | struct acpi_table_dmar { | ||
206 | struct acpi_table_header header; /* Common ACPI table header */ | ||
207 | u8 width; /* Host Address Width */ | ||
208 | u8 flags; | ||
209 | u8 reserved[10]; | ||
210 | }; | ||
211 | |||
212 | /* Masks for Flags field above */ | ||
213 | |||
214 | #define ACPI_DMAR_INTR_REMAP (1) | ||
215 | |||
216 | /* DMAR subtable header */ | ||
217 | |||
218 | struct acpi_dmar_header { | ||
219 | u16 type; | ||
220 | u16 length; | ||
221 | }; | ||
222 | |||
223 | /* Values for subtable type in struct acpi_dmar_header */ | ||
224 | |||
225 | enum acpi_dmar_type { | ||
226 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, | ||
227 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, | ||
228 | ACPI_DMAR_TYPE_ATSR = 2, | ||
229 | ACPI_DMAR_HARDWARE_AFFINITY = 3, | ||
230 | ACPI_DMAR_TYPE_RESERVED = 4 /* 4 and greater are reserved */ | ||
231 | }; | ||
232 | |||
233 | /* DMAR Device Scope structure */ | ||
234 | |||
235 | struct acpi_dmar_device_scope { | ||
236 | u8 entry_type; | ||
237 | u8 length; | ||
238 | u16 reserved; | ||
239 | u8 enumeration_id; | ||
240 | u8 bus; | ||
241 | }; | ||
242 | |||
243 | /* Values for entry_type in struct acpi_dmar_device_scope */ | ||
244 | |||
245 | enum acpi_dmar_scope_type { | ||
246 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, | ||
247 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, | ||
248 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, | ||
249 | ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, | ||
250 | ACPI_DMAR_SCOPE_TYPE_HPET = 4, | ||
251 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */ | ||
252 | }; | ||
253 | |||
254 | struct acpi_dmar_pci_path { | ||
255 | u8 dev; | ||
256 | u8 fn; | ||
257 | }; | ||
258 | |||
259 | /* | ||
260 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header | ||
261 | */ | ||
262 | |||
263 | /* 0: Hardware Unit Definition */ | ||
264 | |||
265 | struct acpi_dmar_hardware_unit { | ||
266 | struct acpi_dmar_header header; | ||
267 | u8 flags; | ||
268 | u8 reserved; | ||
269 | u16 segment; | ||
270 | u64 address; /* Register Base Address */ | ||
271 | }; | ||
272 | |||
273 | /* Masks for Flags field above */ | ||
274 | |||
275 | #define ACPI_DMAR_INCLUDE_ALL (1) | ||
276 | |||
277 | /* 1: Reserved Memory Defininition */ | ||
278 | |||
279 | struct acpi_dmar_reserved_memory { | ||
280 | struct acpi_dmar_header header; | ||
281 | u16 reserved; | ||
282 | u16 segment; | ||
283 | u64 base_address; /* 4_k aligned base address */ | ||
284 | u64 end_address; /* 4_k aligned limit address */ | ||
285 | }; | ||
286 | |||
287 | /* Masks for Flags field above */ | ||
288 | |||
289 | #define ACPI_DMAR_ALLOW_ALL (1) | ||
290 | |||
291 | /* 2: Root Port ATS Capability Reporting Structure */ | ||
292 | |||
293 | struct acpi_dmar_atsr { | ||
294 | struct acpi_dmar_header header; | ||
295 | u8 flags; | ||
296 | u8 reserved; | ||
297 | u16 segment; | ||
298 | }; | ||
299 | |||
300 | /* Masks for Flags field above */ | ||
301 | |||
302 | #define ACPI_DMAR_ALL_PORTS (1) | ||
303 | |||
304 | /* 3: Remapping Hardware Static Affinity Structure */ | ||
305 | |||
306 | struct acpi_dmar_rhsa { | ||
307 | struct acpi_dmar_header header; | ||
308 | u32 reserved; | ||
309 | u64 base_address; | ||
310 | u32 proximity_domain; | ||
311 | }; | ||
312 | |||
313 | /******************************************************************************* | ||
314 | * | ||
315 | * HPET - High Precision Event Timer table | ||
316 | * Version 1 | ||
317 | * | ||
318 | * Conforms to "IA-PC HPET (High Precision Event Timers) Specification", | ||
319 | * Version 1.0a, October 2004 | ||
320 | * | ||
321 | ******************************************************************************/ | ||
322 | |||
323 | struct acpi_table_hpet { | ||
324 | struct acpi_table_header header; /* Common ACPI table header */ | ||
325 | u32 id; /* Hardware ID of event timer block */ | ||
326 | struct acpi_generic_address address; /* Address of event timer block */ | ||
327 | u8 sequence; /* HPET sequence number */ | ||
328 | u16 minimum_tick; /* Main counter min tick, periodic mode */ | ||
329 | u8 flags; | ||
330 | }; | ||
331 | |||
332 | /* Masks for Flags field above */ | ||
333 | |||
334 | #define ACPI_HPET_PAGE_PROTECT_MASK (3) | ||
335 | |||
336 | /* Values for Page Protect flags */ | ||
337 | |||
338 | enum acpi_hpet_page_protect { | ||
339 | ACPI_HPET_NO_PAGE_PROTECT = 0, | ||
340 | ACPI_HPET_PAGE_PROTECT4 = 1, | ||
341 | ACPI_HPET_PAGE_PROTECT64 = 2 | ||
342 | }; | ||
343 | |||
344 | /******************************************************************************* | ||
345 | * | ||
346 | * IBFT - Boot Firmware Table | ||
347 | * Version 1 | ||
348 | * | ||
349 | * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b | ||
350 | * Specification", Version 1.01, March 1, 2007 | ||
351 | * | ||
352 | * Note: It appears that this table is not intended to appear in the RSDT/XSDT. | ||
353 | * Therefore, it is not currently supported by the disassembler. | ||
354 | * | ||
355 | ******************************************************************************/ | ||
356 | |||
357 | struct acpi_table_ibft { | ||
358 | struct acpi_table_header header; /* Common ACPI table header */ | ||
359 | u8 reserved[12]; | ||
360 | }; | ||
361 | |||
362 | /* IBFT common subtable header */ | ||
363 | |||
364 | struct acpi_ibft_header { | ||
365 | u8 type; | ||
366 | u8 version; | ||
367 | u16 length; | ||
368 | u8 index; | ||
369 | u8 flags; | ||
370 | }; | ||
371 | |||
372 | /* Values for Type field above */ | ||
373 | |||
374 | enum acpi_ibft_type { | ||
375 | ACPI_IBFT_TYPE_NOT_USED = 0, | ||
376 | ACPI_IBFT_TYPE_CONTROL = 1, | ||
377 | ACPI_IBFT_TYPE_INITIATOR = 2, | ||
378 | ACPI_IBFT_TYPE_NIC = 3, | ||
379 | ACPI_IBFT_TYPE_TARGET = 4, | ||
380 | ACPI_IBFT_TYPE_EXTENSIONS = 5, | ||
381 | ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ | ||
382 | }; | ||
383 | |||
384 | /* IBFT subtables */ | ||
385 | |||
386 | struct acpi_ibft_control { | ||
387 | struct acpi_ibft_header header; | ||
388 | u16 extensions; | ||
389 | u16 initiator_offset; | ||
390 | u16 nic0_offset; | ||
391 | u16 target0_offset; | ||
392 | u16 nic1_offset; | ||
393 | u16 target1_offset; | ||
394 | }; | ||
395 | |||
396 | struct acpi_ibft_initiator { | ||
397 | struct acpi_ibft_header header; | ||
398 | u8 sns_server[16]; | ||
399 | u8 slp_server[16]; | ||
400 | u8 primary_server[16]; | ||
401 | u8 secondary_server[16]; | ||
402 | u16 name_length; | ||
403 | u16 name_offset; | ||
404 | }; | ||
405 | |||
406 | struct acpi_ibft_nic { | ||
407 | struct acpi_ibft_header header; | ||
408 | u8 ip_address[16]; | ||
409 | u8 subnet_mask_prefix; | ||
410 | u8 origin; | ||
411 | u8 gateway[16]; | ||
412 | u8 primary_dns[16]; | ||
413 | u8 secondary_dns[16]; | ||
414 | u8 dhcp[16]; | ||
415 | u16 vlan; | ||
416 | u8 mac_address[6]; | ||
417 | u16 pci_address; | ||
418 | u16 name_length; | ||
419 | u16 name_offset; | ||
420 | }; | ||
421 | |||
422 | struct acpi_ibft_target { | ||
423 | struct acpi_ibft_header header; | ||
424 | u8 target_ip_address[16]; | ||
425 | u16 target_ip_socket; | ||
426 | u8 target_boot_lun[8]; | ||
427 | u8 chap_type; | ||
428 | u8 nic_association; | ||
429 | u16 target_name_length; | ||
430 | u16 target_name_offset; | ||
431 | u16 chap_name_length; | ||
432 | u16 chap_name_offset; | ||
433 | u16 chap_secret_length; | ||
434 | u16 chap_secret_offset; | ||
435 | u16 reverse_chap_name_length; | ||
436 | u16 reverse_chap_name_offset; | ||
437 | u16 reverse_chap_secret_length; | ||
438 | u16 reverse_chap_secret_offset; | ||
439 | }; | ||
440 | |||
441 | /******************************************************************************* | ||
442 | * | ||
443 | * IVRS - I/O Virtualization Reporting Structure | ||
444 | * Version 1 | ||
445 | * | ||
446 | * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification", | ||
447 | * Revision 1.26, February 2009. | ||
448 | * | ||
449 | ******************************************************************************/ | ||
450 | |||
451 | struct acpi_table_ivrs { | ||
452 | struct acpi_table_header header; /* Common ACPI table header */ | ||
453 | u32 info; /* Common virtualization info */ | ||
454 | u64 reserved; | ||
455 | }; | ||
456 | |||
457 | /* Values for Info field above */ | ||
458 | |||
459 | #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ | ||
460 | #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ | ||
461 | #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ | ||
462 | |||
463 | /* IVRS subtable header */ | ||
464 | |||
465 | struct acpi_ivrs_header { | ||
466 | u8 type; /* Subtable type */ | ||
467 | u8 flags; | ||
468 | u16 length; /* Subtable length */ | ||
469 | u16 device_id; /* ID of IOMMU */ | ||
470 | }; | ||
471 | |||
472 | /* Values for subtable Type above */ | ||
473 | |||
474 | enum acpi_ivrs_type { | ||
475 | ACPI_IVRS_TYPE_HARDWARE = 0x10, | ||
476 | ACPI_IVRS_TYPE_MEMORY1 = 0x20, | ||
477 | ACPI_IVRS_TYPE_MEMORY2 = 0x21, | ||
478 | ACPI_IVRS_TYPE_MEMORY3 = 0x22 | ||
479 | }; | ||
480 | |||
481 | /* Masks for Flags field above for IVHD subtable */ | ||
482 | |||
483 | #define ACPI_IVHD_TT_ENABLE (1) | ||
484 | #define ACPI_IVHD_PASS_PW (1<<1) | ||
485 | #define ACPI_IVHD_RES_PASS_PW (1<<2) | ||
486 | #define ACPI_IVHD_ISOC (1<<3) | ||
487 | #define ACPI_IVHD_IOTLB (1<<4) | ||
488 | |||
489 | /* Masks for Flags field above for IVMD subtable */ | ||
490 | |||
491 | #define ACPI_IVMD_UNITY (1) | ||
492 | #define ACPI_IVMD_READ (1<<1) | ||
493 | #define ACPI_IVMD_WRITE (1<<2) | ||
494 | #define ACPI_IVMD_EXCLUSION_RANGE (1<<3) | ||
495 | |||
496 | /* | ||
497 | * IVRS subtables, correspond to Type in struct acpi_ivrs_header | ||
498 | */ | ||
499 | |||
500 | /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ | ||
501 | |||
502 | struct acpi_ivrs_hardware { | ||
503 | struct acpi_ivrs_header header; | ||
504 | u16 capability_offset; /* Offset for IOMMU control fields */ | ||
505 | u64 base_address; /* IOMMU control registers */ | ||
506 | u16 pci_segment_group; | ||
507 | u16 info; /* MSI number and unit ID */ | ||
508 | u32 reserved; | ||
509 | }; | ||
510 | |||
511 | /* Masks for Info field above */ | ||
512 | |||
513 | #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ | ||
514 | #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_iD */ | ||
515 | |||
516 | /* | ||
517 | * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure. | ||
518 | * Upper two bits of the Type field are the (encoded) length of the structure. | ||
519 | * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries | ||
520 | * are reserved for future use but not defined. | ||
521 | */ | ||
522 | struct acpi_ivrs_de_header { | ||
523 | u8 type; | ||
524 | u16 id; | ||
525 | u8 data_setting; | ||
526 | }; | ||
527 | |||
528 | /* Length of device entry is in the top two bits of Type field above */ | ||
529 | |||
530 | #define ACPI_IVHD_ENTRY_LENGTH 0xC0 | ||
531 | |||
532 | /* Values for device entry Type field above */ | ||
533 | |||
534 | enum acpi_ivrs_device_entry_type { | ||
535 | /* 4-byte device entries, all use struct acpi_ivrs_device4 */ | ||
536 | |||
537 | ACPI_IVRS_TYPE_PAD4 = 0, | ||
538 | ACPI_IVRS_TYPE_ALL = 1, | ||
539 | ACPI_IVRS_TYPE_SELECT = 2, | ||
540 | ACPI_IVRS_TYPE_START = 3, | ||
541 | ACPI_IVRS_TYPE_END = 4, | ||
542 | |||
543 | /* 8-byte device entries */ | ||
544 | |||
545 | ACPI_IVRS_TYPE_PAD8 = 64, | ||
546 | ACPI_IVRS_TYPE_NOT_USED = 65, | ||
547 | ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */ | ||
548 | ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */ | ||
549 | ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */ | ||
550 | ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */ | ||
551 | ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses struct acpi_ivrs_device8c */ | ||
552 | }; | ||
553 | |||
554 | /* Values for Data field above */ | ||
555 | |||
556 | #define ACPI_IVHD_INIT_PASS (1) | ||
557 | #define ACPI_IVHD_EINT_PASS (1<<1) | ||
558 | #define ACPI_IVHD_NMI_PASS (1<<2) | ||
559 | #define ACPI_IVHD_SYSTEM_MGMT (3<<4) | ||
560 | #define ACPI_IVHD_LINT0_PASS (1<<6) | ||
561 | #define ACPI_IVHD_LINT1_PASS (1<<7) | ||
562 | |||
563 | /* Types 0-4: 4-byte device entry */ | ||
564 | |||
565 | struct acpi_ivrs_device4 { | ||
566 | struct acpi_ivrs_de_header header; | ||
567 | }; | ||
568 | |||
569 | /* Types 66-67: 8-byte device entry */ | ||
570 | |||
571 | struct acpi_ivrs_device8a { | ||
572 | struct acpi_ivrs_de_header header; | ||
573 | u8 reserved1; | ||
574 | u16 used_id; | ||
575 | u8 reserved2; | ||
576 | }; | ||
577 | |||
578 | /* Types 70-71: 8-byte device entry */ | ||
579 | |||
580 | struct acpi_ivrs_device8b { | ||
581 | struct acpi_ivrs_de_header header; | ||
582 | u32 extended_data; | ||
583 | }; | ||
584 | |||
585 | /* Values for extended_data above */ | ||
586 | |||
587 | #define ACPI_IVHD_ATS_DISABLED (1<<31) | ||
588 | |||
589 | /* Type 72: 8-byte device entry */ | ||
590 | |||
591 | struct acpi_ivrs_device8c { | ||
592 | struct acpi_ivrs_de_header header; | ||
593 | u8 handle; | ||
594 | u16 used_id; | ||
595 | u8 variety; | ||
596 | }; | ||
597 | |||
598 | /* Values for Variety field above */ | ||
599 | |||
600 | #define ACPI_IVHD_IOAPIC 1 | ||
601 | #define ACPI_IVHD_HPET 2 | ||
602 | |||
603 | /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ | ||
604 | |||
605 | struct acpi_ivrs_memory { | ||
606 | struct acpi_ivrs_header header; | ||
607 | u16 aux_data; | ||
608 | u64 reserved; | ||
609 | u64 start_address; | ||
610 | u64 memory_length; | ||
611 | }; | ||
612 | |||
613 | /******************************************************************************* | ||
614 | * | ||
615 | * MCFG - PCI Memory Mapped Configuration table and sub-table | ||
616 | * Version 1 | ||
617 | * | ||
618 | * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005 | ||
619 | * | ||
620 | ******************************************************************************/ | ||
621 | |||
622 | struct acpi_table_mcfg { | ||
623 | struct acpi_table_header header; /* Common ACPI table header */ | ||
624 | u8 reserved[8]; | ||
625 | }; | ||
626 | |||
627 | /* Subtable */ | ||
628 | |||
629 | struct acpi_mcfg_allocation { | ||
630 | u64 address; /* Base address, processor-relative */ | ||
631 | u16 pci_segment; /* PCI segment group number */ | ||
632 | u8 start_bus_number; /* Starting PCI Bus number */ | ||
633 | u8 end_bus_number; /* Final PCI Bus number */ | ||
634 | u32 reserved; | ||
635 | }; | ||
636 | |||
637 | /******************************************************************************* | ||
638 | * | ||
639 | * SPCR - Serial Port Console Redirection table | ||
640 | * Version 1 | ||
641 | * | ||
642 | * Conforms to "Serial Port Console Redirection Table", | ||
643 | * Version 1.00, January 11, 2002 | ||
644 | * | ||
645 | ******************************************************************************/ | ||
646 | |||
647 | struct acpi_table_spcr { | ||
648 | struct acpi_table_header header; /* Common ACPI table header */ | ||
649 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ | ||
650 | u8 reserved[3]; | ||
651 | struct acpi_generic_address serial_port; | ||
652 | u8 interrupt_type; | ||
653 | u8 pc_interrupt; | ||
654 | u32 interrupt; | ||
655 | u8 baud_rate; | ||
656 | u8 parity; | ||
657 | u8 stop_bits; | ||
658 | u8 flow_control; | ||
659 | u8 terminal_type; | ||
660 | u8 reserved1; | ||
661 | u16 pci_device_id; | ||
662 | u16 pci_vendor_id; | ||
663 | u8 pci_bus; | ||
664 | u8 pci_device; | ||
665 | u8 pci_function; | ||
666 | u32 pci_flags; | ||
667 | u8 pci_segment; | ||
668 | u32 reserved2; | ||
669 | }; | ||
670 | |||
671 | /* Masks for pci_flags field above */ | ||
672 | |||
673 | #define ACPI_SPCR_DO_NOT_DISABLE (1) | ||
674 | |||
675 | /******************************************************************************* | ||
676 | * | ||
677 | * SPMI - Server Platform Management Interface table | ||
678 | * Version 5 | ||
679 | * | ||
680 | * Conforms to "Intelligent Platform Management Interface Specification | ||
681 | * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with | ||
682 | * June 12, 2009 markup. | ||
683 | * | ||
684 | ******************************************************************************/ | ||
685 | |||
686 | struct acpi_table_spmi { | ||
687 | struct acpi_table_header header; /* Common ACPI table header */ | ||
688 | u8 interface_type; | ||
689 | u8 reserved; /* Must be 1 */ | ||
690 | u16 spec_revision; /* Version of IPMI */ | ||
691 | u8 interrupt_type; | ||
692 | u8 gpe_number; /* GPE assigned */ | ||
693 | u8 reserved1; | ||
694 | u8 pci_device_flag; | ||
695 | u32 interrupt; | ||
696 | struct acpi_generic_address ipmi_register; | ||
697 | u8 pci_segment; | ||
698 | u8 pci_bus; | ||
699 | u8 pci_device; | ||
700 | u8 pci_function; | ||
701 | u8 reserved2; | ||
702 | }; | ||
703 | |||
704 | /* Values for interface_type above */ | ||
705 | |||
706 | enum acpi_spmi_interface_types { | ||
707 | ACPI_SPMI_NOT_USED = 0, | ||
708 | ACPI_SPMI_KEYBOARD = 1, | ||
709 | ACPI_SPMI_SMI = 2, | ||
710 | ACPI_SPMI_BLOCK_TRANSFER = 3, | ||
711 | ACPI_SPMI_SMBUS = 4, | ||
712 | ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ | ||
713 | }; | ||
714 | |||
715 | /******************************************************************************* | ||
716 | * | ||
717 | * TCPA - Trusted Computing Platform Alliance table | ||
718 | * Version 1 | ||
719 | * | ||
720 | * Conforms to "TCG PC Specific Implementation Specification", | ||
721 | * Version 1.1, August 18, 2003 | ||
722 | * | ||
723 | ******************************************************************************/ | ||
724 | |||
725 | struct acpi_table_tcpa { | ||
726 | struct acpi_table_header header; /* Common ACPI table header */ | ||
727 | u16 reserved; | ||
728 | u32 max_log_length; /* Maximum length for the event log area */ | ||
729 | u64 log_address; /* Address of the event log area */ | ||
730 | }; | ||
731 | |||
732 | /******************************************************************************* | ||
733 | * | ||
734 | * UEFI - UEFI Boot optimization Table | ||
735 | * Version 1 | ||
736 | * | ||
737 | * Conforms to "Unified Extensible Firmware Interface Specification", | ||
738 | * Version 2.3, May 8, 2009 | ||
739 | * | ||
740 | ******************************************************************************/ | ||
741 | |||
742 | struct acpi_table_uefi { | ||
743 | struct acpi_table_header header; /* Common ACPI table header */ | ||
744 | u8 identifier[16]; /* UUID identifier */ | ||
745 | u16 data_offset; /* Offset of remaining data in table */ | ||
746 | }; | ||
747 | |||
748 | /******************************************************************************* | ||
749 | * | ||
750 | * WAET - Windows ACPI Emulated devices Table | ||
751 | * Version 1 | ||
752 | * | ||
753 | * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 | ||
754 | * | ||
755 | ******************************************************************************/ | ||
756 | |||
757 | struct acpi_table_waet { | ||
758 | struct acpi_table_header header; /* Common ACPI table header */ | ||
759 | u32 flags; | ||
760 | }; | ||
761 | |||
762 | /* Masks for Flags field above */ | ||
763 | |||
764 | #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ | ||
765 | #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ | ||
766 | |||
767 | /******************************************************************************* | ||
768 | * | ||
769 | * WDAT - Watchdog Action Table | ||
770 | * Version 1 | ||
771 | * | ||
772 | * Conforms to "Hardware Watchdog Timers Design Specification", | ||
773 | * Copyright 2006 Microsoft Corporation. | ||
774 | * | ||
775 | ******************************************************************************/ | ||
776 | |||
777 | struct acpi_table_wdat { | ||
778 | struct acpi_table_header header; /* Common ACPI table header */ | ||
779 | u32 header_length; /* Watchdog Header Length */ | ||
780 | u16 pci_segment; /* PCI Segment number */ | ||
781 | u8 pci_bus; /* PCI Bus number */ | ||
782 | u8 pci_device; /* PCI Device number */ | ||
783 | u8 pci_function; /* PCI Function number */ | ||
784 | u8 reserved[3]; | ||
785 | u32 timer_period; /* Period of one timer count (msec) */ | ||
786 | u32 max_count; /* Maximum counter value supported */ | ||
787 | u32 min_count; /* Minimum counter value */ | ||
788 | u8 flags; | ||
789 | u8 reserved2[3]; | ||
790 | u32 entries; /* Number of watchdog entries that follow */ | ||
791 | }; | ||
792 | |||
793 | /* Masks for Flags field above */ | ||
794 | |||
795 | #define ACPI_WDAT_ENABLED (1) | ||
796 | #define ACPI_WDAT_STOPPED 0x80 | ||
797 | |||
798 | /* WDAT Instruction Entries (actions) */ | ||
799 | |||
800 | struct acpi_wdat_entry { | ||
801 | u8 action; | ||
802 | u8 instruction; | ||
803 | u16 reserved; | ||
804 | struct acpi_generic_address register_region; | ||
805 | u32 value; /* Value used with Read/Write register */ | ||
806 | u32 mask; /* Bitmask required for this register instruction */ | ||
807 | }; | ||
808 | |||
809 | /* Values for Action field above */ | ||
810 | |||
811 | enum acpi_wdat_actions { | ||
812 | ACPI_WDAT_RESET = 1, | ||
813 | ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, | ||
814 | ACPI_WDAT_GET_COUNTDOWN = 5, | ||
815 | ACPI_WDAT_SET_COUNTDOWN = 6, | ||
816 | ACPI_WDAT_GET_RUNNING_STATE = 8, | ||
817 | ACPI_WDAT_SET_RUNNING_STATE = 9, | ||
818 | ACPI_WDAT_GET_STOPPED_STATE = 10, | ||
819 | ACPI_WDAT_SET_STOPPED_STATE = 11, | ||
820 | ACPI_WDAT_GET_REBOOT = 16, | ||
821 | ACPI_WDAT_SET_REBOOT = 17, | ||
822 | ACPI_WDAT_GET_SHUTDOWN = 18, | ||
823 | ACPI_WDAT_SET_SHUTDOWN = 19, | ||
824 | ACPI_WDAT_GET_STATUS = 32, | ||
825 | ACPI_WDAT_SET_STATUS = 33, | ||
826 | ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ | ||
827 | }; | ||
828 | |||
829 | /* Values for Instruction field above */ | ||
830 | |||
831 | enum acpi_wdat_instructions { | ||
832 | ACPI_WDAT_READ_VALUE = 0, | ||
833 | ACPI_WDAT_READ_COUNTDOWN = 1, | ||
834 | ACPI_WDAT_WRITE_VALUE = 2, | ||
835 | ACPI_WDAT_WRITE_COUNTDOWN = 3, | ||
836 | ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ | ||
837 | ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ | ||
838 | }; | ||
839 | |||
840 | /******************************************************************************* | ||
841 | * | ||
842 | * WDRT - Watchdog Resource Table | ||
843 | * Version 1 | ||
844 | * | ||
845 | * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", | ||
846 | * Version 1.01, August 28, 2006 | ||
847 | * | ||
848 | ******************************************************************************/ | ||
849 | |||
850 | struct acpi_table_wdrt { | ||
851 | struct acpi_table_header header; /* Common ACPI table header */ | ||
852 | struct acpi_generic_address control_register; | ||
853 | struct acpi_generic_address count_register; | ||
854 | u16 pci_device_id; | ||
855 | u16 pci_vendor_id; | ||
856 | u8 pci_bus; /* PCI Bus number */ | ||
857 | u8 pci_device; /* PCI Device number */ | ||
858 | u8 pci_function; /* PCI Function number */ | ||
859 | u8 pci_segment; /* PCI Segment number */ | ||
860 | u16 max_count; /* Maximum counter value supported */ | ||
861 | u8 units; | ||
862 | }; | ||
863 | |||
864 | /* Reset to default packing */ | ||
865 | |||
866 | #pragma pack() | ||
867 | |||
868 | #endif /* __ACTBL2_H__ */ | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 8052236d1a3d..153f12dc3373 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -338,7 +338,7 @@ typedef u32 acpi_physical_address; | |||
338 | 338 | ||
339 | /* PM Timer ticks per second (HZ) */ | 339 | /* PM Timer ticks per second (HZ) */ |
340 | 340 | ||
341 | #define PM_TIMER_FREQUENCY 3579545 | 341 | #define PM_TIMER_FREQUENCY 3579545 |
342 | 342 | ||
343 | /******************************************************************************* | 343 | /******************************************************************************* |
344 | * | 344 | * |
@@ -732,7 +732,8 @@ typedef u8 acpi_adr_space_type; | |||
732 | #define ACPI_ADR_SPACE_SMBUS (acpi_adr_space_type) 4 | 732 | #define ACPI_ADR_SPACE_SMBUS (acpi_adr_space_type) 4 |
733 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 | 733 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 |
734 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 | 734 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 |
735 | #define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 7 | 735 | #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 |
736 | #define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 8 | ||
736 | #define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 127 | 737 | #define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 127 |
737 | 738 | ||
738 | /* | 739 | /* |
@@ -921,7 +922,7 @@ typedef | |||
921 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); | 922 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); |
922 | 923 | ||
923 | typedef | 924 | typedef |
924 | void (*acpi_object_handler) (acpi_handle object, u32 function, void *data); | 925 | void (*acpi_object_handler) (acpi_handle object, void *data); |
925 | 926 | ||
926 | typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 function); | 927 | typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 function); |
927 | 928 | ||
@@ -969,38 +970,60 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, | |||
969 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 | 970 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 |
970 | #define ACPI_INTERRUPT_HANDLED 0x01 | 971 | #define ACPI_INTERRUPT_HANDLED 0x01 |
971 | 972 | ||
972 | /* Length of _HID, _UID, _CID, and UUID values */ | 973 | /* Length of 32-bit EISAID values when converted back to a string */ |
974 | |||
975 | #define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ | ||
976 | |||
977 | /* Length of UUID (string) values */ | ||
973 | 978 | ||
974 | #define ACPI_DEVICE_ID_LENGTH 0x09 | ||
975 | #define ACPI_MAX_CID_LENGTH 48 | ||
976 | #define ACPI_UUID_LENGTH 16 | 979 | #define ACPI_UUID_LENGTH 16 |
977 | 980 | ||
978 | /* Common string version of device HIDs and UIDs */ | 981 | /* Structures used for device/processor HID, UID, CID */ |
979 | 982 | ||
980 | struct acpica_device_id { | 983 | struct acpica_device_id { |
981 | char value[ACPI_DEVICE_ID_LENGTH]; | 984 | u32 length; /* Length of string + null */ |
985 | char *string; | ||
982 | }; | 986 | }; |
983 | 987 | ||
984 | /* Common string version of device CIDs */ | 988 | struct acpica_device_id_list { |
985 | 989 | u32 count; /* Number of IDs in Ids array */ | |
986 | struct acpi_compatible_id { | 990 | u32 list_size; /* Size of list, including ID strings */ |
987 | char value[ACPI_MAX_CID_LENGTH]; | 991 | struct acpica_device_id ids[1]; /* ID array */ |
988 | }; | 992 | }; |
989 | 993 | ||
990 | struct acpi_compatible_id_list { | 994 | /* |
991 | u32 count; | 995 | * Structure returned from acpi_get_object_info. |
992 | u32 size; | 996 | * Optimized for both 32- and 64-bit builds |
993 | struct acpi_compatible_id id[1]; | 997 | */ |
998 | struct acpi_device_info { | ||
999 | u32 info_size; /* Size of info, including ID strings */ | ||
1000 | u32 name; /* ACPI object Name */ | ||
1001 | acpi_object_type type; /* ACPI object Type */ | ||
1002 | u8 param_count; /* If a method, required parameter count */ | ||
1003 | u8 valid; /* Indicates which optional fields are valid */ | ||
1004 | u8 flags; /* Miscellaneous info */ | ||
1005 | u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ | ||
1006 | u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ | ||
1007 | u32 current_status; /* _STA value */ | ||
1008 | acpi_integer address; /* _ADR value */ | ||
1009 | struct acpica_device_id hardware_id; /* _HID value */ | ||
1010 | struct acpica_device_id unique_id; /* _UID value */ | ||
1011 | struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */ | ||
994 | }; | 1012 | }; |
995 | 1013 | ||
996 | /* Structure and flags for acpi_get_object_info */ | 1014 | /* Values for Flags field above (acpi_get_object_info) */ |
1015 | |||
1016 | #define ACPI_PCI_ROOT_BRIDGE 0x01 | ||
997 | 1017 | ||
998 | #define ACPI_VALID_STA 0x0001 | 1018 | /* Flags for Valid field above (acpi_get_object_info) */ |
999 | #define ACPI_VALID_ADR 0x0002 | 1019 | |
1000 | #define ACPI_VALID_HID 0x0004 | 1020 | #define ACPI_VALID_STA 0x01 |
1001 | #define ACPI_VALID_UID 0x0008 | 1021 | #define ACPI_VALID_ADR 0x02 |
1002 | #define ACPI_VALID_CID 0x0010 | 1022 | #define ACPI_VALID_HID 0x04 |
1003 | #define ACPI_VALID_SXDS 0x0020 | 1023 | #define ACPI_VALID_UID 0x08 |
1024 | #define ACPI_VALID_CID 0x10 | ||
1025 | #define ACPI_VALID_SXDS 0x20 | ||
1026 | #define ACPI_VALID_SXWS 0x40 | ||
1004 | 1027 | ||
1005 | /* Flags for _STA method */ | 1028 | /* Flags for _STA method */ |
1006 | 1029 | ||
@@ -1011,29 +1034,6 @@ struct acpi_compatible_id_list { | |||
1011 | #define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ | 1034 | #define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ |
1012 | #define ACPI_STA_BATTERY_PRESENT 0x10 | 1035 | #define ACPI_STA_BATTERY_PRESENT 0x10 |
1013 | 1036 | ||
1014 | #define ACPI_COMMON_OBJ_INFO \ | ||
1015 | acpi_object_type type; /* ACPI object type */ \ | ||
1016 | acpi_name name /* ACPI object Name */ | ||
1017 | |||
1018 | struct acpi_obj_info_header { | ||
1019 | ACPI_COMMON_OBJ_INFO; | ||
1020 | }; | ||
1021 | |||
1022 | /* Structure returned from Get Object Info */ | ||
1023 | |||
1024 | struct acpi_device_info { | ||
1025 | ACPI_COMMON_OBJ_INFO; | ||
1026 | |||
1027 | u32 param_count; /* If a method, required parameter count */ | ||
1028 | u32 valid; /* Indicates which fields below are valid */ | ||
1029 | u32 current_status; /* _STA value */ | ||
1030 | acpi_integer address; /* _ADR value if any */ | ||
1031 | struct acpica_device_id hardware_id; /* _HID value if any */ | ||
1032 | struct acpica_device_id unique_id; /* _UID value if any */ | ||
1033 | u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ | ||
1034 | struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ | ||
1035 | }; | ||
1036 | |||
1037 | /* Context structs for address space handlers */ | 1037 | /* Context structs for address space handlers */ |
1038 | 1038 | ||
1039 | struct acpi_pci_id { | 1039 | struct acpi_pci_id { |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index fcb8e4b159b1..9d7febde10a1 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -149,10 +149,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | |||
149 | #define ACPI_FREE(a) kfree(a) | 149 | #define ACPI_FREE(a) kfree(a) |
150 | 150 | ||
151 | /* Used within ACPICA to show where it is safe to preempt execution */ | 151 | /* Used within ACPICA to show where it is safe to preempt execution */ |
152 | 152 | #include <linux/hardirq.h> | |
153 | #define ACPI_PREEMPTION_POINT() \ | 153 | #define ACPI_PREEMPTION_POINT() \ |
154 | do { \ | 154 | do { \ |
155 | if (!irqs_disabled()) \ | 155 | if (!in_atomic_preempt_off()) \ |
156 | cond_resched(); \ | 156 | cond_resched(); \ |
157 | } while (0) | 157 | } while (0) |
158 | 158 | ||