diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components/tables/tbutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/tables/tbutils.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/sys/contrib/dev/acpica/components/tables/tbutils.c b/sys/contrib/dev/acpica/components/tables/tbutils.c index 8b80025..94ac4f9 100644 --- a/sys/contrib/dev/acpica/components/tables/tbutils.c +++ b/sys/contrib/dev/acpica/components/tables/tbutils.c @@ -75,8 +75,6 @@ ACPI_STATUS AcpiTbInitializeFacs ( void) { - ACPI_STATUS Status; - /* If Hardware Reduced flag is set, there is no FACS */ @@ -86,9 +84,23 @@ AcpiTbInitializeFacs ( return (AE_OK); } - Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, - ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_FACS)); - return (Status); + (void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS, + ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs32)); + (void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_X_FACS, + ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs64)); + + if (AcpiGbl_Facs64 && (!AcpiGbl_Facs32 || !AcpiGbl_Use32BitFacsAddresses)) + { + AcpiGbl_FACS = AcpiGbl_Facs64; + } + else if (AcpiGbl_Facs32) + { + AcpiGbl_FACS = AcpiGbl_Facs32; + } + + /* If there is no FACS, just continue. There was already an error msg */ + + return (AE_OK); } #endif /* !ACPI_REDUCED_HARDWARE */ @@ -111,7 +123,7 @@ AcpiTbTablesLoaded ( void) { - if (AcpiGbl_RootTableList.CurrentTableCount >= 3) + if (AcpiGbl_RootTableList.CurrentTableCount >= 4) { return (TRUE); } @@ -190,7 +202,7 @@ AcpiTbCopyDsdt ( return (NULL); } - ACPI_MEMCPY (NewTable, TableDesc->Pointer, TableDesc->Length); + memcpy (NewTable, TableDesc->Pointer, TableDesc->Length); AcpiTbUninstallTable (TableDesc); AcpiTbInitTableDescriptor ( @@ -389,11 +401,11 @@ AcpiTbParseRootTable ( TableEntry = ACPI_ADD_PTR (UINT8, Table, sizeof (ACPI_TABLE_HEADER)); /* - * First two entries in the table array are reserved for the DSDT - * and FACS, which are not actually present in the RSDT/XSDT - they - * come from the FADT + * First three entries in the table array are reserved for the DSDT + * and 32bit/64bit FACS, which are not actually present in the + * RSDT/XSDT - they come from the FADT */ - AcpiGbl_RootTableList.CurrentTableCount = 2; + AcpiGbl_RootTableList.CurrentTableCount = 3; /* Initialize the root table array from the RSDT/XSDT */ |