Deleted Added
full compact
4c4
< * $Revision: 72 $
---
> * $Revision: 73 $
489c489
< * RETURN: Status
---
> * RETURN: Status, RSDP physical address
494,496c494,496
< * 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.
497a498,500
> * NOTE2: This function is always available, regardless of the
> * initialization state of the rest of ACPI.
> *
507,508c510,511
< UINT64 PhysAddr;
< ACPI_STATUS Status = AE_OK;
---
> UINT32 PhysicalAddress;
> ACPI_STATUS Status;
520c523
< * 1) Search EBDA (low memory) paragraphs
---
> * 1a) Get the location of the EBDA
522c525,526
< 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,
526,527c530,531
< 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));
531,532c535,537
< 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);
534c539,541
< if (MemRover)
---
> /* EBDA present? */
>
> if (PhysicalAddress > 0x400)
536c543,554
< /* 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);
> }
538,539c556,557
< 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);
541,542c559,567
< 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);
> }
546c571
< * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
---
> * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
548c573,574
< 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,
552c578
< 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",
564,565c590
< PhysAddr = ACPI_HI_RSDP_WINDOW_BASE;
< PhysAddr += ACPI_PTR_DIFF (MemRover, TablePtr);
---
> PhysicalAddress = ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr);
567c592
< TableInfo->PhysicalAddress = PhysAddr;
---
> TableInfo->PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
578c603
< * 1) Search EBDA (low memory) paragraphs
---
> * 1a) Get the location of the EBDA
580,582c605,610
< 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)
584c612,619
< /* 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 */
586,587c621,623
< TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
< return_ACPI_STATUS (AE_OK);
---
> TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
> return_ACPI_STATUS (AE_OK);
> }
591c627
< * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
---
> * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh