diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-06-16 19:48:16 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-06-16 19:48:16 +0000 |
commit | 8811b910b092027f905013bced1da3e87c6b07b9 (patch) | |
tree | b0c56a23f2d8877b9431deb3cab73df3c1913fb7 /source/components/tables/tbutils.c | |
parent | 0c85196b0c51b4e5eba8fcace026f947f9112c9e (diff) | |
download | src-8811b910b092027f905013bced1da3e87c6b07b9.tar.gz src-8811b910b092027f905013bced1da3e87c6b07b9.zip |
Import ACPICA 20150616.vendor/acpica/20150616
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=284458
svn path=/vendor-sys/acpica/20150616/; revision=284459; tag=vendor/acpica/20150616
Diffstat (limited to 'source/components/tables/tbutils.c')
-rw-r--r-- | source/components/tables/tbutils.c | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index 7159c6093430..79dde9ac9735 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -75,8 +75,13 @@ ACPI_STATUS AcpiTbInitializeFacs ( void) { - ACPI_STATUS Status; + /* If there is no FACS, just continue. There was already an error msg */ + + if (!AcpiGbl_FACS) + { + return (AE_OK); + } /* If Hardware Reduced flag is set, there is no FACS */ @@ -86,9 +91,25 @@ 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_Facs32 && !AcpiGbl_Facs64) + { + return (AE_NO_MEMORY); + } + + if (AcpiGbl_Use32BitFacsAddresses) + { + AcpiGbl_FACS = AcpiGbl_Facs32 ? AcpiGbl_Facs32 : AcpiGbl_Facs64; + } + else + { + AcpiGbl_FACS = AcpiGbl_Facs64 ? AcpiGbl_Facs64 : AcpiGbl_Facs32; + } + + return (AE_OK); } #endif /* !ACPI_REDUCED_HARDWARE */ @@ -111,7 +132,7 @@ AcpiTbTablesLoaded ( void) { - if (AcpiGbl_RootTableList.CurrentTableCount >= 3) + if (AcpiGbl_RootTableList.CurrentTableCount >= 4) { return (TRUE); } @@ -190,7 +211,7 @@ AcpiTbCopyDsdt ( return (NULL); } - ACPI_MEMCPY (NewTable, TableDesc->Pointer, TableDesc->Length); + memcpy (NewTable, TableDesc->Pointer, TableDesc->Length); AcpiTbUninstallTable (TableDesc); AcpiTbInitTableDescriptor ( @@ -389,11 +410,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 */ |