System Description Tables.
More...
System Description Tables.
This module defines the ACPI tables found in the ACPI specification, tables defined outside of the specification, for example, MCFG is defined in their own files.
◆ ACPI_SDT_HANDLER_REGISTER
| #define ACPI_SDT_HANDLER_REGISTER |
( |
|
sig, |
|
|
|
initHandler |
|
) |
| |
Value:
__attribute__((used, section(".acpi_sdt_handlers"))) = { \
.init = initHandler, \
};
ACPI System Description Table handler.
const char * signature
The signature of the table to handle.
Macro to register an ACPI SDT handler.
This macro registers a handler for a specific ACPI table signature using the linker section .acpi_sdt_handlers.
Might be integrated into some bigger device driver registration system in the future.
- Parameters
-
| sig | The signature of the table to handle. |
| handler_name | The name of the handler function to generate. |
Definition at line 276 of file tables.h.
◆ DSDT_SIGNATURE
| #define DSDT_SIGNATURE "DSDT" |
DSDT table signature.
Definition at line 221 of file tables.h.
◆ FADT_GET
Type safe way to get the FADT table.
- Returns
- fadt_t* The FADT table pointer
Definition at line 105 of file tables.h.
◆ INTERRUPT_CONTROLLER_IO_APIC
◆ INTERRUPT_CONTROLLER_PROCESSOR_LOCAL_APIC
◆ MADT_FLAG_PCAT_COMPAT
◆ MADT_FOR_EACH
| #define MADT_FOR_EACH |
( |
|
madt, |
|
|
|
ic |
|
) |
| |
Value:
ic = (typeof(ic))((
uint8_t*)ic + ic->header.length))
interrupt_controller_header_t interruptControllers[]
Iterate over all MADT interrupt controllers.
- Parameters
-
| madt | The MADT table to iterate over. |
| ic | A pointer to a madt_interrupt_controller_header_t* that will be set to the current interrupt controller. |
Definition at line 195 of file tables.h.
◆ MADT_SIGNATURE
| #define MADT_SIGNATURE "APIC" |
MADT table signature.
Definition at line 204 of file tables.h.
◆ PROCESSOR_LOCAL_APIC_ENABLED
| #define PROCESSOR_LOCAL_APIC_ENABLED (1 << 0) |
◆ PROCESSOR_LOCAL_APIC_ONLINE_CAPABLE
| #define PROCESSOR_LOCAL_APIC_ONLINE_CAPABLE (1 << 1) |
◆ SSDT_SIGNATURE
| #define SSDT_SIGNATURE "SSDT" |
SSDT table signature.
Note that there might be multiple SSDT tables.
Definition at line 240 of file tables.h.
◆ interrupt_controller_type_t
MADT Interrupt Controller Types.
- See also
- Section 5.2.12 table 5.21 of the ACPI specification for more details.
Definition at line 121 of file tables.h.
◆ madt_flags_t
Multiple APIC Description Table flags.
- See also
- Section 5.2.12 table 5.20 of the ACPI specification for more details.
Definition at line 112 of file tables.h.
◆ processor_local_apic_flags_t
MADT Processor Local APIC flags.
- See also
- Section 5.2.12.2 table 5.23 of the ACPI specification for more details.
Definition at line 141 of file tables.h.
◆ fadt_boot_arch_flags_t
◆ acpi_tables_expose()
| void acpi_tables_expose |
( |
void |
| ) |
|
Expose ACPI tables to sysfs.
Definition at line 231 of file tables.c.
References acpi_get_sysfs_root(), assert, cachedTables, DEREF_DEFER, acpi_cached_table_t::file, file, MAX_PATH, memcmp(), memcpy(), NULL, panic(), SDT_SIGNATURE_LENGTH, sdt_header_t::signature, snprintf(), ssdtAmount, sysfs_dir_new(), sysfs_file_new(), acpi_cached_table_t::table, tableAmount, tableFileOps, and tablesDir.
Referenced by init_finalize().
◆ acpi_tables_init()
| void acpi_tables_init |
( |
rsdp_t * |
rsdp | ) |
|
Initialize ACPI tables and call their init handlers.
Definition at line 201 of file tables.c.
References acpi_is_rsdp_valid(), acpi_tables_init_handlers(), acpi_tables_load_from_fadt(), acpi_tables_load_from_xsdt(), cachedTables, ERR, LOG_INFO, NULL, panic(), PML_LOWER_TO_HIGHER, sdt_header_t::signature, acpi_cached_table_t::table, tableAmount, and rsdp_t::xsdtAddress.
Referenced by init_early().
◆ acpi_tables_lookup()
Lookup the n'th table matching the signature.
- Parameters
-
| signature | The signature of the table to look up. |
| n | The index of the table to look up (0 indexed). |
- Returns
- The table if found, NULL otherwise.
Definition at line 266 of file tables.c.
References cachedTables, LOG_ERR, memcmp(), NULL, SDT_SIGNATURE_LENGTH, strlen(), acpi_cached_table_t::table, and tableAmount.
Referenced by aml_def_data_region_read(), aml_init_parse_all(), aml_integer_handling_init(), and smp_others_init().