diff options
author | marks <marks@FreeBSD.org> | 2004-07-02 08:14:36 +0000 |
---|---|---|
committer | marks <marks@FreeBSD.org> | 2004-07-02 08:14:36 +0000 |
commit | 495d5925ec679ce55d0287e4017f08f423652cde (patch) | |
tree | b7112aff5f172ae5a7a0d0a53e892ca0390bba28 /sys/contrib | |
parent | f05df8a8816bd5a9d5ae811c1dc425c859f28c7f (diff) | |
parent | 4a971257d3dcd405c227bcc6e540511cbd19fd03 (diff) | |
download | FreeBSD-src-495d5925ec679ce55d0287e4017f08f423652cde.zip FreeBSD-src-495d5925ec679ce55d0287e4017f08f423652cde.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r131440,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/dev/acpica/CHANGES.txt | 47 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acinterp.h | 8 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acmacros.h | 5 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslcompiler.y | 2 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbdisply.c | 10 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dsopcode.c | 5 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evgpe.c | 46 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evgpeblk.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exconfig.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/tbxfroot.c | 102 |
10 files changed, 165 insertions, 72 deletions
diff --git a/sys/contrib/dev/acpica/CHANGES.txt b/sys/contrib/dev/acpica/CHANGES.txt index 9e71afc..81ac58d 100644 --- a/sys/contrib/dev/acpica/CHANGES.txt +++ b/sys/contrib/dev/acpica/CHANGES.txt @@ -1,4 +1,51 @@ ---------------------------------------- +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: 1) ACPI CA Core Subsystem: diff --git a/sys/contrib/dev/acpica/acinterp.h b/sys/contrib/dev/acpica/acinterp.h index a0f19a1..29ef907 100644 --- a/sys/contrib/dev/acpica/acinterp.h +++ b/sys/contrib/dev/acpica/acinterp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acinterp.h - Interpreter subcomponent prototypes and defines - * $Revision: 148 $ + * $Revision: 149 $ * *****************************************************************************/ @@ -191,6 +191,12 @@ AcpiExConvertToAscii ( */ ACPI_STATUS +AcpiExCommonBufferSetup ( + ACPI_OPERAND_OBJECT *ObjDesc, + UINT32 BufferLength, + UINT32 *DatumCount); + +ACPI_STATUS AcpiExExtractFromField ( ACPI_OPERAND_OBJECT *ObjDesc, void *Buffer, diff --git a/sys/contrib/dev/acpica/acmacros.h b/sys/contrib/dev/acpica/acmacros.h index 9f577d6..6eb509d 100644 --- a/sys/contrib/dev/acpica/acmacros.h +++ b/sys/contrib/dev/acpica/acmacros.h @@ -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 diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.y b/sys/contrib/dev/acpica/compiler/aslcompiler.y index 18fe3af..a3cbf5a 100644 --- a/sys/contrib/dev/acpica/compiler/aslcompiler.y +++ b/sys/contrib/dev/acpica/compiler/aslcompiler.y @@ -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 */ diff --git a/sys/contrib/dev/acpica/dbdisply.c b/sys/contrib/dev/acpica/dbdisply.c index 0dd6396..38476f2 100644 --- a/sys/contrib/dev/acpica/dbdisply.c +++ b/sys/contrib/dev/acpica/dbdisply.c @@ -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 */ diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c index 5ccabb6..6a69e4a 100644 --- a/sys/contrib/dev/acpica/dsopcode.c +++ b/sys/contrib/dev/acpica/dsopcode.c @@ -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 */ diff --git a/sys/contrib/dev/acpica/evgpe.c b/sys/contrib/dev/acpica/evgpe.c index 77ac5cd..f191d44 100644 --- a/sys/contrib/dev/acpica/evgpe.c +++ b/sys/contrib/dev/acpica/evgpe.c @@ -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. */ diff --git a/sys/contrib/dev/acpica/evgpeblk.c b/sys/contrib/dev/acpica/evgpeblk.c index b34cbe9..cc8d380 100644 --- a/sys/contrib/dev/acpica/evgpeblk.c +++ b/sys/contrib/dev/acpica/evgpeblk.c @@ -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, diff --git a/sys/contrib/dev/acpica/exconfig.c b/sys/contrib/dev/acpica/exconfig.c index e3ed108..4686b4a 100644 --- a/sys/contrib/dev/acpica/exconfig.c +++ b/sys/contrib/dev/acpica/exconfig.c @@ -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)) { diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c index 01b9dd3..4356602 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: 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) + ACPI_MOVE_16_TO_32 (&PhysicalAddress, ACPI_EBDA_PTR_LOCATION); + PhysicalAddress <<= 4; /* Convert segment to physical address */ + + /* 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) + */ + 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); + 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); |