VirtualBox

Changeset 77705 in vbox


Ignore:
Timestamp:
Mar 14, 2019 6:32:03 PM (6 years ago)
Author:
vboxsync
Message:

EFI: Register just one low system memory range between 1MB and 4GB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/MemDetect.c

    r77669 r77705  
    750750  } else {
    751751    LowerMemorySize = GetSystemMemorySizeBelow4gb ();
    752 
    753     //
    754     // Determine the range of memory to use during PEI
    755     //
    756     MemoryBase = PcdGet32 (PcdOvmfDxeMemFvBase) + PcdGet32 (PcdOvmfDxeMemFvSize);
    757     MemorySize = LowerMemorySize - MemoryBase;
    758     if (MemorySize > SIZE_64MB) {
    759       MemoryBase = LowerMemorySize - SIZE_64MB;
    760       MemorySize = SIZE_64MB;
    761     }
    762   }
    763   MemorySize -= BASE_64KB; /* Reserves 64KB for ACPI tables. */
     752  }
     753  LowerMemorySize -= BASE_64KB; /* Reserves 64KB for ACPI tables. */
    764754
    765755  //
    766756  // Create memory HOBs
    767757  //
    768   AddMemoryBaseSizeHob (MemoryBase, MemorySize);
    769   AddMemoryRangeHob (BASE_1MB, MemoryBase);
    770   MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);
     758  AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
     759  MtrrSetMemoryAttribute (BASE_1MB, LowerMemorySize - BASE_1MB, CacheWriteBack);
    771760  AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
    772761  MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette