summaryrefslogtreecommitdiff
path: root/source/components/tables/tbutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/tables/tbutils.c')
-rw-r--r--source/components/tables/tbutils.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c
index bfdcf0c29832..e8b5705e96e7 100644
--- a/source/components/tables/tbutils.c
+++ b/source/components/tables/tbutils.c
@@ -492,8 +492,9 @@ AcpiTbInstallTable (
*
* NOTE: If the table is overridden, then FinalTable will contain a
* mapped pointer to the full new table. If the table is not overridden,
- * then the table will be fully mapped elsewhere (in verify table).
- * In any case, we must unmap the header that was mapped above.
+ * or if there has been a physical override, then the table will be
+ * fully mapped later (in verify table). In any case, we must
+ * unmap the header that was mapped above.
*/
FinalTable = AcpiTbTableOverride (Table, TableDesc);
if (!FinalTable)
@@ -510,6 +511,20 @@ AcpiTbInstallTable (
AcpiUtSetIntegerWidth (FinalTable->Revision);
}
+ /*
+ * If we have a physical override during this early loading of the ACPI
+ * tables, unmap the table for now. It will be mapped again later when
+ * it is actually used. This supports very early loading of ACPI tables,
+ * before virtual memory is fully initialized and running within the
+ * host OS. Note: A logical override has the ACPI_TABLE_ORIGIN_OVERRIDE
+ * flag set and will not be deleted below.
+ */
+ if (FinalTable != Table)
+ {
+ AcpiTbDeleteTable (TableDesc);
+ }
+
+
UnmapAndExit:
/* Always unmap the table header that we mapped above */