mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 18:04:08 +03:00
acpiexec: Add testability of deferred table verification
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 AcpiReallocateRootTable() is required to allow deferred table verification mechanism to be triggered in such an environment. Note that AcpiGbl_EnableTableValidation is still TRUE by default, thus: 1. Developers need to manually set AcpiGbl_EnableTableValidation to FALSE for acpiexec to enable this test. 2. For all other OSPMs (Linux, BSDs, etc.), this commit is a no-op. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
parent
41e7b3575c
commit
04c28c7549
@ -300,10 +300,13 @@ AcpiReallocateRootTable (
|
||||
|
||||
|
||||
/*
|
||||
* Only reallocate the root table if the host provided a static buffer
|
||||
* for the table array in the call to AcpiInitializeTables.
|
||||
* 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 AcpiInitializeTables().
|
||||
*/
|
||||
if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
|
||||
if ((AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) &&
|
||||
AcpiGbl_EnableTableValidation)
|
||||
{
|
||||
return_ACPI_STATUS (AE_SUPPORT);
|
||||
}
|
||||
|
@ -598,6 +598,14 @@ AeInstallTables (
|
||||
Status = AcpiInitializeTables (NULL, ACPI_MAX_INIT_TABLES, TRUE);
|
||||
ACPI_CHECK_OK (AcpiInitializeTables, Status);
|
||||
|
||||
/*
|
||||
* The following code is prepared to test the deferred table
|
||||
* verification mechanism. When AcpiGbl_EnableTableValidation is set
|
||||
* to FALSE by default, AcpiReallocateRootTable() sets it back to TRUE
|
||||
* and triggers the deferred table verification mechanism accordingly.
|
||||
*/
|
||||
(void) AcpiReallocateRootTable ();
|
||||
|
||||
if (AcpiGbl_LoadTestTables)
|
||||
{
|
||||
/* Test multiple table/UEFI support. First, get the headers */
|
||||
|
Loading…
x
Reference in New Issue
Block a user