Source
x
ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded", tables_loaded));
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/******************************************************************************
*
* Module Name: tbxfload - Table load/unload external interfaces
*
* Copyright (C) 2000 - 2019, Intel Corp.
*
*****************************************************************************/
ACPI_MODULE_NAME("tbxfload")
/*******************************************************************************
*
* FUNCTION: acpi_load_tables
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
*
******************************************************************************/
acpi_status ACPI_INIT_FUNCTION acpi_load_tables(void)
{
acpi_status status;
ACPI_FUNCTION_TRACE(acpi_load_tables);
/*
* Install the default operation region handlers. These are the
* handlers that are defined by the ACPI specification to be
* "always accessible" -- namely, system_memory, system_IO, and
* PCI_Config. This also means that no _REG methods need to be
* run for these address spaces. We need to have these handlers
* installed before any AML code can be executed, especially any
* module-level code (11/2015).
* Note that we allow OSPMs to install their own region handlers
* between acpi_initialize_subsystem() and acpi_load_tables() to use
* their customized default region handlers.
*/
status = acpi_ev_install_region_handlers();
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"During Region initialization"));
return_ACPI_STATUS(status);
}
/* Load the namespace from the tables */
status = acpi_tb_load_namespace();
/* Don't let single failures abort the load */
if (status == AE_CTRL_TERMINATE) {
status = AE_OK;
}
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While loading namespace from ACPI tables"));
}
/*
* Initialize the objects in the namespace that remain uninitialized.
* This runs the executable AML that may be part of the declaration of
* these name objects:
* operation_regions, buffer_fields, Buffers, and Packages.
*
*/
status = acpi_ns_initialize_objects();
if (ACPI_SUCCESS(status)) {
acpi_gbl_namespace_initialized = TRUE;
}
return_ACPI_STATUS(status);
}
ACPI_EXPORT_SYMBOL_INIT(acpi_load_tables)
/*******************************************************************************
*
* FUNCTION: acpi_tb_load_namespace
*