1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2007, 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_DMAR "DMAR" /* DMA Remapping table */
65 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
66 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
67 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
68 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
69 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
70 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
71 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
72 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
73 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
74 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
75 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
76 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
79 * All tables must be byte-packed to match the ACPI specification, since
80 * the tables are provided by the system BIOS.
85 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
86 * This is the only type that is even remotely portable. Anything else is not
87 * portable, so do not use any other bitfield types.
90 /* Common Sub-table header (used in MADT, SRAT, etc.) */
92 struct acpi_subtable_header
{
97 /*******************************************************************************
99 * ASF - Alert Standard Format table (Signature "ASF!")
101 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
103 ******************************************************************************/
105 struct acpi_table_asf
{
106 struct acpi_table_header header
; /* Common ACPI table header */
109 /* ASF subtable header */
111 struct acpi_asf_header
{
117 /* Values for Type field above */
120 ACPI_ASF_TYPE_INFO
= 0,
121 ACPI_ASF_TYPE_ALERT
= 1,
122 ACPI_ASF_TYPE_CONTROL
= 2,
123 ACPI_ASF_TYPE_BOOT
= 3,
124 ACPI_ASF_TYPE_ADDRESS
= 4,
125 ACPI_ASF_TYPE_RESERVED
= 5
132 /* 0: ASF Information */
134 struct acpi_asf_info
{
135 struct acpi_asf_header header
;
137 u8 min_poll_interval
;
146 struct acpi_asf_alert
{
147 struct acpi_asf_header header
;
154 struct acpi_asf_alert_data
{
169 /* 2: ASF Remote Control */
171 struct acpi_asf_remote
{
172 struct acpi_asf_header header
;
178 struct acpi_asf_control_data
{
185 /* 3: ASF RMCP Boot Options */
187 struct acpi_asf_rmcp
{
188 struct acpi_asf_header header
;
200 struct acpi_asf_address
{
201 struct acpi_asf_header header
;
206 /*******************************************************************************
208 * BOOT - Simple Boot Flag Table
210 ******************************************************************************/
212 struct acpi_table_boot
{
213 struct acpi_table_header header
; /* Common ACPI table header */
214 u8 cmos_index
; /* Index in CMOS RAM for the boot register */
218 /*******************************************************************************
220 * CPEP - Corrected Platform Error Polling table
222 ******************************************************************************/
224 struct acpi_table_cpep
{
225 struct acpi_table_header header
; /* Common ACPI table header */
231 struct acpi_cpep_polling
{
234 u8 id
; /* Processor ID */
235 u8 eid
; /* Processor EID */
236 u32 interval
; /* Polling interval (msec) */
239 /*******************************************************************************
241 * DBGP - Debug Port table
243 ******************************************************************************/
245 struct acpi_table_dbgp
{
246 struct acpi_table_header header
; /* Common ACPI table header */
247 u8 type
; /* 0=full 16550, 1=subset of 16550 */
249 struct acpi_generic_address debug_port
;
252 /*******************************************************************************
254 * DMAR - DMA Remapping table
256 ******************************************************************************/
258 struct acpi_table_dmar
{
259 struct acpi_table_header header
; /* Common ACPI table header */
260 u8 width
; /* Host Address Width */
265 /* DMAR subtable header */
267 struct acpi_dmar_header
{
272 /* Values for subtable type in struct acpi_dmar_header */
274 enum acpi_dmar_type
{
275 ACPI_DMAR_TYPE_HARDWARE_UNIT
= 0,
276 ACPI_DMAR_TYPE_RESERVED_MEMORY
= 1,
277 ACPI_DMAR_TYPE_ATSR
= 2,
278 ACPI_DMAR_TYPE_RESERVED
= 3 /* 3 and greater are reserved */
281 struct acpi_dmar_device_scope
{
289 /* Values for entry_type in struct acpi_dmar_device_scope */
291 enum acpi_dmar_scope_type
{
292 ACPI_DMAR_SCOPE_TYPE_NOT_USED
= 0,
293 ACPI_DMAR_SCOPE_TYPE_ENDPOINT
= 1,
294 ACPI_DMAR_SCOPE_TYPE_BRIDGE
= 2,
295 ACPI_DMAR_SCOPE_TYPE_IOAPIC
= 3,
296 ACPI_DMAR_SCOPE_TYPE_HPET
= 4,
297 ACPI_DMAR_SCOPE_TYPE_RESERVED
= 5 /* 5 and greater are reserved */
300 struct acpi_dmar_pci_path
{
306 * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
309 /* 0: Hardware Unit Definition */
311 struct acpi_dmar_hardware_unit
{
312 struct acpi_dmar_header header
;
316 u64 address
; /* Register Base Address */
321 #define ACPI_DMAR_INCLUDE_ALL (1)
323 /* 1: Reserved Memory Defininition */
325 struct acpi_dmar_reserved_memory
{
326 struct acpi_dmar_header header
;
329 u64 base_address
; /* 4_k aligned base address */
330 u64 end_address
; /* 4_k aligned limit address */
335 #define ACPI_DMAR_ALLOW_ALL (1)
337 /*******************************************************************************
339 * ECDT - Embedded Controller Boot Resources Table
341 ******************************************************************************/
343 struct acpi_table_ecdt
{
344 struct acpi_table_header header
; /* Common ACPI table header */
345 struct acpi_generic_address control
; /* Address of EC command/status register */
346 struct acpi_generic_address data
; /* Address of EC data register */
347 u32 uid
; /* Unique ID - must be same as the EC _UID method */
348 u8 gpe
; /* The GPE for the EC */
349 u8 id
[1]; /* Full namepath of the EC in the ACPI namespace */
352 /*******************************************************************************
354 * HPET - High Precision Event Timer table
356 ******************************************************************************/
358 struct acpi_table_hpet
{
359 struct acpi_table_header header
; /* Common ACPI table header */
360 u32 id
; /* Hardware ID of event timer block */
361 struct acpi_generic_address address
; /* Address of event timer block */
362 u8 sequence
; /* HPET sequence number */
363 u16 minimum_tick
; /* Main counter min tick, periodic mode */
369 #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
370 #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
371 #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
373 /*! [End] no source code translation !*/
375 /*******************************************************************************
377 * MADT - Multiple APIC Description Table
379 ******************************************************************************/
381 struct acpi_table_madt
{
382 struct acpi_table_header header
; /* Common ACPI table header */
383 u32 address
; /* Physical address of local APIC */
389 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
391 /* Values for PCATCompat flag */
393 #define ACPI_MADT_DUAL_PIC 0
394 #define ACPI_MADT_MULTIPLE_APIC 1
396 /* Values for subtable type in struct acpi_subtable_header */
398 enum acpi_madt_type
{
399 ACPI_MADT_TYPE_LOCAL_APIC
= 0,
400 ACPI_MADT_TYPE_IO_APIC
= 1,
401 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
= 2,
402 ACPI_MADT_TYPE_NMI_SOURCE
= 3,
403 ACPI_MADT_TYPE_LOCAL_APIC_NMI
= 4,
404 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE
= 5,
405 ACPI_MADT_TYPE_IO_SAPIC
= 6,
406 ACPI_MADT_TYPE_LOCAL_SAPIC
= 7,
407 ACPI_MADT_TYPE_INTERRUPT_SOURCE
= 8,
408 ACPI_MADT_TYPE_RESERVED
= 9 /* 9 and greater are reserved */
412 * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
415 /* 0: Processor Local APIC */
417 struct acpi_madt_local_apic
{
418 struct acpi_subtable_header header
;
419 u8 processor_id
; /* ACPI processor id */
420 u8 id
; /* Processor's local APIC id */
426 struct acpi_madt_io_apic
{
427 struct acpi_subtable_header header
;
428 u8 id
; /* I/O APIC ID */
429 u8 reserved
; /* Reserved - must be zero */
430 u32 address
; /* APIC physical address */
431 u32 global_irq_base
; /* Global system interrupt where INTI lines start */
434 /* 2: Interrupt Override */
436 struct acpi_madt_interrupt_override
{
437 struct acpi_subtable_header header
;
438 u8 bus
; /* 0 - ISA */
439 u8 source_irq
; /* Interrupt source (IRQ) */
440 u32 global_irq
; /* Global system interrupt */
446 struct acpi_madt_nmi_source
{
447 struct acpi_subtable_header header
;
449 u32 global_irq
; /* Global system interrupt */
452 /* 4: Local APIC NMI */
454 struct acpi_madt_local_apic_nmi
{
455 struct acpi_subtable_header header
;
456 u8 processor_id
; /* ACPI processor id */
458 u8 lint
; /* LINTn to which NMI is connected */
461 /* 5: Address Override */
463 struct acpi_madt_local_apic_override
{
464 struct acpi_subtable_header header
;
465 u16 reserved
; /* Reserved, must be zero */
466 u64 address
; /* APIC physical address */
471 struct acpi_madt_io_sapic
{
472 struct acpi_subtable_header header
;
473 u8 id
; /* I/O SAPIC ID */
474 u8 reserved
; /* Reserved, must be zero */
475 u32 global_irq_base
; /* Global interrupt for SAPIC start */
476 u64 address
; /* SAPIC physical address */
481 struct acpi_madt_local_sapic
{
482 struct acpi_subtable_header header
;
483 u8 processor_id
; /* ACPI processor id */
484 u8 id
; /* SAPIC ID */
485 u8 eid
; /* SAPIC EID */
486 u8 reserved
[3]; /* Reserved, must be zero */
488 u32 uid
; /* Numeric UID - ACPI 3.0 */
489 char uid_string
[1]; /* String UID - ACPI 3.0 */
492 /* 8: Platform Interrupt Source */
494 struct acpi_madt_interrupt_source
{
495 struct acpi_subtable_header header
;
497 u8 type
; /* 1=PMI, 2=INIT, 3=corrected */
498 u8 id
; /* Processor ID */
499 u8 eid
; /* Processor EID */
500 u8 io_sapic_vector
; /* Vector value for PMI interrupts */
501 u32 global_irq
; /* Global system interrupt */
502 u32 flags
; /* Interrupt Source Flags */
505 /* Flags field above */
507 #define ACPI_MADT_CPEI_OVERRIDE (1)
510 * Common flags fields for MADT subtables
513 /* MADT Local APIC flags (lapic_flags) */
515 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
517 /* MADT MPS INTI flags (inti_flags) */
519 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
520 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
522 /* Values for MPS INTI flags */
524 #define ACPI_MADT_POLARITY_CONFORMS 0
525 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
526 #define ACPI_MADT_POLARITY_RESERVED 2
527 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
529 #define ACPI_MADT_TRIGGER_CONFORMS (0)
530 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
531 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
532 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
534 /*******************************************************************************
536 * MCFG - PCI Memory Mapped Configuration table and sub-table
538 ******************************************************************************/
540 struct acpi_table_mcfg
{
541 struct acpi_table_header header
; /* Common ACPI table header */
547 struct acpi_mcfg_allocation
{
548 u64 address
; /* Base address, processor-relative */
549 u16 pci_segment
; /* PCI segment group number */
550 u8 start_bus_number
; /* Starting PCI Bus number */
551 u8 end_bus_number
; /* Final PCI Bus number */
555 /*******************************************************************************
557 * SBST - Smart Battery Specification Table
559 ******************************************************************************/
561 struct acpi_table_sbst
{
562 struct acpi_table_header header
; /* Common ACPI table header */
568 /*******************************************************************************
570 * SLIT - System Locality Distance Information Table
572 ******************************************************************************/
574 struct acpi_table_slit
{
575 struct acpi_table_header header
; /* Common ACPI table header */
577 u8 entry
[1]; /* Real size = localities^2 */
580 /*******************************************************************************
582 * SPCR - Serial Port Console Redirection table
584 ******************************************************************************/
586 struct acpi_table_spcr
{
587 struct acpi_table_header header
; /* Common ACPI table header */
588 u8 interface_type
; /* 0=full 16550, 1=subset of 16550 */
590 struct acpi_generic_address serial_port
;
610 /*******************************************************************************
612 * SPMI - Server Platform Management Interface table
614 ******************************************************************************/
616 struct acpi_table_spmi
{
617 struct acpi_table_header header
; /* Common ACPI table header */
620 u16 spec_revision
; /* Version of IPMI */
622 u8 gpe_number
; /* GPE assigned */
626 struct acpi_generic_address ipmi_register
;
633 /*******************************************************************************
635 * SRAT - System Resource Affinity Table
637 ******************************************************************************/
639 struct acpi_table_srat
{
640 struct acpi_table_header header
; /* Common ACPI table header */
641 u32 table_revision
; /* Must be value '1' */
642 u64 reserved
; /* Reserved, must be zero */
645 /* Values for subtable type in struct acpi_subtable_header */
647 enum acpi_srat_type
{
648 ACPI_SRAT_TYPE_CPU_AFFINITY
= 0,
649 ACPI_SRAT_TYPE_MEMORY_AFFINITY
= 1,
650 ACPI_SRAT_TYPE_RESERVED
= 2
653 /* SRAT sub-tables */
655 struct acpi_srat_cpu_affinity
{
656 struct acpi_subtable_header header
;
657 u8 proximity_domain_lo
;
661 u8 proximity_domain_hi
[3];
662 u32 reserved
; /* Reserved, must be zero */
667 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
669 struct acpi_srat_mem_affinity
{
670 struct acpi_subtable_header header
;
671 u32 proximity_domain
;
672 u16 reserved
; /* Reserved, must be zero */
675 u32 memory_type
; /* See acpi_address_range_id */
677 u64 reserved1
; /* Reserved, must be zero */
682 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
683 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
684 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
686 /*******************************************************************************
688 * TCPA - Trusted Computing Platform Alliance table
690 ******************************************************************************/
692 struct acpi_table_tcpa
{
693 struct acpi_table_header header
; /* Common ACPI table header */
695 u32 max_log_length
; /* Maximum length for the event log area */
696 u64 log_address
; /* Address of the event log area */
699 /*******************************************************************************
701 * WDRT - Watchdog Resource Table
703 ******************************************************************************/
705 struct acpi_table_wdrt
{
706 struct acpi_table_header header
; /* Common ACPI table header */
707 u32 header_length
; /* Watchdog Header Length */
708 u8 pci_segment
; /* PCI Segment number */
709 u8 pci_bus
; /* PCI Bus number */
710 u8 pci_device
; /* PCI Device number */
711 u8 pci_function
; /* PCI Function number */
712 u32 timer_period
; /* Period of one timer count (msec) */
713 u32 max_count
; /* Maximum counter value supported */
714 u32 min_count
; /* Minimum counter value */
717 u32 entries
; /* Number of watchdog entries that follow */
722 #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
724 /* Reset to default packing */
728 #endif /* __ACTBL1_H__ */