summaryrefslogtreecommitdiff
path: root/source/components/tables
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/tables')
-rw-r--r--source/components/tables/tbfadt.c11
-rw-r--r--source/components/tables/tbinstal.c4
-rw-r--r--source/components/tables/tbutils.c19
3 files changed, 27 insertions, 7 deletions
diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c
index ae4052099fe5..e8773204478c 100644
--- a/source/components/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
@@ -400,10 +400,6 @@ AcpiTbConvertFadt (
UINT32 i;
- /* Update the local FADT table header length */
-
- AcpiGbl_FADT.Header.Length = sizeof (ACPI_TABLE_FADT);
-
/*
* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
* Later code will always use the X 64-bit field.
@@ -437,6 +433,13 @@ AcpiTbConvertFadt (
}
/*
+ * Now we can update the local FADT length to the length of the
+ * current FADT version as defined by the ACPI specification.
+ * Thus, we will have a common FADT internally.
+ */
+ AcpiGbl_FADT.Header.Length = sizeof (ACPI_TABLE_FADT);
+
+ /*
* Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X"
* generic address structures as necessary. Later code will always use
* the 64-bit address structures.
diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c
index 5c6bd876f819..f100ab43f721 100644
--- a/source/components/tables/tbinstal.c
+++ b/source/components/tables/tbinstal.c
@@ -510,8 +510,10 @@ AcpiTbDeleteTable (
ACPI_FREE (TableDesc->Pointer);
break;
+ /* Not mapped or allocated, there is nothing we can do */
+
default:
- break;
+ return;
}
TableDesc->Pointer = NULL;
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 */