Commit 3c0503dd authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

ACPICA: Table handling: Cleanup and update debug output for tools

ACPICA commit 93862bd7a227543bc617d822ef5c4f8a5d68b519

Add output of table OEM ID along with signature to support lots
of SSDTs.

Cleanup use of table pointers.

Link: https://github.com/acpica/acpica/commit/93862bd7Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 93cdafa0
...@@ -247,11 +247,12 @@ acpi_ds_initialize_objects(u32 table_index, ...@@ -247,11 +247,12 @@ acpi_ds_initialize_objects(u32 table_index,
/* Summary of objects initialized */ /* Summary of objects initialized */
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
"Table [%4.4s] (id %4.4X) - %4u Objects with %3u Devices, " "Table [%4.4s:%8.8s] (id %.2X) - %4u Objects with %3u Devices, "
"%3u Regions, %3u Methods (%u/%u/%u Serial/Non/Cvt)\n", "%3u Regions, %4u Methods (%u/%u/%u Serial/Non/Cvt)\n",
table->signature, owner_id, info.object_count, table->signature, table->oem_table_id, owner_id,
info.device_count, info.op_region_count, info.object_count, info.device_count,
info.method_count, info.serial_method_count, info.op_region_count, info.method_count,
info.serial_method_count,
info.non_serial_method_count, info.non_serial_method_count,
info.serialized_method_count)); info.serialized_method_count));
......
...@@ -105,6 +105,7 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -105,6 +105,7 @@ acpi_status acpi_tb_load_namespace(void)
acpi_status status; acpi_status status;
u32 i; u32 i;
struct acpi_table_header *new_dsdt; struct acpi_table_header *new_dsdt;
struct acpi_table_desc *table;
u32 tables_loaded = 0; u32 tables_loaded = 0;
u32 tables_failed = 0; u32 tables_failed = 0;
...@@ -116,15 +117,11 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -116,15 +117,11 @@ acpi_status acpi_tb_load_namespace(void)
* Load the namespace. The DSDT is required, but any SSDT and * Load the namespace. The DSDT is required, but any SSDT and
* PSDT tables are optional. Verify the DSDT. * PSDT tables are optional. Verify the DSDT.
*/ */
table = &acpi_gbl_root_table_list.tables[acpi_gbl_dsdt_index];
if (!acpi_gbl_root_table_list.current_table_count || if (!acpi_gbl_root_table_list.current_table_count ||
!ACPI_COMPARE_NAME(& !ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_DSDT) ||
(acpi_gbl_root_table_list. ACPI_FAILURE(acpi_tb_validate_table(table))) {
tables[acpi_gbl_dsdt_index].signature),
ACPI_SIG_DSDT)
||
ACPI_FAILURE(acpi_tb_validate_table
(&acpi_gbl_root_table_list.
tables[acpi_gbl_dsdt_index]))) {
status = AE_NO_ACPI_TABLES; status = AE_NO_ACPI_TABLES;
goto unlock_and_exit; goto unlock_and_exit;
} }
...@@ -135,8 +132,7 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -135,8 +132,7 @@ acpi_status acpi_tb_load_namespace(void)
* array can change dynamically as tables are loaded at run-time. Note: * array can change dynamically as tables are loaded at run-time. Note:
* .Pointer field is not validated until after call to acpi_tb_validate_table. * .Pointer field is not validated until after call to acpi_tb_validate_table.
*/ */
acpi_gbl_DSDT = acpi_gbl_DSDT = table->pointer;
acpi_gbl_root_table_list.tables[acpi_gbl_dsdt_index].pointer;
/* /*
* Optionally copy the entire DSDT to local memory (instead of simply * Optionally copy the entire DSDT to local memory (instead of simply
...@@ -174,21 +170,15 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -174,21 +170,15 @@ acpi_status acpi_tb_load_namespace(void)
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
table = &acpi_gbl_root_table_list.tables[i];
if (!acpi_gbl_root_table_list.tables[i].address || if (!acpi_gbl_root_table_list.tables[i].address ||
(!ACPI_COMPARE_NAME (!ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_SSDT)
(&(acpi_gbl_root_table_list.tables[i].signature), && !ACPI_COMPARE_NAME(table->signature.ascii,
ACPI_SIG_SSDT) ACPI_SIG_PSDT)
&& && !ACPI_COMPARE_NAME(table->signature.ascii,
!ACPI_COMPARE_NAME(& ACPI_SIG_OSDT))
(acpi_gbl_root_table_list.tables[i]. || ACPI_FAILURE(acpi_tb_validate_table(table))) {
signature), ACPI_SIG_PSDT)
&&
!ACPI_COMPARE_NAME(&
(acpi_gbl_root_table_list.tables[i].
signature), ACPI_SIG_OSDT))
||
ACPI_FAILURE(acpi_tb_validate_table
(&acpi_gbl_root_table_list.tables[i]))) {
continue; continue;
} }
...@@ -198,10 +188,15 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -198,10 +188,15 @@ acpi_status acpi_tb_load_namespace(void)
status = acpi_ns_load_table(i, acpi_gbl_root_node); status = acpi_ns_load_table(i, acpi_gbl_root_node);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, ACPI_EXCEPTION((AE_INFO, status,
"[%4.4s] table load failed", "(%4.4s:%8.8s) while loading table",
&acpi_gbl_root_table_list.tables[i]. table->signature.ascii,
signature.ascii[0])); table->pointer->oem_table_id));
tables_failed++; tables_failed++;
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
"Table [%4.4s:%8.8s] (id FF) - Table namespace load failed\n\n",
table->signature.ascii,
table->pointer->oem_table_id));
} else { } else {
tables_loaded++; tables_loaded++;
} }
...@@ -215,8 +210,8 @@ acpi_status acpi_tb_load_namespace(void) ...@@ -215,8 +210,8 @@ acpi_status acpi_tb_load_namespace(void)
tables_loaded)); tables_loaded));
} else { } else {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"%u ACPI AML tables successfully acquired and loaded, %u failed", "%u table load failures, %u successful",
tables_loaded, tables_failed)); tables_failed, tables_loaded));
/* Indicate at least one failure */ /* Indicate at least one failure */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment