aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-07-24 01:30:17 -0400
committerLen Brown <len.brown@intel.com>2009-08-28 19:40:38 -0400
commitb24aad44438d5bc21cbbfb94a99d9bf710d8295b (patch)
treebc45461940a8bc515682cf190ee4ff2731e31a86 /include/acpi
parent2f977b36e5f175e5126f280e7a94f0c53d1b1a16 (diff)
ACPICA: Split large ACPI table header
Split out the non-acpi-defined ACPI tables into the existing (but empty) actbl2.h file. Preparation for new ACPI 4.0 tables. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/actbl.h35
-rw-r--r--include/acpi/actbl1.h553
-rw-r--r--include/acpi/actbl2.h585
3 files changed, 611 insertions, 562 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 0649a5670026..55fcfc6725b2 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -44,6 +44,19 @@
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. Useful because they make
49 * it more difficult to inadvertently type in the wrong signature. 62 * it more difficult to inadvertently type in the wrong signature.
@@ -65,11 +78,6 @@
65#pragma pack(1) 78#pragma pack(1)
66 79
67/* 80/*
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. 81 * 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 82 * This is the only type that is even remotely portable. Anything else is not
75 * portable, so do not use any other bitfield types. 83 * portable, so do not use any other bitfield types.
@@ -77,9 +85,8 @@
77 85
78/******************************************************************************* 86/*******************************************************************************
79 * 87 *
80 * ACPI Table Header. This common header is used by all tables except the 88 * 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 89 * except the RSDP and FACS.
82 * other ACPI tables
83 * 90 *
84 ******************************************************************************/ 91 ******************************************************************************/
85 92
@@ -95,13 +102,16 @@ struct acpi_table_header {
95 u32 asl_compiler_revision; /* ASL compiler version */ 102 u32 asl_compiler_revision; /* ASL compiler version */
96}; 103};
97 104
98/* 105/*******************************************************************************
106 *
99 * GAS - Generic Address Structure (ACPI 2.0+) 107 * GAS - Generic Address Structure (ACPI 2.0+)
100 * 108 *
101 * Note: Since this structure is used in the ACPI tables, it is byte aligned. 109 * 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 110 * If misaliged access is not supported by the hardware, accesses to the
103 * performed with care. 111 * 64-bit Address field must be performed with care.
104 */ 112 *
113 ******************************************************************************/
114
105struct acpi_generic_address { 115struct acpi_generic_address {
106 u8 space_id; /* Address space where struct or register exists */ 116 u8 space_id; /* Address space where struct or register exists */
107 u8 bit_width; /* Size in bits of given register */ 117 u8 bit_width; /* Size in bits of given register */
@@ -325,5 +335,6 @@ struct acpi_table_desc {
325 */ 335 */
326 336
327#include <acpi/actbl1.h> 337#include <acpi/actbl1.h>
338#include <acpi/actbl2.h>
328 339
329#endif /* __ACTBL_H__ */ 340#endif /* __ACTBL_H__ */
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index ec36693f868c..582af1fcb8f5 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -46,41 +46,29 @@
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. Useful because they make
58 * it more difficult to inadvertently type in the wrong signature. 60 * it more difficult to inadvertently type in the wrong signature.
59 */ 61 */
60#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
61#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ 62#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 */ 63#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 */ 64#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
67#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ 65#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
68#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ 66#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
69#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ 67#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 */ 68#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
73#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
74#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ 69#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 */ 70#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 */ 71#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 72
85/* 73/*
86 * All tables must be byte-packed to match the ACPI specification, since 74 * All tables must be byte-packed to match the ACPI specification, since
@@ -115,115 +103,6 @@ struct acpi_whea_header {
115 103
116/******************************************************************************* 104/*******************************************************************************
117 * 105 *
118 * ASF - Alert Standard Format table (Signature "ASF!")
119 *
120 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
121 *
122 ******************************************************************************/
123
124struct acpi_table_asf {
125 struct acpi_table_header header; /* Common ACPI table header */
126};
127
128/* ASF subtable header */
129
130struct acpi_asf_header {
131 u8 type;
132 u8 reserved;
133 u16 length;
134};
135
136/* Values for Type field above */
137
138enum 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
153struct 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
165struct 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
173struct 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
190struct acpi_asf_remote {
191 struct acpi_asf_header header;
192 u8 controls;
193 u8 data_length;
194 u16 reserved2;
195};
196
197struct 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
206struct 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
219struct 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 106 * BERT - Boot Error Record Table
228 * 107 *
229 ******************************************************************************/ 108 ******************************************************************************/
@@ -253,18 +132,6 @@ struct acpi_bert_region {
253 132
254/******************************************************************************* 133/*******************************************************************************
255 * 134 *
256 * BOOT - Simple Boot Flag Table
257 *
258 ******************************************************************************/
259
260struct acpi_table_boot {
261 struct acpi_table_header header; /* Common ACPI table header */
262 u8 cmos_index; /* Index in CMOS RAM for the boot register */
263 u8 reserved[3];
264};
265
266/*******************************************************************************
267 *
268 * CPEP - Corrected Platform Error Polling table 135 * CPEP - Corrected Platform Error Polling table
269 * 136 *
270 ******************************************************************************/ 137 ******************************************************************************/
@@ -286,123 +153,6 @@ struct acpi_cpep_polling {
286 153
287/******************************************************************************* 154/*******************************************************************************
288 * 155 *
289 * DBGP - Debug Port table
290 *
291 ******************************************************************************/
292
293struct 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
307struct 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
320struct acpi_dmar_header {
321 u16 type;
322 u16 length;
323};
324
325/* Values for subtable type in struct acpi_dmar_header */
326
327enum 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
334struct 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
344enum 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
353struct 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
364struct 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
378struct 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
393struct 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 156 * ECDT - Embedded Controller Boot Resources Table
407 * 157 *
408 ******************************************************************************/ 158 ******************************************************************************/
@@ -764,119 +514,6 @@ struct acpi_hest_generic {
764 514
765/******************************************************************************* 515/*******************************************************************************
766 * 516 *
767 * HPET - High Precision Event Timer table
768 *
769 ******************************************************************************/
770
771struct acpi_table_hpet {
772 struct acpi_table_header header; /* Common ACPI table header */
773 u32 id; /* Hardware ID of event timer block */
774 struct acpi_generic_address address; /* Address of event timer block */
775 u8 sequence; /* HPET sequence number */
776 u16 minimum_tick; /* Main counter min tick, periodic mode */
777 u8 flags;
778};
779
780/*! Flags */
781
782#define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
783#define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
784#define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
785
786/*! [End] no source code translation !*/
787
788/*******************************************************************************
789 *
790 * IBFT - Boot Firmware Table
791 *
792 ******************************************************************************/
793
794struct 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
801struct acpi_ibft_header {
802 u8 type;
803 u8 version;
804 u16 length;
805 u8 index;
806 u8 flags;
807};
808
809/* Values for Type field above */
810
811enum 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
823struct 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
833struct 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
843struct 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
859struct 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};
877
878/*******************************************************************************
879 *
880 * MADT - Multiple APIC Description Table 517 * MADT - Multiple APIC Description Table
881 * 518 *
882 ******************************************************************************/ 519 ******************************************************************************/
@@ -1058,27 +695,6 @@ struct acpi_madt_local_x2apic_nmi {
1058 695
1059/******************************************************************************* 696/*******************************************************************************
1060 * 697 *
1061 * MCFG - PCI Memory Mapped Configuration table and sub-table
1062 *
1063 ******************************************************************************/
1064
1065struct acpi_table_mcfg {
1066 struct acpi_table_header header; /* Common ACPI table header */
1067 u8 reserved[8];
1068};
1069
1070/* Subtable */
1071
1072struct acpi_mcfg_allocation {
1073 u64 address; /* Base address, processor-relative */
1074 u16 pci_segment; /* PCI segment group number */
1075 u8 start_bus_number; /* Starting PCI Bus number */
1076 u8 end_bus_number; /* Final PCI Bus number */
1077 u32 reserved;
1078};
1079
1080/*******************************************************************************
1081 *
1082 * SBST - Smart Battery Specification Table 698 * SBST - Smart Battery Specification Table
1083 * 699 *
1084 ******************************************************************************/ 700 ******************************************************************************/
@@ -1104,59 +720,6 @@ struct acpi_table_slit {
1104 720
1105/******************************************************************************* 721/*******************************************************************************
1106 * 722 *
1107 * SPCR - Serial Port Console Redirection table
1108 *
1109 ******************************************************************************/
1110
1111struct 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
1141struct 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 723 * SRAT - System Resource Affinity Table
1161 * 724 *
1162 ******************************************************************************/ 725 ******************************************************************************/
@@ -1227,116 +790,6 @@ struct acpi_srat_x2apic_cpu_affinity {
1227 790
1228#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ 791#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1229 792
1230/*******************************************************************************
1231 *
1232 * TCPA - Trusted Computing Platform Alliance table
1233 *
1234 ******************************************************************************/
1235
1236struct acpi_table_tcpa {
1237 struct acpi_table_header header; /* Common ACPI table header */
1238 u16 reserved;
1239 u32 max_log_length; /* Maximum length for the event log area */
1240 u64 log_address; /* Address of the event log area */
1241};
1242
1243/*******************************************************************************
1244 *
1245 * UEFI - UEFI Boot optimization Table
1246 *
1247 ******************************************************************************/
1248
1249struct acpi_table_uefi {
1250 struct acpi_table_header header; /* Common ACPI table header */
1251 u8 identifier[16]; /* UUID identifier */
1252 u16 data_offset; /* Offset of remaining data in table */
1253 u8 data;
1254};
1255
1256/*******************************************************************************
1257 *
1258 * WDAT - Watchdog Action Table
1259 *
1260 ******************************************************************************/
1261
1262struct acpi_table_wdat {
1263 struct acpi_table_header header; /* Common ACPI table header */
1264 u32 header_length; /* Watchdog Header Length */
1265 u16 pci_segment; /* PCI Segment number */
1266 u8 pci_bus; /* PCI Bus number */
1267 u8 pci_device; /* PCI Device number */
1268 u8 pci_function; /* PCI Function number */
1269 u8 reserved[3];
1270 u32 timer_period; /* Period of one timer count (msec) */
1271 u32 max_count; /* Maximum counter value supported */
1272 u32 min_count; /* Minimum counter value */
1273 u8 flags;
1274 u8 reserved2[3];
1275 u32 entries; /* Number of watchdog entries that follow */
1276};
1277
1278/* WDAT Instruction Entries (actions) */
1279
1280struct acpi_wdat_entry {
1281 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
1282};
1283
1284/* Values for Action field above */
1285
1286enum acpi_wdat_actions {
1287 ACPI_WDAT_RESET = 1,
1288 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1289 ACPI_WDAT_GET_COUNTDOWN = 5,
1290 ACPI_WDAT_SET_COUNTDOWN = 6,
1291 ACPI_WDAT_GET_RUNNING_STATE = 8,
1292 ACPI_WDAT_SET_RUNNING_STATE = 9,
1293 ACPI_WDAT_GET_STOPPED_STATE = 10,
1294 ACPI_WDAT_SET_STOPPED_STATE = 11,
1295 ACPI_WDAT_GET_REBOOT = 16,
1296 ACPI_WDAT_SET_REBOOT = 17,
1297 ACPI_WDAT_GET_SHUTDOWN = 18,
1298 ACPI_WDAT_SET_SHUTDOWN = 19,
1299 ACPI_WDAT_GET_STATUS = 32,
1300 ACPI_WDAT_SET_STATUS = 33,
1301 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1302};
1303
1304/* Values for Instruction field above */
1305
1306enum acpi_wdat_instructions {
1307 ACPI_WDAT_READ_VALUE = 0,
1308 ACPI_WDAT_READ_COUNTDOWN = 1,
1309 ACPI_WDAT_WRITE_VALUE = 2,
1310 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1311 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1312 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1313};
1314
1315/*******************************************************************************
1316 *
1317 * WDRT - Watchdog Resource Table
1318 *
1319 ******************************************************************************/
1320
1321struct acpi_table_wdrt {
1322 struct acpi_table_header header; /* Common ACPI table header */
1323 u32 header_length; /* Watchdog Header Length */
1324 u8 pci_segment; /* PCI Segment number */
1325 u8 pci_bus; /* PCI Bus number */
1326 u8 pci_device; /* PCI Device number */
1327 u8 pci_function; /* PCI Function number */
1328 u32 timer_period; /* Period of one timer count (msec) */
1329 u32 max_count; /* Maximum counter value supported */
1330 u32 min_count; /* Minimum counter value */
1331 u8 flags;
1332 u8 reserved[3];
1333 u32 entries; /* Number of watchdog entries that follow */
1334};
1335
1336/* Flags */
1337
1338#define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
1339
1340/* Reset to default packing */ 793/* Reset to default packing */
1341 794
1342#pragma pack() 795#pragma pack()
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
new file mode 100644
index 000000000000..b271aba0e524
--- /dev/null
+++ b/include/acpi/actbl2.h
@@ -0,0 +1,585 @@
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. Useful because they make
18 * it more difficult to inadvertently type in the wrong signature.
19 */
20#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
21#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
22#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
23#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
24#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
25#define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */
26#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
27#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
28#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
29#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
30#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
31#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
32#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
33#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
34
35/*
36 * All tables must be byte-packed to match the ACPI specification, since
37 * the tables are provided by the system BIOS.
38 */
39#pragma pack(1)
40
41/*
42 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
43 * This is the only type that is even remotely portable. Anything else is not
44 * portable, so do not use any other bitfield types.
45 */
46
47/*******************************************************************************
48 *
49 * ASF - Alert Standard Format table (Signature "ASF!")
50 *
51 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
52 *
53 ******************************************************************************/
54
55struct acpi_table_asf {
56 struct acpi_table_header header; /* Common ACPI table header */
57};
58
59/* ASF subtable header */
60
61struct acpi_asf_header {
62 u8 type;
63 u8 reserved;
64 u16 length;
65};
66
67/* Values for Type field above */
68
69enum acpi_asf_type {
70 ACPI_ASF_TYPE_INFO = 0,
71 ACPI_ASF_TYPE_ALERT = 1,
72 ACPI_ASF_TYPE_CONTROL = 2,
73 ACPI_ASF_TYPE_BOOT = 3,
74 ACPI_ASF_TYPE_ADDRESS = 4,
75 ACPI_ASF_TYPE_RESERVED = 5
76};
77
78/*
79 * ASF subtables
80 */
81
82/* 0: ASF Information */
83
84struct acpi_asf_info {
85 struct acpi_asf_header header;
86 u8 min_reset_value;
87 u8 min_poll_interval;
88 u16 system_id;
89 u32 mfg_id;
90 u8 flags;
91 u8 reserved2[3];
92};
93
94/* 1: ASF Alerts */
95
96struct acpi_asf_alert {
97 struct acpi_asf_header header;
98 u8 assert_mask;
99 u8 deassert_mask;
100 u8 alerts;
101 u8 data_length;
102};
103
104struct acpi_asf_alert_data {
105 u8 address;
106 u8 command;
107 u8 mask;
108 u8 value;
109 u8 sensor_type;
110 u8 type;
111 u8 offset;
112 u8 source_type;
113 u8 severity;
114 u8 sensor_number;
115 u8 entity;
116 u8 instance;
117};
118
119/* 2: ASF Remote Control */
120
121struct acpi_asf_remote {
122 struct acpi_asf_header header;
123 u8 controls;
124 u8 data_length;
125 u16 reserved2;
126};
127
128struct acpi_asf_control_data {
129 u8 function;
130 u8 address;
131 u8 command;
132 u8 value;
133};
134
135/* 3: ASF RMCP Boot Options */
136
137struct acpi_asf_rmcp {
138 struct acpi_asf_header header;
139 u8 capabilities[7];
140 u8 completion_code;
141 u32 enterprise_id;
142 u8 command;
143 u16 parameter;
144 u16 boot_options;
145 u16 oem_parameters;
146};
147
148/* 4: ASF Address */
149
150struct acpi_asf_address {
151 struct acpi_asf_header header;
152 u8 eprom_address;
153 u8 devices;
154};
155
156/*******************************************************************************
157 *
158 * BOOT - Simple Boot Flag Table
159 *
160 ******************************************************************************/
161
162struct acpi_table_boot {
163 struct acpi_table_header header; /* Common ACPI table header */
164 u8 cmos_index; /* Index in CMOS RAM for the boot register */
165 u8 reserved[3];
166};
167
168/*******************************************************************************
169 *
170 * DBGP - Debug Port table
171 *
172 ******************************************************************************/
173
174struct acpi_table_dbgp {
175 struct acpi_table_header header; /* Common ACPI table header */
176 u8 type; /* 0=full 16550, 1=subset of 16550 */
177 u8 reserved[3];
178 struct acpi_generic_address debug_port;
179};
180
181/*******************************************************************************
182 *
183 * DMAR - DMA Remapping table
184 * From "Intel Virtualization Technology for Directed I/O", Sept. 2007
185 *
186 ******************************************************************************/
187
188struct acpi_table_dmar {
189 struct acpi_table_header header; /* Common ACPI table header */
190 u8 width; /* Host Address Width */
191 u8 flags;
192 u8 reserved[10];
193};
194
195/* Flags */
196
197#define ACPI_DMAR_INTR_REMAP (1)
198
199/* DMAR subtable header */
200
201struct acpi_dmar_header {
202 u16 type;
203 u16 length;
204};
205
206/* Values for subtable type in struct acpi_dmar_header */
207
208enum acpi_dmar_type {
209 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
210 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
211 ACPI_DMAR_TYPE_ATSR = 2,
212 ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
213};
214
215struct acpi_dmar_device_scope {
216 u8 entry_type;
217 u8 length;
218 u16 reserved;
219 u8 enumeration_id;
220 u8 bus;
221};
222
223/* Values for entry_type in struct acpi_dmar_device_scope */
224
225enum acpi_dmar_scope_type {
226 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
227 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
228 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
229 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
230 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
231 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
232};
233
234struct acpi_dmar_pci_path {
235 u8 dev;
236 u8 fn;
237};
238
239/*
240 * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
241 */
242
243/* 0: Hardware Unit Definition */
244
245struct acpi_dmar_hardware_unit {
246 struct acpi_dmar_header header;
247 u8 flags;
248 u8 reserved;
249 u16 segment;
250 u64 address; /* Register Base Address */
251};
252
253/* Flags */
254
255#define ACPI_DMAR_INCLUDE_ALL (1)
256
257/* 1: Reserved Memory Defininition */
258
259struct acpi_dmar_reserved_memory {
260 struct acpi_dmar_header header;
261 u16 reserved;
262 u16 segment;
263 u64 base_address; /* 4_k aligned base address */
264 u64 end_address; /* 4_k aligned limit address */
265};
266
267/* Flags */
268
269#define ACPI_DMAR_ALLOW_ALL (1)
270
271/* 2: Root Port ATS Capability Reporting Structure */
272
273struct acpi_dmar_atsr {
274 struct acpi_dmar_header header;
275 u8 flags;
276 u8 reserved;
277 u16 segment;
278};
279
280/* Flags */
281
282#define ACPI_DMAR_ALL_PORTS (1)
283
284/*******************************************************************************
285 *
286 * HPET - High Precision Event Timer table
287 *
288 ******************************************************************************/
289
290struct acpi_table_hpet {
291 struct acpi_table_header header; /* Common ACPI table header */
292 u32 id; /* Hardware ID of event timer block */
293 struct acpi_generic_address address; /* Address of event timer block */
294 u8 sequence; /* HPET sequence number */
295 u16 minimum_tick; /* Main counter min tick, periodic mode */
296 u8 flags;
297};
298
299/*! Flags */
300
301#define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
302#define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
303#define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
304
305/*! [End] no source code translation !*/
306
307/*******************************************************************************
308 *
309 * IBFT - Boot Firmware Table
310 *
311 ******************************************************************************/
312
313struct acpi_table_ibft {
314 struct acpi_table_header header; /* Common ACPI table header */
315 u8 reserved[12];
316};
317
318/* IBFT common subtable header */
319
320struct acpi_ibft_header {
321 u8 type;
322 u8 version;
323 u16 length;
324 u8 index;
325 u8 flags;
326};
327
328/* Values for Type field above */
329
330enum acpi_ibft_type {
331 ACPI_IBFT_TYPE_NOT_USED = 0,
332 ACPI_IBFT_TYPE_CONTROL = 1,
333 ACPI_IBFT_TYPE_INITIATOR = 2,
334 ACPI_IBFT_TYPE_NIC = 3,
335 ACPI_IBFT_TYPE_TARGET = 4,
336 ACPI_IBFT_TYPE_EXTENSIONS = 5,
337 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
338};
339
340/* IBFT subtables */
341
342struct acpi_ibft_control {
343 struct acpi_ibft_header header;
344 u16 extensions;
345 u16 initiator_offset;
346 u16 nic0_offset;
347 u16 target0_offset;
348 u16 nic1_offset;
349 u16 target1_offset;
350};
351
352struct acpi_ibft_initiator {
353 struct acpi_ibft_header header;
354 u8 sns_server[16];
355 u8 slp_server[16];
356 u8 primary_server[16];
357 u8 secondary_server[16];
358 u16 name_length;
359 u16 name_offset;
360};
361
362struct acpi_ibft_nic {
363 struct acpi_ibft_header header;
364 u8 ip_address[16];
365 u8 subnet_mask_prefix;
366 u8 origin;
367 u8 gateway[16];
368 u8 primary_dns[16];
369 u8 secondary_dns[16];
370 u8 dhcp[16];
371 u16 vlan;
372 u8 mac_address[6];
373 u16 pci_address;
374 u16 name_length;
375 u16 name_offset;
376};
377
378struct acpi_ibft_target {
379 struct acpi_ibft_header header;
380 u8 target_ip_address[16];
381 u16 target_ip_socket;
382 u8 target_boot_lun[8];
383 u8 chap_type;
384 u8 nic_association;
385 u16 target_name_length;
386 u16 target_name_offset;
387 u16 chap_name_length;
388 u16 chap_name_offset;
389 u16 chap_secret_length;
390 u16 chap_secret_offset;
391 u16 reverse_chap_name_length;
392 u16 reverse_chap_name_offset;
393 u16 reverse_chap_secret_length;
394 u16 reverse_chap_secret_offset;
395};
396
397/*******************************************************************************
398 *
399 * MCFG - PCI Memory Mapped Configuration table and sub-table
400 *
401 ******************************************************************************/
402
403struct acpi_table_mcfg {
404 struct acpi_table_header header; /* Common ACPI table header */
405 u8 reserved[8];
406};
407
408/* Subtable */
409
410struct acpi_mcfg_allocation {
411 u64 address; /* Base address, processor-relative */
412 u16 pci_segment; /* PCI segment group number */
413 u8 start_bus_number; /* Starting PCI Bus number */
414 u8 end_bus_number; /* Final PCI Bus number */
415 u32 reserved;
416};
417
418/*******************************************************************************
419 *
420 * SPCR - Serial Port Console Redirection table
421 *
422 ******************************************************************************/
423
424struct acpi_table_spcr {
425 struct acpi_table_header header; /* Common ACPI table header */
426 u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
427 u8 reserved[3];
428 struct acpi_generic_address serial_port;
429 u8 interrupt_type;
430 u8 pc_interrupt;
431 u32 interrupt;
432 u8 baud_rate;
433 u8 parity;
434 u8 stop_bits;
435 u8 flow_control;
436 u8 terminal_type;
437 u8 reserved1;
438 u16 pci_device_id;
439 u16 pci_vendor_id;
440 u8 pci_bus;
441 u8 pci_device;
442 u8 pci_function;
443 u32 pci_flags;
444 u8 pci_segment;
445 u32 reserved2;
446};
447
448/*******************************************************************************
449 *
450 * SPMI - Server Platform Management Interface table
451 *
452 ******************************************************************************/
453
454struct acpi_table_spmi {
455 struct acpi_table_header header; /* Common ACPI table header */
456 u8 reserved;
457 u8 interface_type;
458 u16 spec_revision; /* Version of IPMI */
459 u8 interrupt_type;
460 u8 gpe_number; /* GPE assigned */
461 u8 reserved1;
462 u8 pci_device_flag;
463 u32 interrupt;
464 struct acpi_generic_address ipmi_register;
465 u8 pci_segment;
466 u8 pci_bus;
467 u8 pci_device;
468 u8 pci_function;
469};
470
471/*******************************************************************************
472 *
473 * TCPA - Trusted Computing Platform Alliance table
474 *
475 ******************************************************************************/
476
477struct acpi_table_tcpa {
478 struct acpi_table_header header; /* Common ACPI table header */
479 u16 reserved;
480 u32 max_log_length; /* Maximum length for the event log area */
481 u64 log_address; /* Address of the event log area */
482};
483
484/*******************************************************************************
485 *
486 * UEFI - UEFI Boot optimization Table
487 *
488 ******************************************************************************/
489
490struct acpi_table_uefi {
491 struct acpi_table_header header; /* Common ACPI table header */
492 u8 identifier[16]; /* UUID identifier */
493 u16 data_offset; /* Offset of remaining data in table */
494 u8 data;
495};
496
497/*******************************************************************************
498 *
499 * WDAT - Watchdog Action Table
500 *
501 ******************************************************************************/
502
503struct acpi_table_wdat {
504 struct acpi_table_header header; /* Common ACPI table header */
505 u32 header_length; /* Watchdog Header Length */
506 u16 pci_segment; /* PCI Segment number */
507 u8 pci_bus; /* PCI Bus number */
508 u8 pci_device; /* PCI Device number */
509 u8 pci_function; /* PCI Function number */
510 u8 reserved[3];
511 u32 timer_period; /* Period of one timer count (msec) */
512 u32 max_count; /* Maximum counter value supported */
513 u32 min_count; /* Minimum counter value */
514 u8 flags;
515 u8 reserved2[3];
516 u32 entries; /* Number of watchdog entries that follow */
517};
518
519/* WDAT Instruction Entries (actions) */
520
521struct acpi_wdat_entry {
522 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
523};
524
525/* Values for Action field above */
526
527enum acpi_wdat_actions {
528 ACPI_WDAT_RESET = 1,
529 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
530 ACPI_WDAT_GET_COUNTDOWN = 5,
531 ACPI_WDAT_SET_COUNTDOWN = 6,
532 ACPI_WDAT_GET_RUNNING_STATE = 8,
533 ACPI_WDAT_SET_RUNNING_STATE = 9,
534 ACPI_WDAT_GET_STOPPED_STATE = 10,
535 ACPI_WDAT_SET_STOPPED_STATE = 11,
536 ACPI_WDAT_GET_REBOOT = 16,
537 ACPI_WDAT_SET_REBOOT = 17,
538 ACPI_WDAT_GET_SHUTDOWN = 18,
539 ACPI_WDAT_SET_SHUTDOWN = 19,
540 ACPI_WDAT_GET_STATUS = 32,
541 ACPI_WDAT_SET_STATUS = 33,
542 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
543};
544
545/* Values for Instruction field above */
546
547enum acpi_wdat_instructions {
548 ACPI_WDAT_READ_VALUE = 0,
549 ACPI_WDAT_READ_COUNTDOWN = 1,
550 ACPI_WDAT_WRITE_VALUE = 2,
551 ACPI_WDAT_WRITE_COUNTDOWN = 3,
552 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
553 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
554};
555
556/*******************************************************************************
557 *
558 * WDRT - Watchdog Resource Table
559 *
560 ******************************************************************************/
561
562struct acpi_table_wdrt {
563 struct acpi_table_header header; /* Common ACPI table header */
564 u32 header_length; /* Watchdog Header Length */
565 u8 pci_segment; /* PCI Segment number */
566 u8 pci_bus; /* PCI Bus number */
567 u8 pci_device; /* PCI Device number */
568 u8 pci_function; /* PCI Function number */
569 u32 timer_period; /* Period of one timer count (msec) */
570 u32 max_count; /* Maximum counter value supported */
571 u32 min_count; /* Minimum counter value */
572 u8 flags;
573 u8 reserved[3];
574 u32 entries; /* Number of watchdog entries that follow */
575};
576
577/* Flags */
578
579#define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
580
581/* Reset to default packing */
582
583#pragma pack()
584
585#endif /* __ACTBL2_H__ */