1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-30 16:51:41 +00:00

This commit was generated by cvs2svn to compensate for changes in r131440,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Mark Santcroos 2004-07-02 08:14:36 +00:00
commit 648474d5f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131441
10 changed files with 166 additions and 73 deletions

View File

@ -1,3 +1,50 @@
----------------------------------------
27 May 2004. Summary of changes for version 20040527:
1) ACPI CA Core Subsystem:
Completed a new design and implementation for EBDA (Extended BIOS
Data Area) support in the RSDP scan code. The original code
improperly scanned for the EBDA by simply scanning from memory
location 0 to 0x400. The correct method is to first obtain the
EBDA pointer from within the BIOS data area, then scan 1K of
memory starting at the EBDA pointer. There appear to be few if
any machines that place the RSDP in the EBDA, however.
Integrated a fix for a possible fault during evaluation of
BufferField arguments. Obsolete code that was causing the
problem was removed.
Found and fixed a problem in the Field Support Code where data
could be corrupted on a bit field read that starts on an aligned
boundary but does not end on an aligned boundary. Merged the
read/write "datum length" calculation code into a common
procedure.
Rolled in a couple of changes to the FreeBSD-specific header.
Code and Data Size: Current and previous core subsystem library
sizes are shown below. These are the code and data sizes for the
acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
these values will vary depending on the efficiency of the
compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.6K Code, 11.5K Data, 89.1K Total
Debug Version: 163.2K Code, 67.2K Data, 230.4K Total
Current Release:
Non-Debug Version: 77.7K Code, 11.5K Data, 89.2K Total
Debug Version: 163.3K Code, 67.2K Data, 230.5K Total
2) iASL Compiler/Disassembler:
Fixed a generation warning produced by some overly-verbose
compilers for a 64-bit constant.
----------------------------------------
14 May 2004. Summary of changes for version 20040514:

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
* $Revision: 148 $
* $Revision: 149 $
*
*****************************************************************************/
@ -190,6 +190,12 @@ AcpiExConvertToAscii (
* exfield - ACPI AML (p-code) execution - field manipulation
*/
ACPI_STATUS
AcpiExCommonBufferSetup (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT32 BufferLength,
UINT32 *DatumCount);
ACPI_STATUS
AcpiExExtractFromField (
ACPI_OPERAND_OBJECT *ObjDesc,

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 150 $
* $Revision: 151 $
*
*****************************************************************************/
@ -126,6 +126,9 @@
#define ACPI_LOBYTE(l) ((UINT8)(UINT16)(l))
#define ACPI_HIBYTE(l) ((UINT8)((((UINT16)(l)) >> 8) & 0xFF))
#define ACPI_SET_BIT(target,bit) ((target) |= (bit))
#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
#if ACPI_MACHINE_WIDTH == 16

View File

@ -2252,7 +2252,7 @@ QWordConstExpr
ConstExprTerm
: PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
| PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
| PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, 0xFFFFFFFFFFFFFFFFull);}
| PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);}
;
/* OptionalCount must appear before ByteList or an incorrect reduction will result */

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
* $Revision: 105 $
* $Revision: 106 $
*
******************************************************************************/
@ -824,8 +824,8 @@ AcpiDbDisplayGpes (void)
(GpeBlock->RegisterCount * 8) -1);
AcpiOsPrintf (" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
GpeBlock->RegisterInfo,
ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->StatusAddress.Address)),
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->EnableAddress.Address)));
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
/* Examine each GPE Register within the block */
@ -838,8 +838,8 @@ AcpiDbDisplayGpes (void)
" Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n",
i, GpeRegisterInfo->EnableForWake,
GpeRegisterInfo->EnableForRun,
ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->StatusAddress.Address)),
ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)));
/* Now look at the individual GPEs in this byte register */

View File

@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
* $Revision: 94 $
* $Revision: 95 $
*
*****************************************************************************/
@ -153,7 +153,6 @@ AcpiDsExecuteArguments (
ACPI_STATUS Status;
ACPI_PARSE_OBJECT *Op;
ACPI_WALK_STATE *WalkState;
ACPI_PARSE_OBJECT *Arg;
ACPI_FUNCTION_TRACE ("DsExecuteArguments");
@ -204,9 +203,7 @@ AcpiDsExecuteArguments (
/* Get and init the Op created above */
Arg = Op->Common.Value.Arg;
Op->Common.Node = Node;
Arg->Common.Node = Node;
AcpiPsDeleteParseTree (Op);
/* Evaluate the deferred arguments */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evgpe - General Purpose Event handling and dispatch
* $Revision: 40 $
* $Revision: 42 $
*
*****************************************************************************/
@ -206,28 +206,28 @@ AcpiEvUpdateGpeEnableMasks (
if (Type == ACPI_GPE_DISABLE)
{
GpeRegisterInfo->EnableForWake &= ~RegisterBit;
GpeRegisterInfo->EnableForRun &= ~RegisterBit;
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
return_ACPI_STATUS (AE_OK);
}
/* 2) Enable case. Set the appropriate enable bits */
/* 2) Enable case. Set/Clear the appropriate enable bits */
switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
{
case ACPI_GPE_TYPE_WAKE:
GpeRegisterInfo->EnableForWake |= RegisterBit;
GpeRegisterInfo->EnableForRun &= ~RegisterBit;
ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
break;
case ACPI_GPE_TYPE_RUNTIME:
GpeRegisterInfo->EnableForWake &= ~RegisterBit;
GpeRegisterInfo->EnableForRun |= RegisterBit;
ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
break;
case ACPI_GPE_TYPE_WAKE_RUN:
GpeRegisterInfo->EnableForWake |= RegisterBit;
GpeRegisterInfo->EnableForRun |= RegisterBit;
ACPI_SET_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
ACPI_SET_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
break;
default:
@ -274,17 +274,19 @@ AcpiEvEnableGpe (
switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
{
case ACPI_GPE_TYPE_WAKE:
GpeEventInfo->Flags |= ACPI_GPE_WAKE_ENABLED;
ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
break;
case ACPI_GPE_TYPE_WAKE_RUN:
GpeEventInfo->Flags |= ACPI_GPE_WAKE_ENABLED;
ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
/*lint -fallthrough */
case ACPI_GPE_TYPE_RUNTIME:
GpeEventInfo->Flags |= ACPI_GPE_RUN_ENABLED;
ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
if (WriteToHardware)
{
@ -350,11 +352,11 @@ AcpiEvDisableGpe (
switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
{
case ACPI_GPE_TYPE_WAKE:
GpeEventInfo->Flags &= ~ACPI_GPE_WAKE_ENABLED;
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
break;
case ACPI_GPE_TYPE_WAKE_RUN:
GpeEventInfo->Flags &= ~ACPI_GPE_WAKE_ENABLED;
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
/*lint -fallthrough */
@ -362,7 +364,7 @@ AcpiEvDisableGpe (
/* Disable the requested runtime GPE */
GpeEventInfo->Flags &= ~ACPI_GPE_RUN_ENABLED;
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
break;
@ -721,11 +723,11 @@ AcpiEvGpeDispatch (
if (AcpiGbl_SystemAwakeAndRunning)
{
GpeEventInfo->Flags |= ACPI_GPE_SYSTEM_RUNNING;
ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
}
else
{
GpeEventInfo->Flags &= ~ACPI_GPE_SYSTEM_RUNNING;
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
}
/*
@ -739,9 +741,11 @@ AcpiEvGpeDispatch (
{
case ACPI_GPE_DISPATCH_HANDLER:
/* Invoke the installed handler (at interrupt level) */
GpeEventInfo->Dispatch.Handler->Address ((void *)
/*
* Invoke the installed handler (at interrupt level)
* Ignore return status for now. TBD: leave GPE disabled on error?
*/
(void) GpeEventInfo->Dispatch.Handler->Address (
GpeEventInfo->Dispatch.Handler->Context);
/* It is now safe to clear level-triggered events. */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evgpeblk - GPE block creation and initialization.
* $Revision: 34 $
* $Revision: 36 $
*
*****************************************************************************/
@ -1102,8 +1102,8 @@ AcpiEvCreateGpeBlock (
/* Dump info about this GPE block */
ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
"GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n",
GpeBlock->BlockBaseNumber,
"GPE %02X to %02X [%4.4s] %u regs at %8.8X%8.8X on int 0x%X\n",
(UINT32) GpeBlock->BlockBaseNumber,
(UINT32) (GpeBlock->BlockBaseNumber +
((GpeBlock->RegisterCount * ACPI_GPE_REGISTER_WIDTH) -1)),
GpeDevice->Name.Ascii,

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
* $Revision: 77 $
* $Revision: 78 $
*
*****************************************************************************/
@ -415,7 +415,7 @@ AcpiExLoadOp (
for (i = 0; i < 8; i++)
{
Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
(ACPI_PHYSICAL_ADDRESS) i + Address, 8,
(ACPI_PHYSICAL_ADDRESS) (i + Address), 8,
((UINT8 *) &TableHeader) + i);
if (ACPI_FAILURE (Status))
{
@ -443,7 +443,7 @@ AcpiExLoadOp (
for (i = 0; i < TableHeader.Length; i++)
{
Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
(ACPI_PHYSICAL_ADDRESS) i + Address, 8,
(ACPI_PHYSICAL_ADDRESS) (i + Address), 8,
((UINT8 *) TablePtr + i));
if (ACPI_FAILURE (Status))
{

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* $Revision: 72 $
* $Revision: 73 $
*
*****************************************************************************/
@ -486,14 +486,17 @@ AcpiTbScanMemoryForRsdp (
* Flags - Current memory mode (logical vs.
* physical addressing)
*
* RETURN: Status
* RETURN: Status, RSDP physical address
*
* DESCRIPTION: Search lower 1Mbyte of memory for the root system descriptor
* pointer structure. If it is found, set *RSDP to point to it.
*
* NOTE: The RSDP must be either in the first 1K of the Extended
* BIOS Data Area or between E0000 and FFFFF (ACPI 1.0 section
* 5.2.2; assertion #421).
* NOTE1: The RSDP must be either in the first 1K of the Extended
* BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
* Only a 32-bit physical address is necessary.
*
* NOTE2: This function is always available, regardless of the
* initialization state of the rest of ACPI.
*
******************************************************************************/
@ -504,8 +507,8 @@ AcpiTbFindRsdp (
{
UINT8 *TablePtr;
UINT8 *MemRover;
UINT64 PhysAddr;
ACPI_STATUS Status = AE_OK;
UINT32 PhysicalAddress;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE ("TbFindRsdp");
@ -517,39 +520,62 @@ AcpiTbFindRsdp (
if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
{
/*
* 1) Search EBDA (low memory) paragraphs
* 1a) Get the location of the EBDA
*/
Status = AcpiOsMapMemory ((UINT64) ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE,
Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
ACPI_EBDA_PTR_LENGTH,
(void *) &TablePtr);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
return_ACPI_STATUS (Status);
}
MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
AcpiOsUnmapMemory (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
ACPI_MOVE_16_TO_32 (&PhysicalAddress, TablePtr);
PhysicalAddress <<= 4; /* Convert segment to physical address */
AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_PTR_LENGTH);
if (MemRover)
/* EBDA present? */
if (PhysicalAddress > 0x400)
{
/* Found it, return the physical address */
/*
* 1b) Search EBDA paragraphs (EBDA is required to be a minimum of 1K length)
*/
Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
ACPI_EBDA_WINDOW_SIZE,
(void *) &TablePtr);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
return_ACPI_STATUS (Status);
}
PhysAddr = ACPI_LO_RSDP_WINDOW_BASE;
PhysAddr += ACPI_PTR_DIFF (MemRover,TablePtr);
MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_EBDA_WINDOW_SIZE);
AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
TableInfo->PhysicalAddress = PhysAddr;
return_ACPI_STATUS (AE_OK);
if (MemRover)
{
/* Found it, return the physical address */
PhysicalAddress += ACPI_PTR_DIFF (MemRover, TablePtr);
TableInfo->PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
return_ACPI_STATUS (AE_OK);
}
}
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
* 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
*/
Status = AcpiOsMapMemory ((UINT64) ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE,
Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
ACPI_HI_RSDP_WINDOW_SIZE,
(void *) &TablePtr);
if (ACPI_FAILURE (Status))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
return_ACPI_STATUS (Status);
}
@ -561,10 +587,9 @@ AcpiTbFindRsdp (
{
/* Found it, return the physical address */
PhysAddr = ACPI_HI_RSDP_WINDOW_BASE;
PhysAddr += ACPI_PTR_DIFF (MemRover, TablePtr);
PhysicalAddress = ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr);
TableInfo->PhysicalAddress = PhysAddr;
TableInfo->PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
return_ACPI_STATUS (AE_OK);
}
}
@ -575,20 +600,31 @@ AcpiTbFindRsdp (
else
{
/*
* 1) Search EBDA (low memory) paragraphs
* 1a) Get the location of the EBDA
*/
MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_LO_RSDP_WINDOW_BASE),
ACPI_LO_RSDP_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
ACPI_MOVE_16_TO_32 (&PhysicalAddress, ACPI_EBDA_PTR_LOCATION);
PhysicalAddress <<= 4; /* Convert segment to physical address */
TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
return_ACPI_STATUS (AE_OK);
/* EBDA present? */
if (PhysicalAddress > 0x400)
{
/*
* 1b) Search EBDA paragraphs (EBDA is required to be a minimum of 1K length)
*/
MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (PhysicalAddress),
ACPI_EBDA_WINDOW_SIZE);
if (MemRover)
{
/* Found it, return the physical address */
TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
return_ACPI_STATUS (AE_OK);
}
}
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
* 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
*/
MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_HI_RSDP_WINDOW_BASE),
ACPI_HI_RSDP_WINDOW_SIZE);