6#ifndef ZEPHYR_INCLUDE_ARCH_X86_ACPI_H
7#define ZEPHYR_INCLUDE_ARCH_X86_ACPI_H
11#define ACPI_RSDP_SIGNATURE 0x2052545020445352
53#define ACPI_MCFG_SIGNATURE 0x4746434d
68#define ACPI_MADT_SIGNATURE 0x43495041
75#define ACPI_MADT_ENTRY_CPU 0
84#define ACPI_MADT_FLAGS_PICS 0x01
93#define ACPI_CPU_FLAGS_ENABLED 0x01
101#define ACPI_DMAR_TYPE_DRHD 0
102#define ACPI_DMAR_TYPE_RMRR 1
103#define ACPI_DMAR_TYPE_ATSR 2
104#define ACPI_DMAR_TYPE_RHSA 3
105#define ACPI_DMAR_TYPE_ANDD 4
106#define ACPI_DMAR_TYPE_SACT 5
114#define ACPI_DMAR_DEV_PATH_SIZE 2
126#define ACPI_DMAR_DEV_SCOPE_MIN_SIZE 6
128#define ACPI_DRHD_DEV_SCOPE_PCI_EPD 0x01
129#define ACPI_DRHD_DEV_SCOPE_PCI_SUB_H 0x02
130#define ACPI_DRHD_DEV_SCOPE_IOAPIC 0x03
131#define ACPI_DRHD_DEV_SCOPE_MSI_CAP_HPET 0x04
132#define ACPI_DRHD_DEV_SCOPE_NAMESPACE_DEV 0x05
143#define ACPI_DRHD_MIN_SIZE 16
145#define ACPI_DRHD_FLAG_INCLUDE_PCI_ALL BIT(0)
147#define ACPI_DMAR_SIGNATURE 0x52414D44
149#define ACPI_DMAR_FLAG_INTR_REMAP BIT(0)
150#define ACPI_DMAR_FLAG_X2APIC_OPT_OUT BIT(1)
151#define ACPI_DMAR_FLAG_DMA_CTRL_PLATFORM_OPT_IN BIT(2)
162#if defined(CONFIG_ACPI)
164void *z_acpi_find_table(
uint32_t signature);
166struct acpi_cpu *z_acpi_get_cpu(
int n);
170struct acpi_drhd *z_acpi_find_drhds(
int *n);
180#define z_acpi_find_table(...) NULL
181#define z_acpi_get_cpu(...) NULL
182#define z_acpi_find_dmar(...) NULL
183#define z_acpi_find_drhds(...) NULL
184#define z_acpi_get_drhd_dev_scopes(...) NULL
185#define z_acpi_get_dev_scope_paths(...) NULL
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
uint8_t apic_id
Definition: acpi.h:89
uint8_t acpi_id
Definition: acpi.h:88
struct acpi_madt_entry entry
Definition: acpi.h:87
uint8_t flags
Definition: acpi.h:90
uint8_t function
Definition: acpi.h:111
uint8_t device
Definition: acpi.h:110
uint8_t type
Definition: acpi.h:118
uint8_t start_bus_num
Definition: acpi.h:122
uint8_t length
Definition: acpi.h:119
uint8_t enumeration_id
Definition: acpi.h:121
struct acpi_dmar_dev_path path[]
Definition: acpi.h:123
uint16_t type
Definition: acpi.h:97
uint16_t length
Definition: acpi.h:98
uint8_t host_addr_width
Definition: acpi.h:156
struct acpi_dmar_entry remap_entries[]
Definition: acpi.h:159
uint8_t flags
Definition: acpi.h:157
struct acpi_sdt sdt
Definition: acpi.h:155
uint64_t base_address
Definition: acpi.h:139
struct acpi_dmar_dev_scope device_scope[]
Definition: acpi.h:140
uint16_t segment_num
Definition: acpi.h:138
struct acpi_dmar_entry entry
Definition: acpi.h:135
uint8_t flags
Definition: acpi.h:136
uint8_t length
Definition: acpi.h:72
uint8_t type
Definition: acpi.h:71
uint32_t flags
Definition: acpi.h:80
struct acpi_madt_entry entries[]
Definition: acpi.h:81
struct acpi_sdt sdt
Definition: acpi.h:78
uint32_t loapic
Definition: acpi.h:79
struct acpi_sdt sdt
Definition: acpi.h:56
struct acpi_mcfg::@14 pci_segs[]
uint64_t base_addr
Definition: acpi.h:59
uint16_t seg_group_num
Definition: acpi.h:60
uint8_t start_bus
Definition: acpi.h:61
uint8_t end_bus
Definition: acpi.h:62
char signature[8]
Definition: acpi.h:15
uint8_t chksum
Definition: acpi.h:16
uint64_t xsdt_ptr
Definition: acpi.h:21
uint32_t rsdt_ptr
Definition: acpi.h:19
uint32_t length
Definition: acpi.h:20
char oem_id[6]
Definition: acpi.h:17
uint8_t revision
Definition: acpi.h:18
uint8_t ext_chksum
Definition: acpi.h:22
uint32_t table_ptrs[]
Definition: acpi.h:42
struct acpi_sdt sdt
Definition: acpi.h:41
char oem_id[6]
Definition: acpi.h:32
uint32_t creator_id
Definition: acpi.h:35
uint8_t revision
Definition: acpi.h:30
char oem_table_id[8]
Definition: acpi.h:33
uint32_t oem_revision
Definition: acpi.h:34
uint32_t creator_revision
Definition: acpi.h:36
uint32_t length
Definition: acpi.h:29
uint8_t chksum
Definition: acpi.h:31
uint32_t signature
Definition: acpi.h:28
struct acpi_sdt sdt
Definition: acpi.h:47
uint64_t table_ptrs[]
Definition: acpi.h:48