According to ''ACPICA Reference 1.7'', function AcpiInitializeTables can be used to initialize table component, using either pre-allocated buffer or dynamic memory.
Since my kernel init multiprocessor first and then dynamic memory, I have to statically allocate memory, my solution is:
Code: Select all
bool initialize_acpi_tables() {
ACPI_TABLE_DESC acpi_tables[16];
ACPI_STATUS status = AcpiInitializeTables(acpi_tables, 16, FALSE);
if (ACPI_FAILURE(status)) {
return false;
}
return true;
}