coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * coreboot ACPI support - headers and defines.
5  */
6 
7 #ifndef __ACPI_ACPI_H__
8 #define __ACPI_ACPI_H__
9 
10 /*
11  * The type and enable fields are common in ACPI, but the
12  * values themselves are hardware implementation defined.
13  */
14 #if CONFIG(ACPI_INTEL_HARDWARE_SLEEP_VALUES)
15  #define SLP_EN (1 << 13)
16  #define SLP_TYP_SHIFT 10
17  #define SLP_TYP (7 << SLP_TYP_SHIFT)
18  #define SLP_TYP_S0 0
19  #define SLP_TYP_S1 1
20  #define SLP_TYP_S3 5
21  #define SLP_TYP_S4 6
22  #define SLP_TYP_S5 7
23 #elif CONFIG(ACPI_AMD_HARDWARE_SLEEP_VALUES)
24  #define SLP_EN (1 << 13)
25  #define SLP_TYP_SHIFT 10
26  #define SLP_TYP (7 << SLP_TYP_SHIFT)
27  #define SLP_TYP_S0 0
28  #define SLP_TYP_S1 1
29  #define SLP_TYP_S3 3
30  #define SLP_TYP_S4 4
31  #define SLP_TYP_S5 5
32 #endif
33 
34 #define ACPI_TABLE_CREATOR "COREBOOT" /* Must be exactly 8 bytes long! */
35 #define OEM_ID "COREv4" /* Must be exactly 6 bytes long! */
36 #define ACPI_DSDT_REV_1 0x01 /* DSDT revision: ACPI v1 */
37 #define ACPI_DSDT_REV_2 0x02 /* DSDT revision: ACPI v2.0 and greater */
38 
39 #if !defined(__ASSEMBLER__) && !defined(__ACPI__)
40 #include <commonlib/helpers.h>
41 #include <device/device.h>
42 #include <uuid.h>
43 #include <cper.h>
44 #include <romstage_handoff.h>
45 #include <types.h>
46 
54 };
55 
56 #define RSDP_SIG "RSD PTR " /* RSDT pointer signature */
57 #define ASLC "CORE" /* Must be exactly 4 bytes long! */
58 
59 #define ACPI_NAME_BUFFER_SIZE 5 /* 4 chars + 1 NUL */
60 
61 /*
62  * The assigned ACPI ID for the coreboot project is 'BOOT'
63  * http://www.uefi.org/acpi_id_list
64  */
65 #define COREBOOT_ACPI_ID "BOOT" /* ACPI ID for coreboot HIDs */
66 
67 /* List of ACPI HID that use the coreboot ACPI ID */
69  COREBOOT_ACPI_ID_CBTABLE = 0x0000, /* BOOT0000 */
70  COREBOOT_ACPI_ID_MAX = 0xFFFF, /* BOOTFFFF */
71 };
72 
74  /* Tables defined by ACPI and used by coreboot */
77  /* Additional proprietary tables used by coreboot */
79 };
80 
81 /* RSDP (Root System Description Pointer) */
82 typedef struct acpi_rsdp {
83  char signature[8]; /* RSDP signature */
84  u8 checksum; /* Checksum of the first 20 bytes */
85  char oem_id[6]; /* OEM ID */
86  u8 revision; /* RSDP revision */
87  u32 rsdt_address; /* Physical address of RSDT (32 bits) */
88  u32 length; /* Total RSDP length (incl. extended part) */
89  u64 xsdt_address; /* Physical address of XSDT (64 bits) */
90  u8 ext_checksum; /* Checksum of the whole table */
93 
94 /* GAS (Generic Address Structure) */
95 typedef struct acpi_gen_regaddr {
96  u8 space_id; /* Address space ID */
97  u8 bit_width; /* Register size in bits */
98  u8 bit_offset; /* Register bit offset */
99  u8 access_size; /* Access size since ACPI 2.0c */
100  u32 addrl; /* Register address, low 32 bits */
101  u32 addrh; /* Register address, high 32 bits */
103 
104 #define ACPI_ADDRESS_SPACE_MEMORY 0 /* System memory */
105 #define ACPI_ADDRESS_SPACE_IO 1 /* System I/O */
106 #define ACPI_ADDRESS_SPACE_PCI 2 /* PCI config space */
107 #define ACPI_ADDRESS_SPACE_EC 3 /* Embedded controller */
108 #define ACPI_ADDRESS_SPACE_SMBUS 4 /* SMBus */
109 #define ACPI_ADDRESS_SPACE_CMOS 5 /* SystemCMOS */
110 #define ACPI_ADDRESS_SPACE_PCI_BAR_TARGET 6 /* PciBarTarget */
111 #define ACPI_ADDRESS_SPACE_IPMI 7 /* IPMI */
112 #define ACPI_ADDRESS_SPACE_GENERAL_PURPOSE_IO 8 /* GeneralPurposeIO */
113 #define ACPI_ADDRESS_SPACE_GENERIC_SERIAL_BUS 9 /* GenericSerialBus */
114 #define ACPI_ADDRESS_SPACE_PCC 0x0A /* Platform Comm. Channel */
115 #define ACPI_ADDRESS_SPACE_FIXED 0x7f /* Functional fixed hardware */
116 #define ACPI_FFIXEDHW_VENDOR_INTEL 1 /* Intel */
117 #define ACPI_FFIXEDHW_CLASS_HLT 0 /* C1 Halt */
118 #define ACPI_FFIXEDHW_CLASS_IO_HLT 1 /* C1 I/O then Halt */
119 #define ACPI_FFIXEDHW_CLASS_MWAIT 2 /* MWAIT Native C-state */
120 #define ACPI_FFIXEDHW_FLAG_HW_COORD 1 /* Hardware Coordination bit */
121 #define ACPI_FFIXEDHW_FLAG_BM_STS 2 /* BM_STS avoidance bit */
122 /* 0x80-0xbf: Reserved */
123 /* 0xc0-0xff: OEM defined */
124 
125 /* Access size definitions for Generic address structure */
126 #define ACPI_ACCESS_SIZE_UNDEFINED 0 /* Undefined (legacy reasons) */
127 #define ACPI_ACCESS_SIZE_BYTE_ACCESS 1
128 #define ACPI_ACCESS_SIZE_WORD_ACCESS 2
129 #define ACPI_ACCESS_SIZE_DWORD_ACCESS 3
130 #define ACPI_ACCESS_SIZE_QWORD_ACCESS 4
131 
132 /* Macros for common resource types */
133 #define ACPI_REG_MSR(address, offset, width) \
134  (acpi_addr_t){ \
135  .space_id = ACPI_ADDRESS_SPACE_FIXED, \
136  .access_size = ACPI_ACCESS_SIZE_QWORD_ACCESS, \
137  .addrl = address, \
138  .bit_offset = offset, \
139  .bit_width = width, \
140  }
141 
142 #define ACPI_REG_UNSUPPORTED (acpi_addr_t){0}
143 
144 /* Common ACPI HIDs */
145 #define ACPI_HID_FDC "PNP0700"
146 #define ACPI_HID_KEYBOARD "PNP0303"
147 #define ACPI_HID_MOUSE "PNP0F03"
148 #define ACPI_HID_COM "PNP0501"
149 #define ACPI_HID_LPT "PNP0400"
150 #define ACPI_HID_PNP "PNP0C02"
151 #define ACPI_HID_CONTAINER "PNP0A05"
152 
153 /* Generic ACPI header, provided by (almost) all tables */
154 typedef struct acpi_table_header {
155  char signature[4]; /* ACPI signature (4 ASCII characters) */
156  u32 length; /* Table length in bytes (incl. header) */
157  u8 revision; /* Table version (not ACPI version!) */
158  u8 checksum; /* To make sum of entire table == 0 */
159  char oem_id[6]; /* OEM identification */
160  char oem_table_id[8]; /* OEM table identification */
161  u32 oem_revision; /* OEM revision number */
162  char asl_compiler_id[4]; /* ASL compiler vendor ID */
163  u32 asl_compiler_revision; /* ASL compiler revision number */
165 
166 /* A maximum number of 32 ACPI tables ought to be enough for now. */
167 #define MAX_ACPI_TABLES 32
168 
169 /* RSDT (Root System Description Table) */
170 typedef struct acpi_rsdt {
174 
175 /* XSDT (Extended System Description Table) */
176 typedef struct acpi_xsdt {
180 
181 /* HPET timers */
182 typedef struct acpi_hpet {
190 
191 /* MCFG (PCI Express MMIO config space BAR description table) */
192 typedef struct acpi_mcfg {
196 
197 typedef struct acpi_tcpa {
203 
204 typedef struct acpi_tpm2 {
210  u8 msp[12];
214 
215 typedef struct acpi_mcfg_mmconfig {
223 
224 /*
225  * HMAT (Heterogeneous Memory Attribute Table)
226  * ACPI spec 6.4 section 5.2.27
227  */
228 typedef struct acpi_hmat {
231  /* Followed by HMAT table structure[n] */
233 
234 /* HMAT: Memory Proximity Domain Attributes structure */
235 typedef struct acpi_hmat_mpda {
236  u16 type; /* Type (0) */
238  u32 length; /* Length in bytes (40) */
247 
248 /* HMAT: System Locality Latency and Bandwidth Information structure */
249 typedef struct acpi_hmat_sllbi {
250  u16 type; /* Type (1) */
252  u32 length; /* Length in bytes */
255  /*
256  * Transfer size defined as a 5-biased power of 2 exponent,
257  * when the bandwidth/latency value is achieved.
258  */
265  /* Followed by initiator proximity domain list */
266  /* Followed by target proximity domain list */
267  /* Followed by latency / bandwidth values */
269 
270 /* HMAT: Memory Side Cache Information structure */
271 typedef struct acpi_hmat_msci {
272  u16 type; /* Type (2) */
274  u32 length; /* Length in bytes */
275  u32 domain; /* Proximity domain for the memory */
278  /* Describes level, associativity, write policy, cache line size */
281  /*
282  * Number of SMBIOS handlers that contribute to the
283  * memory side cache physical devices
284  */
286  /* Followed by SMBIOS handlers*/
288 
289 /* SRAT (System Resource Affinity Table) */
290 typedef struct acpi_srat {
294  /* Followed by static resource allocation structure[n] */
296 
297 #define ACPI_SRAT_STRUCTURE_LAPIC 0
298 #define ACPI_SRAT_STRUCTURE_MEM 1
299 #define ACPI_SRAT_STRUCTURE_GIA 5
300 
301 /* SRAT: Processor Local APIC/SAPIC Affinity Structure */
302 typedef struct acpi_srat_lapic {
303  u8 type; /* Type (0) */
304  u8 length; /* Length in bytes (16) */
305  u8 proximity_domain_7_0; /* Proximity domain bits[7:0] */
306  u8 apic_id; /* Local APIC ID */
307  u32 flags; /* Enable bit 0 = 1, other bits reserved to 0 */
308  u8 local_sapic_eid; /* Local SAPIC EID */
309  u8 proximity_domain_31_8[3]; /* Proximity domain bits[31:8] */
310  u32 clock_domain; /* _CDM Clock Domain */
312 
313 /* SRAT: Memory Affinity Structure */
314 typedef struct acpi_srat_mem {
315  u8 type; /* Type (1) */
316  u8 length; /* Length in bytes (40) */
317  u32 proximity_domain; /* Proximity domain */
319  u32 base_address_low; /* Mem range base address, low */
320  u32 base_address_high; /* Mem range base address, high */
321  u32 length_low; /* Mem range length, low */
322  u32 length_high; /* Mem range length, high */
324  u32 flags; /* Enable bit 0, hot pluggable bit 1; Non Volatile bit 2,
325  * other bits reserved to 0
326  */
327  u32 resv2[2];
329 
330 /* SRAT: Generic Initiator Affinity Structure (ACPI spec 6.4 section 5.2.16.6) */
331 typedef struct acpi_srat_gia {
332  u8 type; /* Type (5) */
333  u8 length; /* Length in bytes (32) */
335  u8 dev_handle_type; /* Device handle type */
336  u32 proximity_domain; /*Proximity domain */
337  u8 dev_handle[16]; /* Device handle */
341 
342 #define ACPI_SRAT_GIA_DEV_HANDLE_ACPI 0
343 #define ACPI_SRAT_GIA_DEV_HANDLE_PCI 1
344 
345 /* SLIT (System Locality Distance Information Table) */
346 typedef struct acpi_slit {
348  /* Followed by static resource allocation 8+byte[num*num] */
350 
351 /* MADT (Multiple APIC Description Table) */
352 typedef struct acpi_madt {
354  u32 lapic_addr; /* Local APIC address */
355  u32 flags; /* Multiple APIC flags */
357 
358 /*
359  * LPIT (Low Power Idle Table)
360  * Conforms to "Intel Low Power S0 Idle" specification, rev 002 from July 2017.
361  */
362 typedef struct acpi_lpit {
365 
366 /* LPIT: LPI descriptor flags */
367 typedef struct acpi_lpi_flags {
372 
373 /* LPIT: LPI descriptor types */
376  /* type >= 1 reserved */
377 };
378 
379 /* LPIT: LPI descriptor header */
380 typedef struct acpi_lpi_desc_hdr {
386 
387 #define ACPI_LPIT_CTR_FREQ_TSC 0
388 
389 /* LPIT: Native C-state instruction based LPI structure */
390 typedef struct acpi_lpi_desc_ncst {
393  acpi_addr_t entry_trigger; /* Entry trigger C-state */
394  uint32_t min_residency; /* Minimum residency or "break-even" in microseconds */
395  uint32_t max_latency; /* Worst case exit latency in microseconds */
397  uint64_t counter_frequency; /* Frequency in cycles per second - 0 means TSC freq */
399 
400 /* VFCT image header */
401 typedef struct acpi_vfct_image_hdr {
411  u8 VbiosContent; // dummy - copy VBIOS here
413 
414 /* VFCT (VBIOS Fetch Table) */
415 typedef struct acpi_vfct {
423 
424 typedef struct acpi_ivrs_info {
426 
427 /* IVRS IVHD (I/O Virtualization Hardware Definition Block) Type 10h */
428 typedef struct acpi_ivrs_ivhd {
441 
442 /* IVRS (I/O Virtualization Reporting Structure) Type 10h */
443 typedef struct acpi_ivrs {
447  struct acpi_ivrs_ivhd ivhd;
449 
450 /* CRAT (Component Resource Affinity Table Structure) */
457 
458 /* IVHD Type 11h IOMMU Attributes */
459 typedef struct ivhd11_iommu_attr {
466 
467 /* IVRS IVHD (I/O Virtualization Hardware Definition Block) Type 11h */
468 typedef struct acpi_ivrs_ivhd_11 {
484 
491 };
492 
493 typedef struct dev_scope {
499  struct {
504 
505 enum dmar_type {
511  DMAR_SATC = 5
512 };
513 
514 enum {
516 };
517 
518 enum {
519  ATC_REQUIRED = 1
520 };
521 
523  DMAR_INTR_REMAP = 1 << 0,
526 };
527 
528 typedef struct dmar_entry {
536 
537 typedef struct dmar_rmrr_entry {
545 
546 typedef struct dmar_atsr_entry {
553 
554 typedef struct dmar_rhsa_entry {
561 
562 typedef struct dmar_andd_entry {
569 
570 typedef struct dmar_satc_entry {
577 
578 /* DMAR (DMA Remapping Reporting Structure) */
579 typedef struct acpi_dmar {
586 
587 /* MADT: APIC Structure Types */
589  LOCAL_APIC, /* Processor local APIC */
590  IO_APIC, /* I/O APIC */
591  IRQ_SOURCE_OVERRIDE, /* Interrupt source override */
592  NMI_TYPE, /* NMI source */
593  LOCAL_APIC_NMI, /* Local APIC NMI */
594  LAPIC_ADDRESS_OVERRIDE, /* Local APIC address override */
595  IO_SAPIC, /* I/O SAPIC */
596  LOCAL_SAPIC, /* Local SAPIC */
597  PLATFORM_IRQ_SOURCES, /* Platform interrupt sources */
598  LOCAL_X2APIC, /* Processor local x2APIC */
599  LOCAL_X2APIC_NMI, /* Local x2APIC NMI */
600  GICC, /* GIC CPU Interface */
601  GICD, /* GIC Distributor */
602  GIC_MSI_FRAME, /* GIC MSI Frame */
603  GICR, /* GIC Redistributor */
604  GIC_ITS, /* Interrupt Translation Service */
605  /* 0x10-0x7f: Reserved */
606  /* 0x80-0xff: Reserved for OEM use */
607 };
608 
609 /* MADT: Processor Local APIC Structure */
610 typedef struct acpi_madt_lapic {
611  u8 type; /* Type (0) */
612  u8 length; /* Length in bytes (8) */
613  u8 processor_id; /* ACPI processor ID */
614  u8 apic_id; /* Local APIC ID */
615  u32 flags; /* Local APIC flags */
617 
618 /* MADT: Local APIC NMI Structure */
619 typedef struct acpi_madt_lapic_nmi {
620  u8 type; /* Type (4) */
621  u8 length; /* Length in bytes (6) */
622  u8 processor_id; /* ACPI processor ID */
623  u16 flags; /* MPS INTI flags */
624  u8 lint; /* Local APIC LINT# */
626 
627 #define ACPI_MADT_LAPIC_NMI_ALL_PROCESSORS 0xff
628 
629 /* MADT: I/O APIC Structure */
630 typedef struct acpi_madt_ioapic {
631  u8 type; /* Type (1) */
632  u8 length; /* Length in bytes (12) */
633  u8 ioapic_id; /* I/O APIC ID */
635  u32 ioapic_addr; /* I/O APIC address */
636  u32 gsi_base; /* Global system interrupt base */
638 
639 /* MADT: Interrupt Source Override Structure */
640 typedef struct acpi_madt_irqoverride {
641  u8 type; /* Type (2) */
642  u8 length; /* Length in bytes (10) */
643  u8 bus; /* ISA (0) */
644  u8 source; /* Bus-relative int. source (IRQ) */
645  u32 gsirq; /* Global system interrupt */
646  u16 flags; /* MPS INTI flags */
648 
649 /* MADT: Processor Local x2APIC Structure */
650 typedef struct acpi_madt_lx2apic {
651  u8 type; /* Type (9) */
652  u8 length; /* Length in bytes (16) */
654  u32 x2apic_id; /* Local x2APIC ID */
655  u32 flags; /* Same as Local APIC flags */
656  u32 processor_id; /* ACPI processor ID */
658 
659 /* MADT: Processor Local x2APIC NMI Structure */
660 typedef struct acpi_madt_lx2apic_nmi {
661  u8 type; /* Type (10) */
662  u8 length; /* Length in bytes (12) */
663  u16 flags; /* Same as MPS INTI flags */
664  u32 processor_id; /* ACPI processor ID */
665  u8 lint; /* Local APIC LINT# */
668 
669 #define ACPI_DBG2_PORT_SERIAL 0x8000
670 #define ACPI_DBG2_PORT_SERIAL_16550 0x0000
671 #define ACPI_DBG2_PORT_SERIAL_16550_DBGP 0x0001
672 #define ACPI_DBG2_PORT_SERIAL_ARM_PL011 0x0003
673 #define ACPI_DBG2_PORT_SERIAL_ARM_SBSA 0x000e
674 #define ACPI_DBG2_PORT_SERIAL_ARM_DDC 0x000f
675 #define ACPI_DBG2_PORT_SERIAL_BCM2835 0x0010
676 #define ACPI_DBG2_PORT_IEEE1394 0x8001
677 #define ACPI_DBG2_PORT_IEEE1394_STANDARD 0x0000
678 #define ACPI_DBG2_PORT_USB 0x8002
679 #define ACPI_DBG2_PORT_USB_XHCI 0x0000
680 #define ACPI_DBG2_PORT_USB_EHCI 0x0001
681 #define ACPI_DBG2_PORT_NET 0x8003
682 
683 /* DBG2: Microsoft Debug Port Table 2 header */
684 typedef struct acpi_dbg2_header {
688 } __attribute__((packed)) acpi_dbg2_header_t;
689 
690 /* DBG2: Microsoft Debug Port Table 2 device entry */
691 typedef struct acpi_dbg2_device {
704 } __attribute__((packed)) acpi_dbg2_device_t;
705 
706 /* FADT (Fixed ACPI Description Table) */
707 typedef struct acpi_fadt {
711  u8 reserved; /* Should be 0 */
749  u16 ARM_boot_arch; /* Must be zero if ACPI Revision <= 5.0 */
750  u8 FADT_MinorVersion; /* Must be zero if ACPI Revision <= 5.0 */
763  /* Revision 5 */
766  /* Revision 6 */
769 
770 /* FADT TABLE Revision values */
771 #define ACPI_FADT_REV_ACPI_1 1
772 #define ACPI_FADT_REV_ACPI_2 3
773 #define ACPI_FADT_REV_ACPI_3 4
774 #define ACPI_FADT_REV_ACPI_4 4
775 #define ACPI_FADT_REV_ACPI_5 5
776 #define ACPI_FADT_REV_ACPI_6 6
777 
778 /* FADT Minor Version value:
779  * Bits 0-3: minor version
780  * Bits 4-7: Errata
781  * value of 1 means this is compatible with Errata A,
782  * value of 2 would be compatible with Errata B, and so on
783  * Version 6.3 Errata A would be: (1 << 4) | 3
784  */
785 #define ACPI_FADT_MINOR_VERSION_0 0 /* coreboot currently use this version */
786 
787 /* Flags for p_lvl2_lat and p_lvl3_lat */
788 #define ACPI_FADT_C2_NOT_SUPPORTED 101
789 #define ACPI_FADT_C3_NOT_SUPPORTED 1001
790 
791 /* FADT Feature Flags */
792 #define ACPI_FADT_WBINVD (1 << 0)
793 #define ACPI_FADT_WBINVD_FLUSH (1 << 1)
794 #define ACPI_FADT_C1_SUPPORTED (1 << 2)
795 #define ACPI_FADT_C2_MP_SUPPORTED (1 << 3)
796 #define ACPI_FADT_POWER_BUTTON (1 << 4)
797 #define ACPI_FADT_SLEEP_BUTTON (1 << 5)
798 #define ACPI_FADT_FIXED_RTC (1 << 6)
799 #define ACPI_FADT_S4_RTC_WAKE (1 << 7)
800 #define ACPI_FADT_32BIT_TIMER (1 << 8)
801 #define ACPI_FADT_DOCKING_SUPPORTED (1 << 9)
802 #define ACPI_FADT_RESET_REGISTER (1 << 10)
803 #define ACPI_FADT_SEALED_CASE (1 << 11)
804 #define ACPI_FADT_HEADLESS (1 << 12)
805 #define ACPI_FADT_SLEEP_TYPE (1 << 13)
806 #define ACPI_FADT_PCI_EXPRESS_WAKE (1 << 14)
807 #define ACPI_FADT_PLATFORM_CLOCK (1 << 15)
808 #define ACPI_FADT_S4_RTC_VALID (1 << 16)
809 #define ACPI_FADT_REMOTE_POWER_ON (1 << 17)
810 #define ACPI_FADT_APIC_CLUSTER (1 << 18)
811 #define ACPI_FADT_APIC_PHYSICAL (1 << 19)
812 /* Bits 20-31: reserved ACPI 3.0 & 4.0 */
813 #define ACPI_FADT_HW_REDUCED_ACPI (1 << 20)
814 #define ACPI_FADT_LOW_PWR_IDLE_S0 (1 << 21)
815 /* bits 22-31: reserved since ACPI 5.0 */
816 
817 /* FADT Boot Architecture Flags */
818 #define ACPI_FADT_LEGACY_DEVICES (1 << 0)
819 #define ACPI_FADT_8042 (1 << 1)
820 #define ACPI_FADT_VGA_NOT_PRESENT (1 << 2)
821 #define ACPI_FADT_MSI_NOT_SUPPORTED (1 << 3)
822 #define ACPI_FADT_NO_PCIE_ASPM_CONTROL (1 << 4)
823 #define ACPI_FADT_NO_CMOS_RTC (1 << 5)
824 #define ACPI_FADT_LEGACY_FREE 0x00 /* No legacy devices (including 8042) */
825 
826 /* FADT ARM Boot Architecture Flags */
827 #define ACPI_FADT_ARM_PSCI_COMPLIANT (1 << 0)
828 #define ACPI_FADT_ARM_PSCI_USE_HVC (1 << 1)
829 /* bits 2-16: reserved since ACPI 5.1 */
830 
831 /* FADT Preferred Power Management Profile */
841  PM_TABLET = 8, /* ACPI 5.0 & greater */
842 };
843 
844 /* FACS (Firmware ACPI Control Structure) */
845 typedef struct acpi_facs {
846  char signature[4]; /* "FACS" */
847  u32 length; /* Length in bytes (>= 64) */
848  u32 hardware_signature; /* Hardware signature */
849  u32 firmware_waking_vector; /* Firmware waking vector */
850  u32 global_lock; /* Global lock */
851  u32 flags; /* FACS flags */
852  u32 x_firmware_waking_vector_l; /* X FW waking vector, low */
853  u32 x_firmware_waking_vector_h; /* X FW waking vector, high */
854  u8 version; /* FACS version */
855  u8 resv1[3]; /* This value is 0 */
856  u32 ospm_flags; /* 64BIT_WAKE_F */
857  u8 resv2[24]; /* This value is 0 */
859 
860 /* FACS flags */
861 #define ACPI_FACS_S4BIOS_F (1 << 0)
862 #define ACPI_FACS_64BIT_WAKE_F (1 << 1)
863 /* Bits 31..2: reserved */
864 
865 /* ECDT (Embedded Controller Boot Resources Table) */
866 typedef struct acpi_ecdt {
868  acpi_addr_t ec_control; /* EC control register */
869  acpi_addr_t ec_data; /* EC data register */
870  u32 uid; /* UID */
871  u8 gpe_bit; /* GPE bit */
872  u8 ec_id[]; /* EC ID */
874 
875 /* HEST (Hardware Error Source Table) */
876 typedef struct acpi_hest {
879  /* error_source_struct(s) */
881 
882 /* Error Source Descriptors */
883 typedef struct acpi_hest_esd {
889  u32 prealloc_erecords; /* The number of error records to
890  * pre-allocate for this error source.
891  */
894 
895 /* Hardware Error Notification */
896 typedef struct acpi_hest_hen {
899  u16 conf_we; /* Configuration Write Enable */
907 
908 /* BERT (Boot Error Record Table) */
909 typedef struct acpi_bert {
914 
915 /* Generic Error Data Entry */
916 typedef struct acpi_hest_generic_data {
917  guid_t section_type;
923  guid_t fru_id;
925  /* error data */
927 
928 /* Generic Error Data Entry v300 */
930  guid_t section_type;
934  u8 flags; /* see CPER Section Descriptor, Flags field */
936  guid_t fru_id;
939  /* error data */
941 #define HEST_GENERIC_ENTRY_V300 0x300
942 
943 /* Both Generic Error Status & Generic Error Data Entry, Error Severity field */
944 #define ACPI_GENERROR_SEV_RECOVERABLE 0
945 #define ACPI_GENERROR_SEV_FATAL 1
946 #define ACPI_GENERROR_SEV_CORRECTED 2
947 #define ACPI_GENERROR_SEV_NONE 3
948 
949 /* Generic Error Data Entry, Validation Bits field */
950 #define ACPI_GENERROR_VALID_FRUID BIT(0)
951 #define ACPI_GENERROR_VALID_FRUID_TEXT BIT(1)
952 #define ACPI_GENERROR_VALID_TIMESTAMP BIT(2)
953 
954 /*
955  * Generic Error Status Block
956  *
957  * If there is a raw data section at the end of the generic error status block after the
958  * zero or more generic error data entries, raw_data_length indicates the length of the raw
959  * section and raw_data_offset is the offset of the beginning of the raw data section from
960  * the start of the acpi_generic_error_status block it is contained in. So if raw_data_length
961  * is non-zero, raw_data_offset must be at least sizeof(acpi_generic_error_status_t).
962  */
965  u32 raw_data_offset; /* must follow any generic entries */
967  u32 data_length; /* generic data */
969  /* Generic Error Data structures, zero or more entries */
971 
972 /* Generic Status Block, Block Status values */
973 #define GENERIC_ERR_STS_UNCORRECTABLE_VALID BIT(0)
974 #define GENERIC_ERR_STS_CORRECTABLE_VALID BIT(1)
975 #define GENERIC_ERR_STS_MULT_UNCORRECTABLE BIT(2)
976 #define GENERIC_ERR_STS_MULT_CORRECTABLE BIT(3)
977 #define GENERIC_ERR_STS_ENTRY_COUNT_SHIFT 4
978 #define GENERIC_ERR_STS_ENTRY_COUNT_MAX 0x3ff
979 #define GENERIC_ERR_STS_ENTRY_COUNT_MASK \
980  (GENERIC_ERR_STS_ENTRY_COUNT_MAX \
981  << GENERIC_ERR_STS_ENTRY_COUNT_SHIFT)
982 
983 typedef struct acpi_cstate {
989 
997 } __packed;
998 
1008 } __packed;
1009 
1010 typedef struct acpi_tstate {
1017 
1021 };
1022 
1023 /* Low Power Idle State */
1034  const char *state_name;
1035 };
1036 
1037 /* Port types for ACPI _UPC object */
1051  /*
1052  * The following types are not directly defined in the ACPI
1053  * spec but are used by coreboot to identify a USB device type.
1054  */
1057  UPC_TYPE_HUB
1058 };
1059 
1066 };
1067 
1068 #define ACPI_IPMI_PCI_DEVICE_FLAG (1 << 0)
1069 #define ACPI_IPMI_INT_TYPE_SCI (1 << 0)
1070 #define ACPI_IPMI_INT_TYPE_APIC (1 << 1)
1071 
1072 /* ACPI IPMI 2.0 */
1073 struct acpi_spmi {
1082 
1085  union {
1086  struct {
1091  };
1092  u8 uid[4];
1093  };
1095 } __packed;
1096 
1097 /* EINJ APEI Standard Definitions */
1098 /* EINJ Error Types
1099  Refer to the ACPI spec, EINJ section, for more info on bit definitions
1100 */
1101 #define ACPI_EINJ_CPU_CE (1 << 0)
1102 #define ACPI_EINJ_CPU_UCE (1 << 1)
1103 #define ACPI_EINJ_CPU_UCE_FATAL (1 << 2)
1104 #define ACPI_EINJ_MEM_CE (1 << 3)
1105 #define ACPI_EINJ_MEM_UCE (1 << 4)
1106 #define ACPI_EINJ_MEM_UCE_FATAL (1 << 5)
1107 #define ACPI_EINJ_PCIE_CE (1 << 6)
1108 #define ACPI_EINJ_PCIE_UCE_NON_FATAL (1 << 7)
1109 #define ACPI_EINJ_PCIE_UCE_FATAL (1 << 8)
1110 #define ACPI_EINJ_PLATFORM_CE (1 << 9)
1111 #define ACPI_EINJ_PLATFORM_UCE (1 << 10)
1112 #define ACPI_EINJ_PLATFORM_UCE_FATAL (1 << 11)
1113 #define ACPI_EINJ_VENDOR_DEFINED (1 << 31)
1114 #define ACPI_EINJ_DEFAULT_CAP (ACPI_EINJ_MEM_CE | ACPI_EINJ_MEM_UCE | \
1115  ACPI_EINJ_PCIE_CE | ACPI_EINJ_PCIE_UCE_FATAL)
1116 
1117 /* EINJ actions */
1118 #define ACTION_COUNT 9
1119 #define BEGIN_INJECT_OP 0x00
1120 #define GET_TRIGGER_ACTION_TABLE 0x01
1121 #define SET_ERROR_TYPE 0x02
1122 #define GET_ERROR_TYPE 0x03
1123 #define END_INJECT_OP 0x04
1124 #define EXECUTE_INJECT_OP 0x05
1125 #define CHECK_BUSY_STATUS 0x06
1126 #define GET_CMD_STATUS 0x07
1127 #define SET_ERROR_TYPE_WITH_ADDRESS 0x08
1128 #define TRIGGER_ERROR 0xFF
1129 
1130 /* EINJ Instructions */
1131 #define READ_REGISTER 0x00
1132 #define READ_REGISTER_VALUE 0x01
1133 #define WRITE_REGISTER 0x02
1134 #define WRITE_REGISTER_VALUE 0x03
1135 #define NO_OP 0x04
1136 
1137 /* EINJ (Error Injection Table) */
1138 typedef struct acpi_gen_regaddr1 {
1139  u8 space_id; /* Address space ID */
1140  u8 bit_width; /* Register size in bits */
1141  u8 bit_offset; /* Register bit offset */
1142  u8 access_size; /* Access size since ACPI 2.0c */
1143  u64 addr; /* Register address */
1145 
1146 /* Instruction entry */
1147 typedef struct acpi_einj_action_table {
1155 
1156 typedef struct acpi_injection_header {
1161 
1162 typedef struct acpi_einj_trigger_table {
1169 
1170 typedef struct set_error_type {
1179 
1180 #define EINJ_PARAM_NUM 6
1181 typedef struct acpi_einj_smi {
1193 
1194 /* EINJ Flags */
1195 #define EINJ_DEF_TRIGGER_PORT 0xb2
1196 #define FLAG_PRESERVE 0x01
1197 #define FLAG_IGNORE 0x00
1198 
1199 /* EINJ Registers */
1200 #define EINJ_REG_MEMORY(address) \
1201  { \
1202  .space_id = ACPI_ADDRESS_SPACE_MEMORY, \
1203  .bit_width = 64, \
1204  .bit_offset = 0, \
1205  .access_size = ACPI_ACCESS_SIZE_QWORD_ACCESS, \
1206  .addr = address}
1207 
1208 #define EINJ_REG_IO() \
1209  { \
1210  .space_id = ACPI_ADDRESS_SPACE_IO, \
1211  .bit_width = 0x10, \
1212  .bit_offset = 0, \
1213  .access_size = ACPI_ACCESS_SIZE_WORD_ACCESS, \
1214  .addr = EINJ_DEF_TRIGGER_PORT} /* HW dependent code can override this also */
1215 
1216 typedef struct acpi_einj {
1221 
1222 
1224 void acpi_create_einj(acpi_einj_t *einj, uintptr_t addr, u8 actions);
1225 
1226 unsigned long fw_cfg_acpi_tables(unsigned long start);
1227 
1228 /* These are implemented by the target port or north/southbridge. */
1229 void preload_acpi_dsdt(void);
1230 unsigned long write_acpi_tables(unsigned long addr);
1231 unsigned long acpi_fill_madt(unsigned long current);
1232 unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current);
1233 void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id);
1234 void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length);
1235 void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt);
1236 
1237 void acpi_fill_fadt(acpi_fadt_t *fadt);
1238 void arch_fill_fadt(acpi_fadt_t *fadt);
1239 void soc_fill_fadt(acpi_fadt_t *fadt);
1240 void mainboard_fill_fadt(acpi_fadt_t *fadt);
1241 
1242 void acpi_fill_gnvs(void);
1243 void acpi_fill_cnvs(void);
1244 
1245 unsigned long acpi_fill_lpit(unsigned long current);
1246 
1247 /* These can be used by the target port. */
1248 u8 acpi_checksum(u8 *table, u32 length);
1249 
1250 void acpi_add_table(acpi_rsdp_t *rsdp, void *table);
1251 
1252 int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic);
1254  u32 gsi_base);
1256  u8 bus, u8 source, u32 gsirq, u16 flags);
1258  u16 flags, u8 lint);
1259 void acpi_create_madt(acpi_madt_t *madt);
1260 unsigned long acpi_create_madt_lapics(unsigned long current);
1261 int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic);
1263  u16 flags, u8 lint);
1264 int acpi_create_srat_lapic(acpi_srat_lapic_t *lapic, u8 node, u8 apic);
1265 int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek,
1266  u32 flags);
1267 /*
1268  * Given the Generic Initiator device's BDF, the proximity domain's ID
1269  * and flag, create Generic Initiator Affinity structure in SRAT.
1270  */
1271 int acpi_create_srat_gia_pci(acpi_srat_gia_t *gia, u32 proximity_domain,
1272  u16 seg, u8 bus, u8 dev, u8 func, u32 flags);
1274  u16 seg_nr, u8 start, u8 end);
1275 unsigned long acpi_create_srat_lapics(unsigned long current);
1276 void acpi_create_srat(acpi_srat_t *srat,
1277  unsigned long (*acpi_fill_srat)(unsigned long current));
1278 
1279 void acpi_create_slit(acpi_slit_t *slit,
1280  unsigned long (*acpi_fill_slit)(unsigned long current));
1281 
1282 /*
1283  * Create a Memory Proximity Domain Attributes structure for HMAT,
1284  * given proximity domain for the attached initiaor, and
1285  * proximimity domain for the memory.
1286  */
1287 int acpi_create_hmat_mpda(acpi_hmat_mpda_t *mpda, u32 initiator, u32 memory);
1288 /* Create Heterogeneous Memory Attribute Table */
1289 void acpi_create_hmat(acpi_hmat_t *hmat,
1290  unsigned long (*acpi_fill_hmat)(unsigned long current));
1291 
1292 void acpi_create_vfct(const struct device *device,
1293  acpi_vfct_t *vfct,
1294  unsigned long (*acpi_fill_vfct)(const struct device *device,
1295  acpi_vfct_t *vfct_struct,
1296  unsigned long current));
1297 
1298 void acpi_create_ipmi(const struct device *device,
1299  struct acpi_spmi *spmi,
1300  const u16 ipmi_revision,
1301  const acpi_addr_t *addr,
1302  const enum acpi_ipmi_interface_type type,
1303  const s8 gpe_interrupt,
1304  const u32 apic_interrupt,
1305  const u32 uid);
1306 
1307 void acpi_create_ivrs(acpi_ivrs_t *ivrs,
1308  unsigned long (*acpi_fill_ivrs)(acpi_ivrs_t *ivrs_struct,
1309  unsigned long current));
1310 
1311 void acpi_create_crat(struct acpi_crat_header *crat,
1312  unsigned long (*acpi_fill_crat)(struct acpi_crat_header *crat_struct,
1313  unsigned long current));
1314 
1315 void acpi_create_hpet(acpi_hpet_t *hpet);
1316 unsigned long acpi_write_hpet(const struct device *device, unsigned long start,
1317  acpi_rsdp_t *rsdp);
1318 
1319 /* cpu/intel/speedstep/acpi.c */
1320 void generate_cpu_entries(const struct device *device);
1321 
1322 void acpi_create_mcfg(acpi_mcfg_t *mcfg);
1323 
1324 void acpi_create_facs(acpi_facs_t *facs);
1325 
1326 void acpi_create_dbg2(acpi_dbg2_header_t *dbg2_header,
1327  int port_type, int port_subtype,
1328  acpi_addr_t *address, uint32_t address_size,
1329  const char *device_path);
1330 
1331 unsigned long acpi_write_dbg2_pci_uart(acpi_rsdp_t *rsdp, unsigned long current,
1332  const struct device *dev, uint8_t access_size);
1333 void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
1334  unsigned long (*acpi_fill_dmar)(unsigned long));
1335 unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags,
1336  u16 segment, u64 bar);
1337 unsigned long acpi_create_dmar_rmrr(unsigned long current, u16 segment,
1338  u64 bar, u64 limit);
1339 unsigned long acpi_create_dmar_atsr(unsigned long current, u8 flags,
1340  u16 segment);
1341 unsigned long acpi_create_dmar_rhsa(unsigned long current, u64 base_addr,
1342  u32 proximity_domain);
1343 unsigned long acpi_create_dmar_andd(unsigned long current, u8 device_number,
1344  const char *device_name);
1345 unsigned long acpi_create_dmar_satc(unsigned long current, u8 flags,
1346  u16 segment);
1347 void acpi_dmar_drhd_fixup(unsigned long base, unsigned long current);
1348 void acpi_dmar_rmrr_fixup(unsigned long base, unsigned long current);
1349 void acpi_dmar_atsr_fixup(unsigned long base, unsigned long current);
1350 void acpi_dmar_satc_fixup(unsigned long base, unsigned long current);
1351 unsigned long acpi_create_dmar_ds_pci_br(unsigned long current,
1352  u8 bus, u8 dev, u8 fn);
1353 unsigned long acpi_create_dmar_ds_pci(unsigned long current,
1354  u8 bus, u8 dev, u8 fn);
1355 unsigned long acpi_create_dmar_ds_ioapic(unsigned long current,
1356  u8 enumeration_id,
1357  u8 bus, u8 dev, u8 fn);
1358 unsigned long acpi_create_dmar_ds_msi_hpet(unsigned long current,
1359  u8 enumeration_id,
1360  u8 bus, u8 dev, u8 fn);
1361 void acpi_write_hest(acpi_hest_t *hest,
1362  unsigned long (*acpi_fill_hest)(acpi_hest_t *hest));
1363 
1364 unsigned long acpi_create_hest_error_source(acpi_hest_t *hest,
1365  acpi_hest_esd_t *esd, u16 type, void *data, u16 len);
1366 
1367 void acpi_create_lpit(acpi_lpit_t *lpit);
1368 unsigned long acpi_create_lpi_desc_ncst(acpi_lpi_desc_ncst_t *lpi_desc, uint16_t uid);
1369 
1370 /* chipsets that select ACPI_BERT must implement this function */
1371 enum cb_err acpi_soc_get_bert_region(void **region, size_t *length);
1372 
1373 /* For ACPI S3 support. */
1374 void __noreturn acpi_resume(void *wake_vec);
1375 void mainboard_suspend_resume(void);
1376 void *acpi_find_wakeup_vector(void);
1377 
1378 /* ACPI_Sn assignments are defined to always equal the sleep state numbers */
1379 enum {
1380  ACPI_S0 = 0,
1381  ACPI_S1 = 1,
1382  ACPI_S2 = 2,
1383  ACPI_S3 = 3,
1384  ACPI_S4 = 4,
1385  ACPI_S5 = 5,
1386 };
1387 
1388 #if CONFIG(ACPI_INTEL_HARDWARE_SLEEP_VALUES) \
1389  || CONFIG(ACPI_AMD_HARDWARE_SLEEP_VALUES)
1390 /* Given the provided PM1 control register return the ACPI sleep type. */
1391 static inline int acpi_sleep_from_pm1(uint32_t pm1_cnt)
1392 {
1393  switch (((pm1_cnt) & SLP_TYP) >> SLP_TYP_SHIFT) {
1394  case SLP_TYP_S0: return ACPI_S0;
1395  case SLP_TYP_S1: return ACPI_S1;
1396  case SLP_TYP_S3: return ACPI_S3;
1397  case SLP_TYP_S4: return ACPI_S4;
1398  case SLP_TYP_S5: return ACPI_S5;
1399  }
1400  return -1;
1401 }
1402 #endif
1403 
1405 
1406 /* Returns ACPI_Sx values. */
1407 int acpi_get_sleep_type(void);
1408 
1409 /* Read and clear GPE status */
1410 int acpi_get_gpe(int gpe);
1411 
1412 /* Once we enter payload, is SMI handler installed and capable of
1413  responding to APM_CNT Advanced Power Management Control commands. */
1414 static inline int permanent_smi_handler(void)
1415 {
1416  return CONFIG(HAVE_SMI_HANDLER);
1417 }
1418 
1419 static inline int acpi_s3_resume_allowed(void)
1420 {
1421  return CONFIG(HAVE_ACPI_RESUME);
1422 }
1423 
1424 static inline int acpi_is_wakeup_s3(void)
1425 {
1426  if (!acpi_s3_resume_allowed())
1427  return 0;
1428 
1430  return (acpi_get_sleep_type() == ACPI_S3);
1431 
1432  return romstage_handoff_is_resume();
1433 }
1434 
1436 {
1437  return ALIGN_UP(current, 16);
1438 }
1439 
1440 /* ACPI table revisions should match the revision of the ACPI spec
1441  * supported. This function keeps the table versions synced. This could
1442  * be made into a weak function if there is ever a need to override the
1443  * coreboot default ACPI spec version supported. */
1444 int get_acpi_table_revision(enum acpi_tables table);
1446 
1447 #endif // !defined(__ASSEMBLER__) && !defined(__ACPI__)
1448 
1449 #endif /* __ACPI_ACPI_H__ */
#define ALIGN_UP(x, a)
Definition: helpers.h:17
cb_err
coreboot error codes
Definition: cb_err.h:15
static u32 addr
Definition: cirrus.c:14
#define __noreturn
Definition: compiler.h:31
@ CONFIG
Definition: dsi_common.h:201
uint64_t length
Definition: fw_cfg_if.h:1
uint64_t address
Definition: fw_cfg_if.h:0
struct set_error_type set_error_type_t
struct acpi_madt_lx2apic acpi_madt_lx2apic_t
struct acpi_einj_action_table acpi_einj_action_table_t
acpi_device_sleep_states
Definition: acpi.h:47
@ ACPI_DEVICE_SLEEP_D3
Definition: acpi.h:51
@ ACPI_DEVICE_SLEEP_D2
Definition: acpi.h:50
@ ACPI_DEVICE_SLEEP_D3_HOT
Definition: acpi.h:52
@ ACPI_DEVICE_SLEEP_D1
Definition: acpi.h:49
@ ACPI_DEVICE_SLEEP_D0
Definition: acpi.h:48
@ ACPI_DEVICE_SLEEP_D3_COLD
Definition: acpi.h:53
unsigned long acpi_create_lpi_desc_ncst(acpi_lpi_desc_ncst_t *lpi_desc, uint16_t uid)
Definition: acpi.c:1559
struct acpi_injection_header acpi_injection_header_t
#define ACTION_COUNT
Definition: acpi.h:1118
void acpi_create_madt(acpi_madt_t *madt)
Definition: acpi.c:227
unsigned long fw_cfg_acpi_tables(unsigned long start)
Definition: acpi.c:1569
struct acpi_generic_error_status acpi_generic_error_status_t
void acpi_create_srat(acpi_srat_t *srat, unsigned long(*acpi_fill_srat)(unsigned long current))
Definition: acpi.c:532
struct acpi_einj acpi_einj_t
struct acpi_hmat_msci acpi_hmat_msci_t
struct acpi_mcfg acpi_mcfg_t
struct acpi_einj_smi acpi_einj_smi_t
void arch_fill_fadt(acpi_fadt_t *fadt)
Definition: acpi.c:1482
struct acpi_madt_lx2apic_nmi acpi_madt_lx2apic_nmi_t
static uintptr_t acpi_align_current(uintptr_t current)
Definition: acpi.h:1435
struct acpi_xsdt acpi_xsdt_t
acpi_ipmi_interface_type
Definition: acpi.h:1060
@ IPMI_INTERFACE_SMIC
Definition: acpi.h:1063
@ IPMI_INTERFACE_SSIF
Definition: acpi.h:1065
@ IPMI_INTERFACE_KCS
Definition: acpi.h:1062
@ IPMI_INTERFACE_BT
Definition: acpi.h:1064
@ IPMI_INTERFACE_RESERVED
Definition: acpi.h:1061
acpi_lpi_desc_type
Definition: acpi.h:374
@ ACPI_LPI_DESC_TYPE_NATIVE_CSTATE
Definition: acpi.h:375
acpi_apic_types
Definition: acpi.h:588
@ LOCAL_APIC
Definition: acpi.h:589
@ GIC_ITS
Definition: acpi.h:604
@ NMI_TYPE
Definition: acpi.h:592
@ IO_SAPIC
Definition: acpi.h:595
@ LOCAL_X2APIC
Definition: acpi.h:598
@ LOCAL_SAPIC
Definition: acpi.h:596
@ LAPIC_ADDRESS_OVERRIDE
Definition: acpi.h:594
@ IRQ_SOURCE_OVERRIDE
Definition: acpi.h:591
@ LOCAL_APIC_NMI
Definition: acpi.h:593
@ GICD
Definition: acpi.h:601
@ IO_APIC
Definition: acpi.h:590
@ GIC_MSI_FRAME
Definition: acpi.h:602
@ PLATFORM_IRQ_SOURCES
Definition: acpi.h:597
@ GICR
Definition: acpi.h:603
@ LOCAL_X2APIC_NMI
Definition: acpi.h:599
@ GICC
Definition: acpi.h:600
unsigned long acpi_create_dmar_ds_ioapic(unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn)
Definition: acpi.c:775
unsigned long acpi_create_madt_lapics(unsigned long current)
Definition: acpi.c:144
int acpi_create_madt_lx2apic_nmi(acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu, u16 flags, u8 lint)
Definition: acpi.c:212
@ DRHD_INCLUDE_PCI_ALL
Definition: acpi.h:515
void acpi_create_lpit(acpi_lpit_t *lpit)
Definition: acpi.c:1531
struct acpi_dmar acpi_dmar_t
struct acpi_madt_lapic_nmi acpi_madt_lapic_nmi_t
void acpi_dmar_satc_fixup(unsigned long base, unsigned long current)
Definition: acpi.c:737
struct acpi_dbg2_device acpi_dbg2_device_t
unsigned long acpi_create_dmar_rmrr(unsigned long current, u16 segment, u64 bar, u64 limit)
Definition: acpi.c:652
void acpi_create_ivrs(acpi_ivrs_t *ivrs, unsigned long(*acpi_fill_ivrs)(acpi_ivrs_t *ivrs_struct, unsigned long current))
Definition: acpi.c:1083
void acpi_create_dbg2(acpi_dbg2_header_t *dbg2_header, int port_type, int port_subtype, acpi_addr_t *address, uint32_t address_size, const char *device_path)
Definition: acpi.c:1160
unsigned long acpi_create_srat_lapics(unsigned long current)
Definition: nb_acpi.c:22
void acpi_create_mcfg(acpi_mcfg_t *mcfg)
Definition: acpi.c:268
uintptr_t get_coreboot_rsdp(void)
Definition: acpi.c:1587
struct acpi_hest_hen acpi_hest_hen_t
static int permanent_smi_handler(void)
Definition: acpi.h:1414
void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
Definition: acpi.c:1486
void acpi_create_facs(acpi_facs_t *facs)
Definition: acpi.c:1281
acpi_lpi_state_flags
Definition: acpi.h:1018
@ ACPI_LPI_STATE_DISABLED
Definition: acpi.h:1019
@ ACPI_LPI_STATE_ENABLED
Definition: acpi.h:1020
void generate_cpu_entries(const struct device *device)
Generate ACPI entries for Speedstep for each cpu.
Definition: acpi.c:334
unsigned long acpi_write_dbg2_pci_uart(acpi_rsdp_t *rsdp, unsigned long current, const struct device *dev, uint8_t access_size)
Definition: acpi.c:1230
void __noreturn acpi_resume(void *wake_vec)
Definition: acpi_s3.c:18
void preload_acpi_dsdt(void)
Definition: acpi.c:1574
void acpi_dmar_drhd_fixup(unsigned long base, unsigned long current)
Definition: acpi.c:719
void acpi_create_ipmi(const struct device *device, struct acpi_spmi *spmi, const u16 ipmi_revision, const acpi_addr_t *addr, const enum acpi_ipmi_interface_type type, const s8 gpe_interrupt, const u32 apic_interrupt, const u32 uid)
Definition: acpi.c:1032
void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
Add an ACPI table to the RSDT (and XSDT) structure, recalculate length and checksum.
Definition: acpi.c:49
struct acpi_hmat acpi_hmat_t
struct acpi_lpi_desc_ncst acpi_lpi_desc_ncst_t
acpi_upc_type
Definition: acpi.h:1038
@ UPC_TYPE_MINI_AB
Definition: acpi.h:1040
@ UPC_TYPE_HUB
Definition: acpi.h:1057
@ UPC_TYPE_A
Definition: acpi.h:1039
@ UPC_TYPE_C_USB2_SS
Definition: acpi.h:1049
@ UPC_TYPE_USB3_POWER_B
Definition: acpi.h:1046
@ UPC_TYPE_USB3_MICRO_AB
Definition: acpi.h:1045
@ UPC_TYPE_USB3_B
Definition: acpi.h:1043
@ UPC_TYPE_C_USB2_ONLY
Definition: acpi.h:1047
@ UPC_TYPE_C_USB2_SS_SWITCH
Definition: acpi.h:1048
@ UPC_TYPE_PROPRIETARY
Definition: acpi.h:1050
@ UPC_TYPE_UNUSED
Definition: acpi.h:1056
@ UPC_TYPE_USB3_MICRO_B
Definition: acpi.h:1044
@ UPC_TYPE_INTERNAL
Definition: acpi.h:1055
@ UPC_TYPE_USB3_A
Definition: acpi.h:1042
@ UPC_TYPE_EXPRESSCARD
Definition: acpi.h:1041
void acpi_create_vfct(const struct device *device, acpi_vfct_t *vfct, unsigned long(*acpi_fill_vfct)(const struct device *device, acpi_vfct_t *vfct_struct, unsigned long current))
Definition: acpi.c:999
void acpi_create_slit(acpi_slit_t *slit, unsigned long(*acpi_fill_slit)(unsigned long current))
Definition: acpi.c:790
unsigned long acpi_create_dmar_ds_msi_hpet(unsigned long current, u8 enumeration_id, u8 bus, u8 dev, u8 fn)
Definition: acpi.c:782
struct acpi_gen_regaddr acpi_addr_t
unsigned long acpi_create_dmar_ds_pci(unsigned long current, u8 bus, u8 dev, u8 fn)
Definition: acpi.c:768
acpi_preferred_pm_profiles
Definition: acpi.h:832
@ PM_APPLIANCE_PC
Definition: acpi.h:839
@ PM_MOBILE
Definition: acpi.h:835
@ PM_UNSPECIFIED
Definition: acpi.h:833
@ PM_PERFORMANCE_SERVER
Definition: acpi.h:840
@ PM_ENTERPRISE_SERVER
Definition: acpi.h:837
@ PM_SOHO_SERVER
Definition: acpi.h:838
@ PM_DESKTOP
Definition: acpi.h:834
@ PM_WORKSTATION
Definition: acpi.h:836
@ PM_TABLET
Definition: acpi.h:841
struct acpi_vfct acpi_vfct_t
unsigned long acpi_create_dmar_ds_pci_br(unsigned long current, u8 bus, u8 dev, u8 fn)
Definition: acpi.c:761
#define EINJ_PARAM_NUM
Definition: acpi.h:1180
struct dmar_atsr_entry dmar_atsr_entry_t
u8 acpi_checksum(u8 *table, u32 length)
Definition: acpi.c:35
void acpi_fill_fadt(acpi_fadt_t *fadt)
Create the Fixed ACPI Description Tables (FADT) for any board with this SB.
Definition: acpi.c:58
void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags, unsigned long(*acpi_fill_dmar)(unsigned long))
Definition: acpi.c:607
struct acpi_hest_esd acpi_hest_esd_t
struct acpi_mcfg_mmconfig acpi_mcfg_mmconfig_t
int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic)
Definition: acpi.c:132
void acpi_fill_gnvs(void)
Definition: gnvs.c:64
void acpi_create_crat(struct acpi_crat_header *crat, unsigned long(*acpi_fill_crat)(struct acpi_crat_header *crat_struct, unsigned long current))
Definition: acpi.c:1112
unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current)
Definition: northbridge.c:244
struct dmar_satc_entry dmar_satc_entry_t
struct acpi_vfct_image_hdr acpi_vfct_image_hdr_t
void acpi_write_bert(acpi_bert_t *bert, uintptr_t region, size_t length)
Definition: acpi.c:1458
void * acpi_find_wakeup_vector(void)
Definition: acpi.c:1881
int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek, u32 flags)
Definition: acpi.c:499
static int acpi_is_wakeup_s3(void)
Definition: acpi.h:1424
struct dmar_rhsa_entry dmar_rhsa_entry_t
struct acpi_ivrs_info acpi_ivrs_info_t
static int acpi_s3_resume_allowed(void)
Definition: acpi.h:1419
int acpi_get_gpe(int gpe)
Definition: acpi.c:1944
uint8_t acpi_get_preferred_pm_profile(void)
Definition: acpi_pm.c:14
struct acpi_facs acpi_facs_t
void mainboard_fill_fadt(acpi_fadt_t *fadt)
Definition: acpi.c:1484
struct acpi_tstate acpi_tstate_t
#define MAX_ACPI_TABLES
Definition: acpi.h:167
struct acpi_srat_gia acpi_srat_gia_t
struct acpi_hest acpi_hest_t
int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
Definition: acpi.c:121
struct acpi_srat_mem acpi_srat_mem_t
dmar_flags
Definition: acpi.h:522
@ DMA_CTRL_PLATFORM_OPT_IN_FLAG
Definition: acpi.h:525
@ DMAR_INTR_REMAP
Definition: acpi.h:523
@ DMAR_X2APIC_OPT_OUT
Definition: acpi.h:524
@ ACPI_S5
Definition: acpi.h:1385
@ ACPI_S1
Definition: acpi.h:1381
@ ACPI_S2
Definition: acpi.h:1382
@ ACPI_S4
Definition: acpi.h:1384
@ ACPI_S3
Definition: acpi.h:1383
@ ACPI_S0
Definition: acpi.h:1380
dmar_type
Definition: acpi.h:505
@ DMAR_ATSR
Definition: acpi.h:508
@ DMAR_SATC
Definition: acpi.h:511
@ DMAR_ANDD
Definition: acpi.h:510
@ DMAR_RMRR
Definition: acpi.h:507
@ DMAR_RHSA
Definition: acpi.h:509
@ DMAR_DRHD
Definition: acpi.h:506
void acpi_create_einj(acpi_einj_t *einj, uintptr_t addr, u8 actions)
Definition: acpi.c:863
int acpi_create_srat_lapic(acpi_srat_lapic_t *lapic, u8 node, u8 apic)
Definition: acpi.c:485
struct acpi_srat_lapic acpi_srat_lapic_t
struct acpi_madt_irqoverride acpi_madt_irqoverride_t
int acpi_get_sleep_type(void)
Definition: acpi.c:96
struct acpi_madt_lapic acpi_madt_lapic_t
struct acpi_ecdt acpi_ecdt_t
unsigned long acpi_create_dmar_atsr(unsigned long current, u8 flags, u16 segment)
Definition: acpi.c:666
void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
Definition: acpi.c:452
struct acpi_tpm2 acpi_tpm2_t
unsigned long acpi_write_hpet(const struct device *device, unsigned long start, acpi_rsdp_t *rsdp)
Definition: acpi.c:1141
struct acpi_table_header acpi_header_t
void acpi_fill_cnvs(void)
unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, acpi_hest_esd_t *esd, u16 type, void *data, u16 len)
Definition: acpi.c:1372
struct acpi_rsdt acpi_rsdt_t
struct acpi_ivrs_ivhd acpi_ivrs_ivhd_t
void acpi_create_hpet(acpi_hpet_t *hpet)
Definition: acpi.c:819
struct acpi_madt_ioapic acpi_madt_ioapic_t
struct acpi_gen_regaddr1 acpi_addr64_t
unsigned long acpi_fill_madt(unsigned long current)
Definition: acpi_tables.c:17
struct acpi_tcpa acpi_tcpa_t
int get_acpi_table_revision(enum acpi_tables table)
Definition: acpi.c:1954
int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride, u8 bus, u8 source, u32 gsirq, u16 flags)
Definition: acpi.c:187
struct acpi_srat acpi_srat_t
int acpi_create_srat_gia_pci(acpi_srat_gia_t *gia, u32 proximity_domain, u16 seg, u8 bus, u8 dev, u8 func, u32 flags)
Definition: acpi.c:514
struct ivhd11_iommu_attr ivhd11_iommu_attr_t
int acpi_create_madt_ioapic(acpi_madt_ioapic_t *ioapic, u8 id, u32 addr, u32 gsi_base)
Definition: acpi.c:174
struct acpi_hmat_sllbi acpi_hmat_sllbi_t
struct acpi_einj_trigger_table acpi_einj_trigger_table_t
struct acpi_hmat_mpda acpi_hmat_mpda_t
u8 get_acpi_fadt_minor_version(void)
Definition: acpi.c:1949
struct acpi_lpi_desc_hdr acpi_lpi_desc_hdr_t
void acpi_create_hmat(acpi_hmat_t *hmat, unsigned long(*acpi_fill_hmat)(unsigned long current))
Definition: acpi.c:579
struct acpi_fadt acpi_fadt_t
struct acpi_bert acpi_bert_t
struct acpi_hest_generic_data_v300 acpi_hest_generic_data_v300_t
void acpi_dmar_rmrr_fixup(unsigned long base, unsigned long current)
Definition: acpi.c:725
void acpi_dmar_atsr_fixup(unsigned long base, unsigned long current)
Definition: acpi.c:731
coreboot_acpi_ids
Definition: acpi.h:68
@ COREBOOT_ACPI_ID_CBTABLE
Definition: acpi.h:69
@ COREBOOT_ACPI_ID_MAX
Definition: acpi.h:70
struct acpi_rsdp acpi_rsdp_t
struct acpi_ivrs_ivhd_11 acpi_ivrs_ivhd11_t
unsigned long acpi_create_dmar_rhsa(unsigned long current, u64 base_addr, u32 proximity_domain)
Definition: acpi.c:679
int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu, u16 flags, u8 lint)
Definition: acpi.c:200
struct dmar_andd_entry dmar_andd_entry_t
struct dmar_rmrr_entry dmar_rmrr_entry_t
acpi_tables
Definition: acpi.h:73
@ DSDT
Definition: acpi.h:75
@ SPMI
Definition: acpi.h:78
@ ECDT
Definition: acpi.h:76
@ SLIT
Definition: acpi.h:76
@ EINJ
Definition: acpi.h:75
@ XSDT
Definition: acpi.h:76
@ MADT
Definition: acpi.h:75
@ FACS
Definition: acpi.h:75
@ RSDP
Definition: acpi.h:76
@ SSDT
Definition: acpi.h:76
@ TPM2
Definition: acpi.h:76
@ TCPA
Definition: acpi.h:76
@ RSDT
Definition: acpi.h:76
@ HMAT
Definition: acpi.h:75
@ LPIT
Definition: acpi.h:76
@ SRAT
Definition: acpi.h:76
@ VFCT
Definition: acpi.h:78
@ HPET
Definition: acpi.h:75
@ FADT
Definition: acpi.h:75
@ CRAT
Definition: acpi.h:78
@ DMAR
Definition: acpi.h:75
@ HEST
Definition: acpi.h:75
@ DBG2
Definition: acpi.h:75
@ IVRS
Definition: acpi.h:75
@ MCFG
Definition: acpi.h:76
@ NHLT
Definition: acpi.h:78
@ BERT
Definition: acpi.h:75
struct dmar_entry dmar_entry_t
unsigned long acpi_create_dmar_drhd(unsigned long current, u8 flags, u16 segment, u64 bar)
Definition: acpi.c:638
unsigned long write_acpi_tables(unsigned long addr)
Definition: acpi.c:1592
struct acpi_crat_header __packed
enum cb_err acpi_soc_get_bert_region(void **region, size_t *length)
Definition: bert.c:8
struct acpi_dbg2_header acpi_dbg2_header_t
int acpi_create_hmat_mpda(acpi_hmat_mpda_t *mpda, u32 initiator, u32 memory)
Definition: acpi.c:562
void soc_fill_fadt(acpi_fadt_t *fadt)
Definition: acpi.c:1483
struct acpi_lpi_flags acpi_lpi_desc_flags_t
struct acpi_hest_generic_data acpi_hest_generic_data_t
unsigned long acpi_fill_lpit(unsigned long current)
Definition: lpit.c:8
void acpi_write_hest(acpi_hest_t *hest, unsigned long(*acpi_fill_hest)(acpi_hest_t *hest))
Definition: acpi.c:1433
struct acpi_slit acpi_slit_t
void mainboard_suspend_resume(void)
Definition: acpi_pm.c:9
struct acpi_madt acpi_madt_t
int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base, u16 seg_nr, u8 start, u8 end)
Definition: acpi.c:108
unsigned long acpi_create_dmar_satc(unsigned long current, u8 flags, u16 segment)
Definition: acpi.c:706
struct dev_scope dev_scope_t
struct acpi_cstate acpi_cstate_t
struct acpi_ivrs acpi_ivrs_t
unsigned long acpi_create_dmar_andd(unsigned long current, u8 device_number, const char *device_name)
Definition: acpi.c:692
@ ATC_REQUIRED
Definition: acpi.h:519
dev_scope_type
Definition: acpi.h:485
@ SCOPE_MSI_HPET
Definition: acpi.h:489
@ SCOPE_PCI_SUB
Definition: acpi.h:487
@ SCOPE_IOAPIC
Definition: acpi.h:488
@ SCOPE_PCI_ENDPOINT
Definition: acpi.h:486
@ SCOPE_ACPI_NAMESPACE_DEVICE
Definition: acpi.h:490
struct acpi_hpet acpi_hpet_t
struct acpi_lpit acpi_lpit_t
#define SLP_TYP_S4
Definition: pmc.h:68
#define SLP_TYP_S3
Definition: pmc.h:67
#define SLP_TYP_S1
Definition: pmc.h:66
#define SLP_TYP_S5
Definition: pmc.h:69
#define SLP_TYP
Definition: pmc.h:64
#define SLP_TYP_S0
Definition: pmc.h:65
#define SLP_TYP_SHIFT
Definition: pmc.h:63
unsigned int type
Definition: edid.c:57
static unsigned long acpi_fill_srat(unsigned long current)
Definition: nb_acpi.c:102
static unsigned long acpi_fill_slit(unsigned long current)
Definition: nb_acpi.c:125
static unsigned long acpi_fill_hest(acpi_hest_t *hest)
Definition: northbridge.c:666
static unsigned long acpi_fill_dmar(unsigned long current)
Definition: acpi.c:14
static const PCI_SUBCLASS memory[]
Definition: pci_class.c:66
static unsigned long acpi_fill_crat(struct acpi_crat_header *crat, unsigned long current)
Definition: agesa_acpi.c:532
int romstage_handoff_is_resume(void)
#define ENV_ROMSTAGE_OR_BEFORE
Definition: rules.h:263
uintptr_t base
Definition: uart.c:17
unsigned long acpi_fill_ivrs(acpi_ivrs_t *ivrs, unsigned long current)
Definition: ivrs.c:323
unsigned short uint16_t
Definition: stdint.h:11
uint64_t u64
Definition: stdint.h:54
unsigned int uint32_t
Definition: stdint.h:14
uint32_t u32
Definition: stdint.h:51
unsigned long uintptr_t
Definition: stdint.h:21
uint16_t u16
Definition: stdint.h:48
int8_t s8
Definition: stdint.h:44
unsigned long long uint64_t
Definition: stdint.h:17
uint8_t u8
Definition: stdint.h:45
unsigned char uint8_t
Definition: stdint.h:8
Definition: x86.c:23
u64 error_region
Definition: acpi.h:912
acpi_header_t header
Definition: acpi.h:910
u32 region_length
Definition: acpi.h:911
uint8_t reserved[6]
Definition: acpi.h:455
uint32_t total_entries
Definition: acpi.h:453
acpi_header_t header
Definition: acpi.h:452
uint16_t num_nodes
Definition: acpi.h:454
u8 ctype
Definition: acpi.h:984
u16 latency
Definition: acpi.h:985
u32 power
Definition: acpi.h:986
acpi_addr_t resource
Definition: acpi.h:987
uint8_t reserved[2]
Definition: acpi.h:701
uint16_t base_address_offset
Definition: acpi.h:702
uint16_t length
Definition: acpi.h:693
uint8_t revision
Definition: acpi.h:692
uint8_t address_count
Definition: acpi.h:694
uint16_t oem_data_length
Definition: acpi.h:697
uint16_t port_subtype
Definition: acpi.h:700
uint16_t oem_data_offset
Definition: acpi.h:698
uint16_t port_type
Definition: acpi.h:699
uint16_t namespace_string_length
Definition: acpi.h:695
uint16_t address_size_offset
Definition: acpi.h:703
uint16_t namespace_string_offset
Definition: acpi.h:696
acpi_header_t header
Definition: acpi.h:685
uint32_t devices_offset
Definition: acpi.h:686
uint32_t devices_count
Definition: acpi.h:687
u8 reserved[10]
Definition: acpi.h:583
u8 host_address_width
Definition: acpi.h:581
acpi_header_t header
Definition: acpi.h:580
dmar_entry_t structure[0]
Definition: acpi.h:584
u8 flags
Definition: acpi.h:582
acpi_header_t header
Definition: acpi.h:867
u32 uid
Definition: acpi.h:870
acpi_addr_t ec_control
Definition: acpi.h:868
acpi_addr_t ec_data
Definition: acpi.h:869
u8 gpe_bit
Definition: acpi.h:871
u8 ec_id[]
Definition: acpi.h:872
acpi_addr64_t reg
Definition: acpi.h:1151
u64 trigger_action_table
Definition: acpi.h:1184
u64 cmd_sts
Definition: acpi.h:1187
u64 einj_addr
Definition: acpi.h:1188
u64 reserved[50]
Definition: acpi.h:1191
u64 op_state
Definition: acpi.h:1182
u64 err_inj_cap
Definition: acpi.h:1185
u64 op_status
Definition: acpi.h:1186
set_error_type_t setaddrtable
Definition: acpi.h:1190
u64 err_inject[EINJ_PARAM_NUM]
Definition: acpi.h:1183
u64 einj_addr_msk
Definition: acpi.h:1189
acpi_einj_action_table_t trigger_action[1]
Definition: acpi.h:1167
acpi_einj_action_table_t action_table[ACTION_COUNT]
Definition: acpi.h:1219
acpi_injection_header_t inj_header
Definition: acpi.h:1218
acpi_header_t header
Definition: acpi.h:1217
u32 hardware_signature
Definition: acpi.h:848
u8 version
Definition: acpi.h:854
char signature[4]
Definition: acpi.h:846
u32 ospm_flags
Definition: acpi.h:856
u32 global_lock
Definition: acpi.h:850
u32 length
Definition: acpi.h:847
u32 x_firmware_waking_vector_l
Definition: acpi.h:852
u32 x_firmware_waking_vector_h
Definition: acpi.h:853
u32 flags
Definition: acpi.h:851
u8 resv2[24]
Definition: acpi.h:857
u8 resv1[3]
Definition: acpi.h:855
u32 firmware_waking_vector
Definition: acpi.h:849
u32 pm1a_cnt_blk
Definition: acpi.h:721
u32 pm_tmr_blk
Definition: acpi.h:724
u8 acpi_enable
Definition: acpi.h:715
u8 duty_offset
Definition: acpi.h:739
u8 pm1_evt_len
Definition: acpi.h:727
acpi_addr_t x_gpe1_blk
Definition: acpi.h:762
u32 x_firmware_ctl_h
Definition: acpi.h:752
u16 ARM_boot_arch
Definition: acpi.h:749
u32 gpe0_blk
Definition: acpi.h:725
acpi_addr_t x_gpe0_blk
Definition: acpi.h:761
u8 century
Definition: acpi.h:743
acpi_addr_t x_pm2_cnt_blk
Definition: acpi.h:759
acpi_header_t header
Definition: acpi.h:708
u32 dsdt
Definition: acpi.h:710
acpi_addr_t reset_reg
Definition: acpi.h:747
u8 pm_tmr_len
Definition: acpi.h:730
u8 gpe1_base
Definition: acpi.h:733
u32 smi_cmd
Definition: acpi.h:714
u8 day_alrm
Definition: acpi.h:741
u32 pm1b_evt_blk
Definition: acpi.h:720
u8 s4bios_req
Definition: acpi.h:717
acpi_addr_t x_pm1b_cnt_blk
Definition: acpi.h:758
u8 reserved
Definition: acpi.h:711
u8 duty_width
Definition: acpi.h:740
u8 pm2_cnt_len
Definition: acpi.h:729
u32 x_dsdt_l
Definition: acpi.h:753
u8 acpi_disable
Definition: acpi.h:716
u16 flush_size
Definition: acpi.h:737
u8 pm1_cnt_len
Definition: acpi.h:728
u32 gpe1_blk
Definition: acpi.h:726
u8 preferred_pm_profile
Definition: acpi.h:712
u32 x_firmware_ctl_l
Definition: acpi.h:751
u64 hypervisor_vendor_identity
Definition: acpi.h:767
acpi_addr_t x_pm1a_evt_blk
Definition: acpi.h:755
acpi_addr_t sleep_control_reg
Definition: acpi.h:764
u32 pm1a_evt_blk
Definition: acpi.h:719
u32 pm1b_cnt_blk
Definition: acpi.h:722
u8 reset_value
Definition: acpi.h:748
acpi_addr_t x_pm1b_evt_blk
Definition: acpi.h:756
acpi_addr_t sleep_status_reg
Definition: acpi.h:765
acpi_addr_t x_pm1a_cnt_blk
Definition: acpi.h:757
u16 p_lvl2_lat
Definition: acpi.h:735
u8 cst_cnt
Definition: acpi.h:734
u8 gpe0_blk_len
Definition: acpi.h:731
u16 p_lvl3_lat
Definition: acpi.h:736
u8 res2
Definition: acpi.h:745
u8 gpe1_blk_len
Definition: acpi.h:732
u8 FADT_MinorVersion
Definition: acpi.h:750
u8 pstate_cnt
Definition: acpi.h:718
u32 firmware_ctrl
Definition: acpi.h:709
u32 flags
Definition: acpi.h:746
u16 iapc_boot_arch
Definition: acpi.h:744
acpi_addr_t x_pm_tmr_blk
Definition: acpi.h:760
u16 flush_stride
Definition: acpi.h:738
u16 sci_int
Definition: acpi.h:713
u32 x_dsdt_h
Definition: acpi.h:754
u32 pm2_cnt_blk
Definition: acpi.h:723
u8 mon_alrm
Definition: acpi.h:742
u8 bit_offset
Definition: acpi.h:98
u8 bit_width
Definition: acpi.h:97
u8 access_size
Definition: acpi.h:99
u16 type
Definition: acpi.h:884
u32 max_section_per_record
Definition: acpi.h:892
u16 resv
Definition: acpi.h:886
u32 prealloc_erecords
Definition: acpi.h:889
u8 enabled
Definition: acpi.h:888
u16 source_id
Definition: acpi.h:885
u8 flags
Definition: acpi.h:887
cper_timestamp_t timestamp
Definition: acpi.h:938
guid_t section_type
Definition: acpi.h:917
u32 error_threshold_val
Definition: acpi.h:904
u8 length
Definition: acpi.h:898
u32 poll_interval
Definition: acpi.h:900
u32 vector
Definition: acpi.h:901
u32 sw2poll_threshold_win
Definition: acpi.h:903
u32 sw2poll_threshold_val
Definition: acpi.h:902
u16 conf_we
Definition: acpi.h:899
u32 error_threshold_win
Definition: acpi.h:905
acpi_header_t header
Definition: acpi.h:877
u32 error_source_count
Definition: acpi.h:878
u64 resv4
Definition: acpi.h:245
u32 resv2
Definition: acpi.h:243
u32 proximity_domain_initiator
Definition: acpi.h:241
u16 resv
Definition: acpi.h:237
u64 resv3
Definition: acpi.h:244
u16 type
Definition: acpi.h:236
u32 length
Definition: acpi.h:238
u16 flags
Definition: acpi.h:239
u32 proximity_domain_memory
Definition: acpi.h:242
u16 resv1
Definition: acpi.h:240
u16 num_handlers
Definition: acpi.h:285
u64 cache_size
Definition: acpi.h:277
u32 length
Definition: acpi.h:274
u16 type
Definition: acpi.h:272
u32 cache_attributes
Definition: acpi.h:279
u16 resv
Definition: acpi.h:273
u16 resv2
Definition: acpi.h:280
u32 domain
Definition: acpi.h:275
u32 resv1
Definition: acpi.h:276
u32 num_initiator_domains
Definition: acpi.h:261
u32 length
Definition: acpi.h:252
u32 num_target_domains
Definition: acpi.h:262
u8 min_transfer_size
Definition: acpi.h:259
u64 entry_base_unit
Definition: acpi.h:264
u8 data_type
Definition: acpi.h:254
u32 resv
Definition: acpi.h:230
acpi_header_t header
Definition: acpi.h:229
u8 number
Definition: acpi.h:186
u8 attributes
Definition: acpi.h:188
acpi_header_t header
Definition: acpi.h:183
u32 id
Definition: acpi.h:184
u16 min_tick
Definition: acpi.h:187
acpi_addr_t addr
Definition: acpi.h:185
uint32_t reserved[2]
Definition: acpi.h:481
uint8_t type
Definition: acpi.h:469
uint32_t iommu_base_high
Definition: acpi.h:475
uint32_t efr_reg_image_low
Definition: acpi.h:479
uint32_t efr_reg_image_high
Definition: acpi.h:480
uint16_t length
Definition: acpi.h:471
uint16_t device_id
Definition: acpi.h:472
uint8_t flags
Definition: acpi.h:470
uint8_t entry[0]
Definition: acpi.h:482
uint16_t pci_segment_group
Definition: acpi.h:476
struct ivhd11_iommu_attr iommu_attributes
Definition: acpi.h:478
uint32_t iommu_base_low
Definition: acpi.h:474
uint16_t iommu_info
Definition: acpi.h:477
uint16_t capability_offset
Definition: acpi.h:473
uint16_t iommu_info
Definition: acpi.h:437
uint16_t device_id
Definition: acpi.h:432
uint8_t type
Definition: acpi.h:429
uint8_t flags
Definition: acpi.h:430
uint32_t iommu_base_high
Definition: acpi.h:435
uint16_t pci_segment_group
Definition: acpi.h:436
uint32_t iommu_feature_info
Definition: acpi.h:438
uint16_t capability_offset
Definition: acpi.h:433
uint8_t entry[0]
Definition: acpi.h:439
uint16_t length
Definition: acpi.h:431
uint32_t iommu_base_low
Definition: acpi.h:434
acpi_header_t header
Definition: acpi.h:444
struct acpi_ivrs_ivhd ivhd
Definition: acpi.h:447
uint32_t iv_info
Definition: acpi.h:445
uint32_t reserved[2]
Definition: acpi.h:446
uint32_t type
Definition: acpi.h:381
uint16_t uid
Definition: acpi.h:383
uint16_t reserved
Definition: acpi.h:384
uint32_t length
Definition: acpi.h:382
uint64_t counter_frequency
Definition: acpi.h:397
acpi_lpi_desc_hdr_t header
Definition: acpi.h:391
uint32_t min_residency
Definition: acpi.h:394
acpi_lpi_desc_flags_t flags
Definition: acpi.h:392
uint32_t max_latency
Definition: acpi.h:395
acpi_addr_t residency_counter
Definition: acpi.h:396
acpi_addr_t entry_trigger
Definition: acpi.h:393
uint32_t disabled
Definition: acpi.h:368
uint32_t reserved
Definition: acpi.h:370
uint32_t counter_not_available
Definition: acpi.h:369
const char * state_name
Definition: acpi.h:1034
u32 worst_case_wakeup_latency_us
Definition: acpi.h:1026
acpi_addr_t entry_method
Definition: acpi.h:1031
u32 arch_context_lost_flags
Definition: acpi.h:1028
acpi_addr_t residency_counter_register
Definition: acpi.h:1032
u32 residency_counter_frequency_hz
Definition: acpi.h:1029
u32 enabled_parent_state
Definition: acpi.h:1030
acpi_addr_t usage_counter_register
Definition: acpi.h:1033
u32 min_residency_us
Definition: acpi.h:1025
acpi_header_t header
Definition: acpi.h:363
u32 gsi_base
Definition: acpi.h:636
u32 ioapic_addr
Definition: acpi.h:635
u8 processor_id
Definition: acpi.h:613
u32 processor_id
Definition: acpi.h:656
u32 lapic_addr
Definition: acpi.h:354
acpi_header_t header
Definition: acpi.h:353
u32 flags
Definition: acpi.h:355
u16 pci_segment_group_number
Definition: acpi.h:218
u32 base_reserved
Definition: acpi.h:217
u8 reserved[4]
Definition: acpi.h:221
u8 start_bus_number
Definition: acpi.h:219
u32 base_address
Definition: acpi.h:216
u8 reserved[8]
Definition: acpi.h:194
acpi_header_t header
Definition: acpi.h:193
Definition: acpi.h:82
char signature[8]
Definition: acpi.h:83
u8 revision
Definition: acpi.h:86
u8 reserved[3]
Definition: acpi.h:91
u8 checksum
Definition: acpi.h:84
u8 ext_checksum
Definition: acpi.h:90
u64 xsdt_address
Definition: acpi.h:89
char oem_id[6]
Definition: acpi.h:85
u32 length
Definition: acpi.h:88
u32 rsdt_address
Definition: acpi.h:87
acpi_header_t header
Definition: acpi.h:171
u32 entry[MAX_ACPI_TABLES]
Definition: acpi.h:172
acpi_header_t header
Definition: acpi.h:347
u8 pci_bus
Definition: acpi.h:1088
u8 interface_type
Definition: acpi.h:1075
u8 pci_function
Definition: acpi.h:1090
u8 reserved3
Definition: acpi.h:1094
u8 pci_device_flag
Definition: acpi.h:1081
u8 reserved
Definition: acpi.h:1076
u8 reserved2
Definition: acpi.h:1080
acpi_addr_t base_address
Definition: acpi.h:1084
u16 specification_revision
Definition: acpi.h:1077
u8 pci_device
Definition: acpi.h:1089
u32 global_system_interrupt
Definition: acpi.h:1083
u8 uid[4]
Definition: acpi.h:1092
u8 interrupt_type
Definition: acpi.h:1078
u8 gpe
Definition: acpi.h:1079
acpi_header_t header
Definition: acpi.h:1074
u8 pci_segment_group
Definition: acpi.h:1087
u8 dev_handle_type
Definition: acpi.h:335
u32 proximity_domain
Definition: acpi.h:336
u32 resv1
Definition: acpi.h:339
u32 flags
Definition: acpi.h:338
u8 length
Definition: acpi.h:333
u8 dev_handle[16]
Definition: acpi.h:337
u8 proximity_domain_7_0
Definition: acpi.h:305
u8 local_sapic_eid
Definition: acpi.h:308
u32 clock_domain
Definition: acpi.h:310
u8 proximity_domain_31_8[3]
Definition: acpi.h:309
u32 length_low
Definition: acpi.h:321
u32 base_address_high
Definition: acpi.h:320
u32 base_address_low
Definition: acpi.h:319
u32 proximity_domain
Definition: acpi.h:317
u32 resv1
Definition: acpi.h:323
u8 length
Definition: acpi.h:316
u32 length_high
Definition: acpi.h:322
u32 resv2[2]
Definition: acpi.h:327
u16 resv
Definition: acpi.h:318
u32 flags
Definition: acpi.h:324
acpi_header_t header
Definition: acpi.h:291
u32 resv
Definition: acpi.h:292
u64 resv1
Definition: acpi.h:293
u32 status_value
Definition: acpi.h:996
u32 transition_latency
Definition: acpi.h:993
u32 bus_master_latency
Definition: acpi.h:994
u32 core_freq
Definition: acpi.h:991
u32 power
Definition: acpi.h:992
u32 control_value
Definition: acpi.h:995
char signature[4]
Definition: acpi.h:155
u32 asl_compiler_revision
Definition: acpi.h:163
char oem_id[6]
Definition: acpi.h:159
char asl_compiler_id[4]
Definition: acpi.h:162
u32 oem_revision
Definition: acpi.h:161
char oem_table_id[8]
Definition: acpi.h:160
u32 laml
Definition: acpi.h:200
acpi_header_t header
Definition: acpi.h:198
u16 platform_class
Definition: acpi.h:199
u64 lasa
Definition: acpi.h:201
acpi_header_t header
Definition: acpi.h:205
u32 start_method
Definition: acpi.h:209
u8 reserved[2]
Definition: acpi.h:207
u8 msp[12]
Definition: acpi.h:210
u64 control_area
Definition: acpi.h:208
u32 laml
Definition: acpi.h:211
u16 platform_class
Definition: acpi.h:206
u64 lasa
Definition: acpi.h:212
u32 power
Definition: acpi.h:1012
u32 percent
Definition: acpi.h:1011
u32 status
Definition: acpi.h:1015
u32 control
Definition: acpi.h:1014
u32 latency
Definition: acpi.h:1013
u8 TableUUID[16]
Definition: acpi.h:417
u32 VBIOSImageOffset
Definition: acpi.h:418
acpi_vfct_image_hdr_t image_hdr
Definition: acpi.h:421
u32 Lib1ImageOffset
Definition: acpi.h:419
acpi_header_t header
Definition: acpi.h:416
u32 Reserved[4]
Definition: acpi.h:420
u64 bus_master_latency
Definition: acpi.h:1003
u64 transition_latency
Definition: acpi.h:1002
acpi_header_t header
Definition: acpi.h:177
u64 entry[MAX_ACPI_TABLES]
Definition: acpi.h:178
Definition: device.h:76
u8 start_bus
Definition: acpi.h:498
u8 type
Definition: acpi.h:494
u8 dev
Definition: acpi.h:500
struct dev_scope::@187 path[0]
u8 fn
Definition: acpi.h:501
u8 length
Definition: acpi.h:495
u8 reserved[2]
Definition: acpi.h:496
u8 enumeration
Definition: acpi.h:497
Definition: device.h:107
Definition: acpi.h:562
u8 reserved[3]
Definition: acpi.h:565
u16 length
Definition: acpi.h:564
u8 device_number
Definition: acpi.h:566
u16 type
Definition: acpi.h:563
Definition: acpi.h:546
u8 flags
Definition: acpi.h:549
u16 segment
Definition: acpi.h:551
u8 reserved
Definition: acpi.h:550
u16 type
Definition: acpi.h:547
u16 length
Definition: acpi.h:548
Definition: acpi.h:528
u8 reserved
Definition: acpi.h:532
u16 length
Definition: acpi.h:530
u64 bar
Definition: acpi.h:534
u16 type
Definition: acpi.h:529
u8 flags
Definition: acpi.h:531
u16 segment
Definition: acpi.h:533
Definition: acpi.h:554
u16 length
Definition: acpi.h:556
u32 proximity_domain
Definition: acpi.h:559
u32 reserved
Definition: acpi.h:557
u16 type
Definition: acpi.h:555
u64 base_address
Definition: acpi.h:558
Definition: acpi.h:537
u16 reserved
Definition: acpi.h:540
u16 type
Definition: acpi.h:538
u16 segment
Definition: acpi.h:541
u64 bar
Definition: acpi.h:542
u16 length
Definition: acpi.h:539
u64 limit
Definition: acpi.h:543
Definition: acpi.h:570
u8 reserved
Definition: acpi.h:574
u16 length
Definition: acpi.h:572
u8 flags
Definition: acpi.h:573
u16 segment_number
Definition: acpi.h:575
u16 type
Definition: acpi.h:571
uint32_t reserved1
Definition: acpi.h:460
uint32_t perf_counter_banks
Definition: acpi.h:462
uint32_t perf_counters
Definition: acpi.h:461
uint32_t msi_num_ppr
Definition: acpi.h:463
uint32_t reserved2
Definition: acpi.h:464
Definition: region.h:76
u32 apicid
Definition: acpi.h:1174
u64 memrange
Definition: acpi.h:1176
u64 memaddr
Definition: acpi.h:1175
u32 pciesbdf
Definition: acpi.h:1177
u32 vendorerrortype
Definition: acpi.h:1172
u32 errtype
Definition: acpi.h:1171