Changes to upgrade 16-bit support

date	2002.05.16.22.31.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:55:32 +00:00
parent 792fb19100
commit 1dd835f75b
5 changed files with 42 additions and 35 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
* $Revision: 1.60 $
* $Revision: 1.61 $
*
*****************************************************************************/
@ -290,7 +290,7 @@ AcpiTbRecognizeTable (
/* Return the table type and length via the info struct */
TableInfo->Length = TableHeader->Length;
TableInfo->Length = (ACPI_SIZE) TableHeader->Length;
/*
* Validate checksum for _most_ tables,

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
* $Revision: 1.51 $
* $Revision: 1.53 $
*
*****************************************************************************/
@ -118,7 +118,6 @@
#include "acpi.h"
#include "actables.h"
#include "acinterp.h"
#define _COMPONENT ACPI_TABLES
@ -212,7 +211,7 @@ AcpiTbValidateTableHeader (
/* Ensure that the signature is 4 ASCII characters */
ACPI_MOVE_UNALIGNED32_TO_32 (&Signature, &TableHeader->Signature);
ACPI_MOVE_UNALIGNED32_TO_32 (&Signature, TableHeader->Signature);
if (!AcpiUtValidAcpiName (Signature))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@ -260,11 +259,11 @@ AcpiTbValidateTableHeader (
ACPI_STATUS
AcpiTbMapAcpiTable (
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
UINT32 *Size,
ACPI_SIZE *Size,
ACPI_TABLE_HEADER **LogicalAddress)
{
ACPI_TABLE_HEADER *Table;
UINT32 TableSize = *Size;
ACPI_SIZE TableSize = *Size;
ACPI_STATUS Status = AE_OK;
@ -286,7 +285,7 @@ AcpiTbMapAcpiTable (
/* Extract the full table length before we delete the mapping */
TableSize = Table->Length;
TableSize = (ACPI_SIZE) Table->Length;
/*
* Validate the header and delete the mapping.
@ -358,7 +357,7 @@ AcpiTbVerifyTableChecksum (
if (Checksum)
{
ACPI_REPORT_WARNING (("Invalid checksum (%X) in table %4.4s\n",
Checksum, (char *) &TableHeader->Signature));
Checksum, TableHeader->Signature));
Status = AE_BAD_CHECKSUM;
}

View File

@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
* $Revision: 1.55 $
* $Revision: 1.57 $
*
*****************************************************************************/
@ -283,7 +283,7 @@ AcpiLoadTable (
case ACPI_TABLE_FACS:
AcpiTbBuildCommonFacs (&TableInfo);
Status = AcpiTbBuildCommonFacs (&TableInfo);
break;
default:
@ -465,7 +465,7 @@ AcpiGetTable (
{
ACPI_TABLE_HEADER *TblPtr;
ACPI_STATUS Status;
UINT32 TableLength;
ACPI_SIZE TableLength;
ACPI_FUNCTION_TRACE ("AcpiGetTable");
@ -522,7 +522,7 @@ AcpiGetTable (
}
else
{
TableLength = TblPtr->Length;
TableLength = (ACPI_SIZE) TblPtr->Length;
}
/* Validate/Allocate/Clear caller buffer */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* $Revision: 1.59 $
* $Revision: 1.63 $
*
*****************************************************************************/
@ -218,8 +218,8 @@ AcpiGetFirmwareTable (
ACPI_TABLE_HEADER *RsdtPtr = NULL;
ACPI_TABLE_HEADER *TablePtr;
ACPI_STATUS Status;
UINT32 RsdtSize = 0;
UINT32 TableSize;
ACPI_SIZE RsdtSize = 0;
ACPI_SIZE TableSize;
UINT32 TableCount;
UINT32 i;
UINT32 j;
@ -290,16 +290,16 @@ AcpiGetFirmwareTable (
}
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, RSDT physical=%8.8X%8.8X \n",
AcpiGbl_RSDP,
ACPI_HIDWORD (AcpiGbl_RSDP->RsdtPhysicalAddress),
ACPI_LODWORD (AcpiGbl_RSDP->RsdtPhysicalAddress)));
/* Get the RSDT and validate it */
AcpiTbGetRsdtAddress (&Address);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, RSDT physical=%8.8X%8.8X \n",
AcpiGbl_RSDP,
ACPI_HIDWORD (Address.Pointer.Value),
ACPI_LODWORD (Address.Pointer.Value)));
Status = AcpiTbGetTablePointer (&Address, Flags, &RsdtSize, &RsdtPtr);
if (ACPI_FAILURE (Status))
{
@ -385,13 +385,13 @@ Cleanup:
/* TBD: Move to a new file */
#ifndef _IA16
#if ACPI_MACHINE_WIDTH != 16
/*******************************************************************************
*
* FUNCTION: AcpiFindRootPointer
*
* PARAMETERS: **RsdpPhysicalAddress - Where to place the RSDP address
* PARAMETERS: **RsdpAddress - Where to place the RSDP address
* Flags - Logical/Physical addressing
*
* RETURN: Status, Physical address of the RSDP
@ -403,7 +403,7 @@ Cleanup:
ACPI_STATUS
AcpiFindRootPointer (
UINT32 Flags,
ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress)
ACPI_POINTER *RsdpAddress)
{
ACPI_TABLE_DESC TableInfo;
ACPI_STATUS Status;
@ -421,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);
}
@ -535,7 +536,7 @@ AcpiTbFindRsdp (
/* Found it, return the physical address */
PhysAddr = LO_RSDP_WINDOW_BASE;
PhysAddr += (MemRover - TablePtr);
PhysAddr += ACPI_PTR_DIFF (MemRover,TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
return_ACPI_STATUS (AE_OK);
@ -559,7 +560,7 @@ AcpiTbFindRsdp (
/* Found it, return the physical address */
PhysAddr = HI_RSDP_WINDOW_BASE;
PhysAddr += (MemRover - TablePtr);
PhysAddr += ACPI_PTR_DIFF (MemRover, TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
return_ACPI_STATUS (AE_OK);

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utalloc - local cache and memory allocation routines
* $Revision: 1.124 $
* $Revision: 1.126 $
*
*****************************************************************************/
@ -667,6 +667,7 @@ AcpiUtFreeAndTrack (
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *DebugBlock;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE_PTR ("UtFree", Allocation);
@ -686,8 +687,14 @@ AcpiUtFreeAndTrack (
AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].TotalFreed++;
AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].CurrentTotalSize -= DebugBlock->Size;
AcpiUtRemoveAllocation (ACPI_MEM_LIST_GLOBAL, DebugBlock,
Status = AcpiUtRemoveAllocation (ACPI_MEM_LIST_GLOBAL, DebugBlock,
Component, Module, Line);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not free memory, %s\n",
AcpiFormatException (Status)));
}
AcpiOsFree (DebugBlock);
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p freed\n", Allocation));
@ -1025,13 +1032,13 @@ AcpiUtDumpAllocations (
switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
{
case ACPI_DESC_TYPE_OPERAND:
AcpiOsPrintf ("ObjType %12.12s R%d",
AcpiOsPrintf ("ObjType %12.12s R%hd",
AcpiUtGetTypeName (Descriptor->Object.Common.Type),
Descriptor->Object.Common.ReferenceCount);
break;
case ACPI_DESC_TYPE_PARSER:
AcpiOsPrintf ("ParseObj AmlOpcode %04X",
AcpiOsPrintf ("ParseObj AmlOpcode %04hX",
Descriptor->Op.Asl.AmlOpcode);
break;