summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-11-04 04:09:15 +0800
committerLv Zheng <lv.zheng@intel.com>2016-11-04 04:09:15 +0800
commitd98de9ca14891130efc5dcdc871b97eb27b4b0f5 (patch)
treeb85f477fb2d8125c6b86f8b4a1a47a5806a9fd9a /source
parentcac6790954d4d752a083e6122220b8a22febcd07 (diff)
downloadacpica-d98de9ca14891130efc5dcdc871b97eb27b4b0f5.tar.gz
Tables: Allow FADT to be customized with virtual address
FADT parsing code requires FADT to be installed as ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, using new AcpiTbGetTable()/AcpiTbPutTable(), other address types can also be allowed, thus facilitates FADT customization with virtual address. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Diffstat (limited to 'source')
-rw-r--r--source/components/tables/tbfadt.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c
index 89c6c0e2d..4085db300 100644
--- a/source/components/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
@@ -413,6 +413,8 @@ AcpiTbParseFadt (
{
UINT32 Length;
ACPI_TABLE_HEADER *Table;
+ ACPI_TABLE_DESC *FadtDesc;
+ ACPI_STATUS Status;
/*
@@ -422,14 +424,13 @@ AcpiTbParseFadt (
* Get a local copy of the FADT and convert it to a common format
* Map entire FADT, assumed to be smaller than one page.
*/
- Length = AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Length;
-
- Table = AcpiOsMapMemory (
- AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Address, Length);
- if (!Table)
+ FadtDesc = &AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex];
+ Status = AcpiTbGetTable (FadtDesc, &Table);
+ if (ACPI_FAILURE (Status))
{
return;
}
+ Length = FadtDesc->Length;
/*
* Validate the FADT checksum before we copy the table. Ignore
@@ -443,7 +444,7 @@ AcpiTbParseFadt (
/* All done with the real FADT, unmap it */
- AcpiOsUnmapMemory (Table, Length);
+ AcpiTbPutTable (FadtDesc);
/* Obtain the DSDT and FACS tables via their addresses within the FADT */