Support for ACPI 2.0 tables - all hardware access via the Generic

Address Structure


date	2000.11.02.18.40.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:58:02 +00:00
parent 34c8032dc1
commit 1c9d57cd65
2 changed files with 23 additions and 18 deletions

View File

@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
* $Revision: 1.28 $
* $Revision: 1.31 $
*
*****************************************************************************/
@ -142,7 +142,7 @@
ACPI_STATUS
AcpiLoadTables (
void *RsdpPhysicalAddress)
ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress)
{
ACPI_STATUS Status = AE_OK;
UINT32 NumberOfTables = 0;
@ -232,7 +232,7 @@ AcpiLoadTable (
/* Copy the table to a local buffer */
Status = AcpiTbGetTable (NULL, TablePtr, &TableInfo);
Status = AcpiTbGetTable (0, TablePtr, &TableInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -481,7 +481,7 @@ AcpiGetTable (
/*
* RSD PTR is the only "table" without a header
*/
RetBufLen = sizeof (ROOT_SYSTEM_DESCRIPTOR_POINTER);
RetBufLen = sizeof (RSDP_DESCRIPTOR);
}
else
{

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* $Revision: 1.26 $
* $Revision: 1.33 $
*
*****************************************************************************/
@ -124,6 +124,7 @@
#define _COMPONENT TABLE_MANAGER
MODULE_NAME ("tbxfroot")
#define RSDP_CHECKSUM_LENGTH 20
/*******************************************************************************
@ -140,7 +141,7 @@
ACPI_STATUS
AcpiFindRootPointer (
void **RsdpPhysicalAddress)
ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress)
{
ACPI_TABLE_DESC TableInfo;
ACPI_STATUS Status;
@ -154,11 +155,11 @@ AcpiFindRootPointer (
Status = AcpiTbFindRsdp (&TableInfo);
if (ACPI_FAILURE (Status))
{
REPORT_WARNING (("RSDP structure not found\n"));
DEBUG_PRINT (ACPI_ERROR, ("RSDP structure not found\n"));
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
}
*RsdpPhysicalAddress = TableInfo.Pointer;
*RsdpPhysicalAddress = TableInfo.PhysicalAddress;
return_ACPI_STATUS (AE_OK);
}
@ -197,10 +198,9 @@ AcpiTbScanMemoryForRsdp (
/* The signature and checksum must both be correct */
if (STRNCMP ((NATIVE_CHAR *) MemRover,
RSDP_SIG, sizeof (RSDP_SIG)-1) == 0 &&
AcpiTbChecksum (MemRover,
sizeof (ROOT_SYSTEM_DESCRIPTOR_POINTER)) == 0)
if (STRNCMP ((NATIVE_CHAR *) MemRover,
RSDP_SIG, sizeof (RSDP_SIG)-1) == 0 &&
AcpiTbChecksum (MemRover, RSDP_CHECKSUM_LENGTH) == 0)
{
/* If so, we have found the RSDP */
@ -239,6 +239,7 @@ AcpiTbFindRsdp (
{
UINT8 *TablePtr;
UINT8 *MemRover;
UINT64 PhysAddr;
ACPI_STATUS Status = AE_OK;
@ -269,15 +270,17 @@ AcpiTbFindRsdp (
if (MemRover)
{
/* Found it, return pointer */
/* Found it, return the physical address */
TableInfo->Pointer = (ACPI_TABLE_HEADER *) MemRover;
PhysAddr = LO_RSDP_WINDOW_BASE;
PhysAddr += (MemRover - TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
return_ACPI_STATUS (AE_OK);
}
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
@ -296,12 +299,14 @@ AcpiTbFindRsdp (
AcpiOsUnmapMemory (TablePtr, HI_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return pointer */
/* Found it, return the physical address */
TableInfo->Pointer = (ACPI_TABLE_HEADER *) MemRover;
PhysAddr = HI_RSDP_WINDOW_BASE;
PhysAddr += (MemRover - TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
return_ACPI_STATUS (AE_OK);
}