Skip to content

Commit

Permalink
ACPICA: acpiexec: Add testability of deferred table verification
Browse files Browse the repository at this point in the history
ACPICA commit 04c28c7549e694ea85f40bcc816039e5fbb4169c

This patch adds testability of deferred table verification mechanism. As
acpiexec uses dynamically allocated root table list from its very early
stage, a change to acpi_reallocate_root_table() is required to allow deferred
table verification mechanism to be triggered in such an environment. Note
that acpi_gbl_enable_table_validation is still TRUE by default, thus:
1. Developers need to manually set acpi_gbl_enable_table_validation to FALSE
   for acpiexec to enable this test.
2. For all other OSPMs (Linux, BSDs, etc.), this commit is a no-op.

Link: https://github.com/acpica/acpica/commit/04c28c7549e6
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Oct 3, 2017
1 parent 8381c54 commit 979fba9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/acpi/acpica/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,13 @@ acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
ACPI_FUNCTION_TRACE(acpi_reallocate_root_table);

/*
* Only reallocate the root table if the host provided a static buffer
* for the table array in the call to acpi_initialize_tables.
* If there are tables unverified, it is required to reallocate the
* root table list to clean up invalid table entries. Otherwise only
* reallocate the root table list if the host provided a static buffer
* for the table array in the call to acpi_initialize_tables().
*/
if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
if ((acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) &&
acpi_gbl_enable_table_validation) {
return_ACPI_STATUS(AE_SUPPORT);
}

Expand Down

0 comments on commit 979fba9

Please sign in to comment.