1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2006, R. Byron Moore
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
47 /*******************************************************************************
49 * Additional ACPI Tables
51 * These tables are not consumed directly by the ACPICA subsystem, but are
52 * included here to support device drivers and the AML disassembler.
54 ******************************************************************************/
57 * Values for description table header signatures. Useful because they make
58 * it more difficult to inadvertently type in the wrong signature.
60 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
61 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
62 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
63 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
64 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
65 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
66 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
67 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
68 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
69 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
70 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
71 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
72 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
73 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
74 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
78 #define APIC_SIG "APIC" /* Multiple APIC Description Table */
79 #define BOOT_SIG "BOOT" /* Simple Boot Flag Table */
80 #define SBST_SIG "SBST" /* Smart Battery Specification Table */
83 * All tables must be byte-packed to match the ACPI specification, since
84 * the tables are provided by the system BIOS.
89 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
90 * This is the only type that is even remotely portable. Anything else is not
91 * portable, so do not use any other bitfield types.
94 /*******************************************************************************
96 * ASF - Alert Standard Format table (Signature "ASF!")
98 ******************************************************************************/
100 struct acpi_table_asf
{
101 ACPI_TABLE_HEADER_DEF
};
103 #define ACPI_ASF_HEADER_DEF \
108 struct acpi_asf_header
{
109 ACPI_ASF_HEADER_DEF
};
111 /* Values for Type field */
115 #define ASF_CONTROL 2
117 #define ASF_ADDRESS 4
118 #define ASF_RESERVED 5
124 /* 0: ASF Information */
126 struct acpi_asf_info
{
127 ACPI_ASF_HEADER_DEF u8 min_reset_value
;
128 u8 min_poll_interval
;
137 struct acpi_asf_alert
{
138 ACPI_ASF_HEADER_DEF u8 assert_mask
;
145 /* 2: ASF Remote Control */
147 struct acpi_asf_remote
{
148 ACPI_ASF_HEADER_DEF u8 controls
;
154 /* 3: ASF RMCP Boot Options */
156 struct acpi_asf_rmcp
{
157 ACPI_ASF_HEADER_DEF u8 capabilities
[7];
168 struct acpi_asf_address
{
169 ACPI_ASF_HEADER_DEF u8 eprom_address
;
171 u8 smbus_addresses
[1];
174 /*******************************************************************************
176 * BOOT - Simple Boot Flag Table
178 ******************************************************************************/
180 struct acpi_table_boot
{
181 ACPI_TABLE_HEADER_DEF u8 cmos_index
; /* Index in CMOS RAM for the boot register */
185 /*******************************************************************************
187 * CPEP - Corrected Platform Error Polling table
189 ******************************************************************************/
191 struct acpi_table_cpep
{
192 ACPI_TABLE_HEADER_DEF u64 reserved
;
197 struct acpi_cpep_polling
{
200 u8 processor_id
; /* Processor ID */
201 u8 processor_eid
; /* Processor EID */
202 u32 polling_interval
; /* Polling interval (msec) */
205 /*******************************************************************************
207 * DBGP - Debug Port table
209 ******************************************************************************/
211 struct acpi_table_dbgp
{
212 ACPI_TABLE_HEADER_DEF u8 interface_type
; /* 0=full 16550, 1=subset of 16550 */
214 struct acpi_generic_address debug_port
;
217 /*******************************************************************************
219 * ECDT - Embedded Controller Boot Resources Table
221 ******************************************************************************/
223 struct ec_boot_resources
{
224 ACPI_TABLE_HEADER_DEF
struct acpi_generic_address ec_control
; /* Address of EC command/status register */
225 struct acpi_generic_address ec_data
; /* Address of EC data register */
226 u32 uid
; /* Unique ID - must be same as the EC _UID method */
227 u8 gpe_bit
; /* The GPE for the EC */
228 u8 ec_id
[1]; /* Full namepath of the EC in the ACPI namespace */
231 /*******************************************************************************
233 * HPET - High Precision Event Timer table
235 ******************************************************************************/
237 struct acpi_hpet_table
{
238 ACPI_TABLE_HEADER_DEF u32 hardware_id
; /* Hardware ID of event timer block */
239 struct acpi_generic_address base_address
; /* Address of event timer block */
240 u8 hpet_number
; /* HPET sequence number */
241 u16 clock_tick
; /* Main counter min tick, periodic mode */
245 #if 0 /* HPET flags to be converted to macros */
246 struct { /* Flags (8 bits) */
247 u8 page_protect
:1; /* 00: No page protection */
248 u8 page_protect4
:1; /* 01: 4_kB page protected */
249 u8 page_protect64
:1; /* 02: 64_kB page protected */
250 u8
:5; /* 03-07: Reserved, must be zero */
254 /*******************************************************************************
256 * MADT - Multiple APIC Description Table
258 ******************************************************************************/
260 struct multiple_apic_table
{
261 ACPI_TABLE_HEADER_DEF u32 local_apic_address
; /* Physical address of local APIC */
263 /* Flags (32 bits) */
265 u8 PCATcompat
:1; /* 00: System also has dual 8259s */
266 u8
:7; /* 01-07: Reserved, must be zero */
267 u8 reserved1
[3]; /* 08-31: Reserved, must be zero */
270 /* Values for MADT PCATCompat */
273 #define MULTIPLE_APIC 1
275 /* Common MADT Sub-table header */
277 #define APIC_HEADER_DEF \
284 /* Values for Type in struct apic_header */
286 #define APIC_PROCESSOR 0
288 #define APIC_XRUPT_OVERRIDE 2
290 #define APIC_LOCAL_NMI 4
291 #define APIC_ADDRESS_OVERRIDE 5
292 #define APIC_IO_SAPIC 6
293 #define APIC_LOCAL_SAPIC 7
294 #define APIC_XRUPT_SOURCE 8
295 #define APIC_RESERVED 9 /* 9 and greater are reserved */
297 /* Flag definitions for MADT sub-tables */
299 #define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \
300 u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\
301 u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\
302 u8 : 4; /* 04-07: Reserved, must be zero */\
303 u8 reserved1; /* 08-15: Reserved, must be zero */
305 #define ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \
306 u8 processor_enabled: 1; /* 00: Processor is usable if set */\
307 u8 : 7; /* 01-07: Reserved, must be zero */\
308 u8 reserved2[3]; /* 08-31: Reserved, must be zero */
310 /* Values for MPS INTI flags */
312 #define POLARITY_CONFORMS 0
313 #define POLARITY_ACTIVE_HIGH 1
314 #define POLARITY_RESERVED 2
315 #define POLARITY_ACTIVE_LOW 3
317 #define TRIGGER_CONFORMS 0
318 #define TRIGGER_EDGE 1
319 #define TRIGGER_RESERVED 2
320 #define TRIGGER_LEVEL 3
323 * MADT Sub-tables, correspond to Type in struct apic_header
326 /* 0: processor APIC */
328 struct madt_processor_apic
{
329 APIC_HEADER_DEF u8 processor_id
; /* ACPI processor id */
330 u8 local_apic_id
; /* Processor's local APIC id */
335 struct madt_io_apic
{
336 APIC_HEADER_DEF u8 io_apic_id
; /* I/O APIC ID */
337 u8 reserved
; /* Reserved - must be zero */
338 u32 address
; /* APIC physical address */
339 u32 interrupt
; /* Global system interrupt where INTI lines start */
342 /* 2: Interrupt Override */
344 struct madt_interrupt_override
{
345 APIC_HEADER_DEF u8 bus
; /* 0 - ISA */
346 u8 source
; /* Interrupt source (IRQ) */
347 u32 interrupt
; /* Global system interrupt */
352 struct madt_nmi_source
{
353 APIC_HEADER_DEF ACPI_MADT_IFLAGS u32 interrupt
; /* Global system interrupt */
356 /* 4: Local APIC NMI */
358 struct madt_local_apic_nmi
{
359 APIC_HEADER_DEF u8 processor_id
; /* ACPI processor id */
360 ACPI_MADT_IFLAGS u8 lint
; /* LINTn to which NMI is connected */
363 /* 5: Address Override */
365 struct madt_address_override
{
366 APIC_HEADER_DEF u16 reserved
; /* Reserved, must be zero */
367 u64 address
; /* APIC physical address */
372 struct madt_io_sapic
{
373 APIC_HEADER_DEF u8 io_sapic_id
; /* I/O SAPIC ID */
374 u8 reserved
; /* Reserved, must be zero */
375 u32 interrupt_base
; /* Glocal interrupt for SAPIC start */
376 u64 address
; /* SAPIC physical address */
381 struct madt_local_sapic
{
382 APIC_HEADER_DEF u8 processor_id
; /* ACPI processor id */
383 u8 local_sapic_id
; /* SAPIC ID */
384 u8 local_sapic_eid
; /* SAPIC EID */
385 u8 reserved
[3]; /* Reserved, must be zero */
386 ACPI_MADT_LFLAGS u32 processor_uID
; /* Numeric UID - ACPI 3.0 */
387 char processor_uIDstring
[1]; /* String UID - ACPI 3.0 */
390 /* 8: Platform Interrupt Source */
392 struct madt_interrupt_source
{
393 APIC_HEADER_DEF ACPI_MADT_IFLAGS u8 interrupt_type
; /* 1=PMI, 2=INIT, 3=corrected */
394 u8 processor_id
; /* Processor ID */
395 u8 processor_eid
; /* Processor EID */
396 u8 io_sapic_vector
; /* Vector value for PMI interrupts */
397 u32 interrupt
; /* Global system interrupt */
398 u32 flags
; /* Interrupt Source Flags */
401 #ifdef DUPLICATE_DEFINITION_WITH_LINUX_ACPI_H
402 /*******************************************************************************
404 * MCFG - PCI Memory Mapped Configuration table and sub-table
406 ******************************************************************************/
408 struct acpi_table_mcfg
{
409 ACPI_TABLE_HEADER_DEF u8 reserved
[8];
412 struct acpi_mcfg_allocation
{
413 u64 base_address
; /* Base address, processor-relative */
414 u16 pci_segment
; /* PCI segment group number */
415 u8 start_bus_number
; /* Starting PCI Bus number */
416 u8 end_bus_number
; /* Final PCI Bus number */
421 /*******************************************************************************
423 * SBST - Smart Battery Specification Table
425 ******************************************************************************/
427 struct smart_battery_table
{
428 ACPI_TABLE_HEADER_DEF u32 warning_level
;
433 /*******************************************************************************
435 * SLIT - System Locality Distance Information Table
437 ******************************************************************************/
439 struct system_locality_info
{
440 ACPI_TABLE_HEADER_DEF u64 locality_count
;
444 /*******************************************************************************
446 * SPCR - Serial Port Console Redirection table
448 ******************************************************************************/
450 struct acpi_table_spcr
{
451 ACPI_TABLE_HEADER_DEF u8 interface_type
; /* 0=full 16550, 1=subset of 16550 */
453 struct acpi_generic_address serial_port
;
473 /*******************************************************************************
475 * SPMI - Server Platform Management Interface table
477 ******************************************************************************/
479 struct acpi_table_spmi
{
480 ACPI_TABLE_HEADER_DEF u8 reserved
;
482 u16 spec_revision
; /* Version of IPMI */
484 u8 gpe_number
; /* GPE assigned */
488 struct acpi_generic_address ipmi_register
;
495 /*******************************************************************************
497 * SRAT - System Resource Affinity Table
499 ******************************************************************************/
501 struct system_resource_affinity
{
502 ACPI_TABLE_HEADER_DEF u32 reserved1
; /* Must be value '1' */
503 u64 reserved2
; /* Reserved, must be zero */
506 /* SRAT common sub-table header */
508 #define SRAT_SUBTABLE_HEADER \
512 /* Values for Type above */
514 #define SRAT_CPU_AFFINITY 0
515 #define SRAT_MEMORY_AFFINITY 1
516 #define SRAT_RESERVED 2
518 /* SRAT sub-tables */
520 struct static_resource_alloc
{
521 SRAT_SUBTABLE_HEADER u8 proximity_domain_lo
;
524 /* Flags (32 bits) */
526 u8 enabled
:1; /* 00: Use affinity structure */
527 u8
:7; /* 01-07: Reserved, must be zero */
528 u8 reserved3
[3]; /* 08-31: Reserved, must be zero */
531 u8 proximity_domain_hi
[3];
532 u32 reserved4
; /* Reserved, must be zero */
535 struct memory_affinity
{
536 SRAT_SUBTABLE_HEADER u32 proximity_domain
;
542 /* Flags (32 bits) */
544 u8 enabled
:1; /* 00: Use affinity structure */
545 u8 hot_pluggable
:1; /* 01: Memory region is hot pluggable */
546 u8 non_volatile
:1; /* 02: Memory is non-volatile */
547 u8
:5; /* 03-07: Reserved, must be zero */
548 u8 reserved5
[3]; /* 08-31: Reserved, must be zero */
550 u64 reserved6
; /* Reserved, must be zero */
553 /*******************************************************************************
555 * TCPA - Trusted Computing Platform Alliance table
557 ******************************************************************************/
559 struct acpi_table_tcpa
{
560 ACPI_TABLE_HEADER_DEF u16 reserved
;
561 u32 max_log_length
; /* Maximum length for the event log area */
562 u64 log_address
; /* Address of the event log area */
565 /*******************************************************************************
567 * WDRT - Watchdog Resource Table
569 ******************************************************************************/
571 struct acpi_table_wdrt
{
572 ACPI_TABLE_HEADER_DEF u32 header_length
; /* Watchdog Header Length */
573 u8 pci_segment
; /* PCI Segment number */
574 u8 pci_bus
; /* PCI Bus number */
575 u8 pci_device
; /* PCI Device number */
576 u8 pci_function
; /* PCI Function number */
577 u32 timer_period
; /* Period of one timer count (msec) */
578 u32 max_count
; /* Maximum counter value supported */
579 u32 min_count
; /* Minimum counter value */
582 u32 entries
; /* Number of watchdog entries that follow */
585 #if 0 /* Flags, will be converted to macros */
586 u8 enabled
:1; /* 00: Timer enabled */
587 u8
:6; /* 01-06: Reserved */
588 u8 sleep_stop
:1; /* 07: Timer stopped in sleep state */
591 /* Macros used to generate offsets to specific table fields */
593 #define ACPI_ASF0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_info,f)
594 #define ACPI_ASF1_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_alert,f)
595 #define ACPI_ASF2_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_remote,f)
596 #define ACPI_ASF3_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_rmcp,f)
597 #define ACPI_ASF4_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_address,f)
598 #define ACPI_BOOT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_boot,f)
599 #define ACPI_CPEP_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_cpep,f)
600 #define ACPI_CPEP0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_cpep_polling,f)
601 #define ACPI_DBGP_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_dbgp,f)
602 #define ACPI_ECDT_OFFSET(f) (u8) ACPI_OFFSET (struct ec_boot_resources,f)
603 #define ACPI_HPET_OFFSET(f) (u8) ACPI_OFFSET (struct hpet_table,f)
604 #define ACPI_MADT_OFFSET(f) (u8) ACPI_OFFSET (struct multiple_apic_table,f)
605 #define ACPI_MADT0_OFFSET(f) (u8) ACPI_OFFSET (struct madt_processor_apic,f)
606 #define ACPI_MADT1_OFFSET(f) (u8) ACPI_OFFSET (struct madt_io_apic,f)
607 #define ACPI_MADT2_OFFSET(f) (u8) ACPI_OFFSET (struct madt_interrupt_override,f)
608 #define ACPI_MADT3_OFFSET(f) (u8) ACPI_OFFSET (struct madt_nmi_source,f)
609 #define ACPI_MADT4_OFFSET(f) (u8) ACPI_OFFSET (struct madt_local_apic_nmi,f)
610 #define ACPI_MADT5_OFFSET(f) (u8) ACPI_OFFSET (struct madt_address_override,f)
611 #define ACPI_MADT6_OFFSET(f) (u8) ACPI_OFFSET (struct madt_io_sapic,f)
612 #define ACPI_MADT7_OFFSET(f) (u8) ACPI_OFFSET (struct madt_local_sapic,f)
613 #define ACPI_MADT8_OFFSET(f) (u8) ACPI_OFFSET (struct madt_interrupt_source,f)
614 #define ACPI_MADTH_OFFSET(f) (u8) ACPI_OFFSET (struct apic_header,f)
615 #define ACPI_MCFG_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_mcfg,f)
616 #define ACPI_MCFG0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_mcfg_allocation,f)
617 #define ACPI_SBST_OFFSET(f) (u8) ACPI_OFFSET (struct smart_battery_table,f)
618 #define ACPI_SLIT_OFFSET(f) (u8) ACPI_OFFSET (struct system_locality_info,f)
619 #define ACPI_SPCR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_spcr,f)
620 #define ACPI_SPMI_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_spmi,f)
621 #define ACPI_SRAT_OFFSET(f) (u8) ACPI_OFFSET (struct system_resource_affinity,f)
622 #define ACPI_SRAT0_OFFSET(f) (u8) ACPI_OFFSET (struct static_resource_alloc,f)
623 #define ACPI_SRAT1_OFFSET(f) (u8) ACPI_OFFSET (struct memory_affinity,f)
624 #define ACPI_TCPA_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_tcpa,f)
625 #define ACPI_WDRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_wdrt,f)
627 #define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct hpet_table,f,o)
628 #define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct static_resource_alloc,f,o)
629 #define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct memory_affinity,f,o)
630 #define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct multiple_apic_table,f,o)
631 #define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_processor_apic,f,o)
632 #define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_interrupt_override,f,o)
633 #define ACPI_MADT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_nmi_source,f,o)
634 #define ACPI_MADT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_local_apic_nmi,f,o)
635 #define ACPI_MADT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_local_sapic,f,o)
636 #define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_interrupt_source,f,o)
638 /* Reset to default packing */
642 #endif /* __ACTBL1_H__ */