diff options
Diffstat (limited to 'source/components/tables/tbxface.c')
| -rw-r--r-- | source/components/tables/tbxface.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 3f4992885e86..5fd178f55a89 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -292,6 +292,7 @@ AcpiReallocateRootTable ( void) { ACPI_STATUS Status; + ACPI_TABLE_DESC *TableDesc; UINT32 i; @@ -307,6 +308,8 @@ AcpiReallocateRootTable ( return_ACPI_STATUS (AE_SUPPORT); } + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + /* * Ensure OS early boot logic, which is required by some hosts. If the * table state is reported to be wrong, developers should fix the @@ -315,17 +318,41 @@ AcpiReallocateRootTable ( */ for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) { - if (AcpiGbl_RootTableList.Tables[i].Pointer) + TableDesc = &AcpiGbl_RootTableList.Tables[i]; + if (TableDesc->Pointer) { ACPI_ERROR ((AE_INFO, "Table [%4.4s] is not invalidated during early boot stage", - AcpiGbl_RootTableList.Tables[i].Signature.Ascii)); + TableDesc->Signature.Ascii)); } } - AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE; + if (!AcpiGbl_EnableTableValidation) + { + /* + * Now it's safe to do full table validation. We can do deferred + * table initilization here once the flag is set. + */ + AcpiGbl_EnableTableValidation = TRUE; + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) + { + TableDesc = &AcpiGbl_RootTableList.Tables[i]; + if (!(TableDesc->Flags & ACPI_TABLE_IS_VERIFIED)) + { + Status = AcpiTbVerifyTempTable (TableDesc, NULL, NULL); + if (ACPI_FAILURE (Status)) + { + AcpiTbUninstallTable (TableDesc); + } + } + } + } + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE; Status = AcpiTbResizeRootTableList (); + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED; + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); return_ACPI_STATUS (Status); } @@ -522,6 +549,11 @@ AcpiPutTable ( ACPI_FUNCTION_TRACE (AcpiPutTable); + if (!Table) + { + return_VOID; + } + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); /* Walk the root table list */ |
