summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/tables
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-03-20 21:37:52 +0000
committerjkim <jkim@FreeBSD.org>2012-03-20 21:37:52 +0000
commit9807567995352b475fd7e23ea58b7512a20e7bd3 (patch)
tree2a460dab9bb8e6fffc77dcd3749cddbe16ec0ab6 /sys/contrib/dev/acpica/components/tables
parent107d21a0f4a0fa5f29290cca23e94c24fe945998 (diff)
parentf65c4f80d1c60e597f67836e51986ebf3cd669f7 (diff)
downloadFreeBSD-src-9807567995352b475fd7e23ea58b7512a20e7bd3.zip
FreeBSD-src-9807567995352b475fd7e23ea58b7512a20e7bd3.tar.gz
Merge ACPICA 20120320.
Diffstat (limited to 'sys/contrib/dev/acpica/components/tables')
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbfadt.c11
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbinstal.c4
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbutils.c19
3 files changed, 27 insertions, 7 deletions
diff --git a/sys/contrib/dev/acpica/components/tables/tbfadt.c b/sys/contrib/dev/acpica/components/tables/tbfadt.c
index b137446..c6ba47f 100644
--- a/sys/contrib/dev/acpica/components/tables/tbfadt.c
+++ b/sys/contrib/dev/acpica/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/sys/contrib/dev/acpica/components/tables/tbinstal.c b/sys/contrib/dev/acpica/components/tables/tbinstal.c
index e178d94..b5a908c 100644
--- a/sys/contrib/dev/acpica/components/tables/tbinstal.c
+++ b/sys/contrib/dev/acpica/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/sys/contrib/dev/acpica/components/tables/tbutils.c b/sys/contrib/dev/acpica/components/tables/tbutils.c
index 02ee3e6..d053b19 100644
--- a/sys/contrib/dev/acpica/components/tables/tbutils.c
+++ b/sys/contrib/dev/acpica/components/tables/tbutils.c
@@ -507,8 +507,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)
@@ -525,6 +526,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 */
OpenPOWER on IntegriCloud