103#define FADT_SIGNATURE "FACP"
112#define MADT_FLAG_PCAT_COMPAT ((madt_flags_t)(1 << 0))
121#define INTERRUPT_CONTROLLER_PROCESSOR_LOCAL_APIC ((interrupt_controller_type_t)0)
122#define INTERRUPT_CONTROLLER_IO_APIC ((interrupt_controller_type_t)1)
141#define PROCESSOR_LOCAL_APIC_ENABLED (1 << 0)
142#define PROCESSOR_LOCAL_APIC_ONLINE_CAPABLE (1 << 1)
193#define MADT_FOR_EACH(madt, ic) \
194 for (ic = (typeof(ic))madt->interruptControllers; (uint8_t*)ic < (uint8_t*)madt + madt->header.length && \
195 (uint8_t*)ic + sizeof(interrupt_controller_header_t) <= (uint8_t*)madt + madt->header.length && \
196 (uint8_t*)ic + ic->header.length <= (uint8_t*)madt + madt->header.length; \
197 ic = (typeof(ic))((uint8_t*)ic + ic->header.length))
202#define MADT_SIGNATURE "APIC"
219#define DSDT_SIGNATURE "DSDT"
238#define SSDT_SIGNATURE "SSDT"
274#define ACPI_SDT_HANDLER_REGISTER(sig, initHandler) \
275 static const acpi_sdt_handler_t _acpiSdtHandler##handler_name \
276 __attribute__((used, section(".acpi_sdt_handlers"))) = { \
278 .init = initHandler, \
fadt_boot_arch_flags_t
Enum for the fadt_t::bootArchFlags field.
uint32_t madt_flags_t
Multiple APIC Description Table flags.
void acpi_tables_init(rsdp_t *rsdp)
Initialize ACPI tables and call their init handlers.
uint32_t processor_local_apic_flags_t
MADT Processor Local APIC flags.
sdt_header_t * acpi_tables_lookup(const char *signature, uint64_t n)
Lookup the n'th table matching the signature.
void acpi_tables_expose(void)
Expose ACPI tables to sysfs.
uint8_t interrupt_controller_type_t
MADT Interrupt Controller Types.
@ FADT_BOOT_ARCH_PS2_EXISTS
#define PACKED
GCC packed attribute.
dentry_t * file
The sysfs file representing the table.
ACPI System Description Table handler.
const char * signature
The signature of the table to handle.
Directory entry structure.
Differentiated System Description Table.
Fixed ACPI Description Table.
uint8_t preferredPowerManagementProfile
fadt_gas_t xPm2ControlBlock
fadt_gas_t xPm1aControlBlock
uint32_t pm1aControlBlock
uint64_t xDsdt
Extended pointer to dsdt, should be used if dsdt is 0.
fadt_gas_t xPm1bEventBlock
fadt_gas_t xPm1aEventBlock
fadt_gas_t xPm1bControlBlock
uint32_t pm1bControlBlock
uint64_t xFirmwareControl
uint32_t globalSystemInterruptBase
interrupt_controller_header_t header
Multiple APIC Description Table.
uint32_t localInterruptControllerAddress
interrupt_controller_header_t header
Root System Description Pointer.
Secondary System Description Table.