diff options
Diffstat (limited to 'sys/contrib/dev/acpica/tbxfroot.c')
-rw-r--r-- | sys/contrib/dev/acpica/tbxfroot.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c index 8a2e147..0017ddc 100644 --- a/sys/contrib/dev/acpica/tbxfroot.c +++ b/sys/contrib/dev/acpica/tbxfroot.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbxfroot - Find the root ACPI table (RSDT) - * $Revision: 58 $ + * $Revision: 61 $ * *****************************************************************************/ @@ -213,7 +213,8 @@ AcpiGetFirmwareTable ( UINT32 Flags, ACPI_TABLE_HEADER **TablePointer) { - ACPI_PHYSICAL_ADDRESS PhysicalAddress; + ACPI_POINTER RsdpAddress; + ACPI_POINTER Address; ACPI_TABLE_HEADER *RsdtPtr = NULL; ACPI_TABLE_HEADER *TablePtr; ACPI_STATUS Status; @@ -246,7 +247,7 @@ AcpiGetFirmwareTable ( { /* Get the RSDP */ - Status = AcpiOsGetRootPointer (Flags, &PhysicalAddress); + Status = AcpiOsGetRootPointer (Flags, &RsdpAddress); if (ACPI_FAILURE (Status)) { ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "RSDP not found\n")); @@ -257,7 +258,7 @@ AcpiGetFirmwareTable ( if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) { - Status = AcpiOsMapMemory (PhysicalAddress, sizeof (RSDP_DESCRIPTOR), + Status = AcpiOsMapMemory (RsdpAddress.Pointer.Physical, sizeof (RSDP_DESCRIPTOR), (void **) &AcpiGbl_RSDP); if (ACPI_FAILURE (Status)) { @@ -266,7 +267,7 @@ AcpiGetFirmwareTable ( } else { - AcpiGbl_RSDP = ACPI_PHYSADDR_TO_PTR (PhysicalAddress); + AcpiGbl_RSDP = RsdpAddress.Pointer.Logical; } /* @@ -297,8 +298,9 @@ AcpiGetFirmwareTable ( /* Get the RSDT and validate it */ - PhysicalAddress = AcpiTbGetRsdtAddress (); - Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &RsdtSize, &RsdtPtr); + AcpiTbGetRsdtAddress (&Address); + + Status = AcpiTbGetTablePointer (&Address, Flags, &RsdtSize, &RsdtPtr); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -323,20 +325,20 @@ AcpiGetFirmwareTable ( { /* Get the next table pointer */ + Address.PointerType = AcpiGbl_TableFlags; if (AcpiGbl_RSDP->Revision < 2) { - PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) - ((RSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]; + Address.Pointer.Value = ((RSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]; } else { - PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) - ACPI_GET_ADDRESS (((XSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]); + Address.Pointer.Value = ACPI_GET_ADDRESS ( + ((XSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]); } /* Get addressibility if necessary */ - Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &TableSize, &TablePtr); + Status = AcpiTbGetTablePointer (&Address, Flags, &TableSize, &TablePtr); if (ACPI_FAILURE (Status)) { goto Cleanup; @@ -389,8 +391,8 @@ Cleanup: * * FUNCTION: AcpiFindRootPointer * - * PARAMETERS: **RsdpPhysicalAddress - Where to place the RSDP address - * Flags - Logical/Physical addressing + * PARAMETERS: **RsdpAddress - Where to place the RSDP address + * Flags - Logical/Physical addressing * * RETURN: Status, Physical address of the RSDP * @@ -401,7 +403,7 @@ Cleanup: ACPI_STATUS AcpiFindRootPointer ( UINT32 Flags, - ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress) + ACPI_POINTER *RsdpAddress) { ACPI_TABLE_DESC TableInfo; ACPI_STATUS Status; @@ -419,7 +421,8 @@ AcpiFindRootPointer ( return_ACPI_STATUS (AE_NO_ACPI_TABLES); } - *RsdpPhysicalAddress = TableInfo.PhysicalAddress; + RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER; + RsdpAddress->Pointer.Physical = TableInfo.PhysicalAddress; return_ACPI_STATUS (AE_OK); } |