static ACPI_STATUS AeLocalLoadTable ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status = AE_OK; /* ACPI_TABLE_DESC TableInfo; */ ACPI_FUNCTION_TRACE (AeLocalLoadTable); #if 0 if (!Table) { return_ACPI_STATUS (AE_BAD_PARAMETER); } TableInfo.Pointer = Table; Status = AcpiTbRecognizeTable (&TableInfo, ACPI_TABLE_ALL); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } /* Install the new table into the local data structures */ Status = AcpiTbInitTableDescriptor (&TableInfo); if (ACPI_FAILURE (Status)) { if (Status == AE_ALREADY_EXISTS) { /* Table already exists, no error */ Status = AE_OK; } /* Free table allocated by AcpiTbGetTable */ AcpiTbDeleteSingleTable (&TableInfo); return_ACPI_STATUS (Status); } #if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode); if (ACPI_FAILURE (Status)) { /* Uninstall table and free the buffer */ AcpiTbDeleteTablesByType (ACPI_TABLE_ID_DSDT); return_ACPI_STATUS (Status); } #endif #endif return_ACPI_STATUS (Status); }
void AcpiTbDeleteAllTables ( void) { ACPI_TABLE_TYPE Type; /* * Free memory allocated for ACPI tables * Memory can either be mapped or allocated */ for (Type = 0; Type < (ACPI_TABLE_ID_MAX+1); Type++) { AcpiTbDeleteTablesByType (Type); } }