Changeset 101439 in vbox for trunk/src/VBox/Devices/EFI
- Timestamp:
- Oct 13, 2023 1:18:45 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 159498
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c
r99464 r101439 17 17 #include <Library/PcdLib.h> 18 18 #include <Library/CacheMaintenanceLib.h> 19 20 #ifdef VBOX 21 # include <Library/VBoxArmPlatformLib.h> 22 #endif 23 19 24 20 25 VOID … … 56 61 VOID *Hob; 57 62 63 #ifndef VBOX 58 64 // Ensure PcdSystemMemorySize has been set 59 65 ASSERT (PcdGet64 (PcdSystemMemorySize) != 0); 60 66 61 67 SystemMemorySize = PcdGet64 (PcdSystemMemorySize); 68 #else 69 // Ensure we have memory 70 ASSERT (VBoxArmPlatformRamBaseSizeGet() != 0); 71 72 SystemMemorySize = VBoxArmPlatformRamBaseSizeGet(); 73 #endif 62 74 63 75 Hob = GetFirstGuidHob (&gArmVirtSystemMemorySizeGuid); … … 76 88 ); 77 89 90 #ifndef VBOX 78 91 SystemMemoryTop = PcdGet64 (PcdSystemMemoryBase) + SystemMemorySize; 92 #else 93 SystemMemoryTop = (UINTN)VBoxArmPlatformRamBaseStartGetPhysAddr() + SystemMemorySize; 94 #endif 79 95 80 96 if (SystemMemoryTop - 1 > MAX_ALLOC_ADDRESS) { … … 82 98 EFI_RESOURCE_SYSTEM_MEMORY, 83 99 ResourceAttributes, 100 #ifndef VBOX 84 101 PcdGet64 (PcdSystemMemoryBase), 85 102 (UINT64)MAX_ALLOC_ADDRESS - PcdGet64 (PcdSystemMemoryBase) + 1 103 #else 104 (UINT64)VBoxArmPlatformRamBaseStartGetPhysAddr(), 105 (UINT64)MAX_ALLOC_ADDRESS - VBoxArmPlatformRamBaseStartGetPhysAddr() + 1 106 #endif 86 107 ); 87 108 BuildResourceDescriptorHob ( … … 95 116 EFI_RESOURCE_SYSTEM_MEMORY, 96 117 ResourceAttributes, 118 #ifndef VBOX 97 119 PcdGet64 (PcdSystemMemoryBase), 120 #else 121 (UINT64)VBoxArmPlatformRamBaseStartGetPhysAddr(), 122 #endif 98 123 SystemMemorySize 99 124 ); -
trunk/src/VBox/Devices/EFI/Firmware/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf
r99464 r101439 25 25 ArmPlatformPkg/ArmPlatformPkg.dec 26 26 ArmVirtPkg/ArmVirtPkg.dec 27 VBoxPkg/VBoxPkg.dec # VBox: Added 27 28 28 29 [LibraryClasses] … … 33 34 ArmVirtMemInfoLib 34 35 CacheMaintenanceLib 36 VBoxArmPlatformLib # VBox: Added 35 37 36 38 [Guids] -
trunk/src/VBox/Devices/EFI/Firmware/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.c
r99464 r101439 16 16 #include <Library/PcdLib.h> 17 17 #include <Guid/MemoryTypeInformation.h> 18 19 #ifdef VBOX 20 # include <Library/VBoxArmPlatformLib.h> 21 #endif 18 22 19 23 EFI_STATUS … … 80 84 EFI_STATUS Status; 81 85 86 #ifndef VBOX 82 87 ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) < (UINT64)MAX_ALLOC_ADDRESS); 83 88 … … 88 93 UefiMemoryBase = (UINTN)FixedPcdGet64 (PcdSystemMemoryBase) + SIZE_128MB 89 94 - FixedPcdGet32 (PcdSystemMemoryUefiRegionSize); 95 #else 96 ASSERT (VBoxArmPlatformRamBaseStartGetPhysAddr() < (UINT64)MAX_ALLOC_ADDRESS); 97 98 // 99 // Put the permanent PEI memory at the top of the base DRAM region. 100 // 101 UefiMemoryBase = (UINTN)VBoxArmPlatformRamBaseStartGetPhysAddr() + VBoxArmPlatformRamBaseSizeGet() 102 - FixedPcdGet32 (PcdSystemMemoryUefiRegionSize); 103 #endif 90 104 91 105 Status = PeiServicesInstallPeiMemory ( -
trunk/src/VBox/Devices/EFI/Firmware/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
r99464 r101439 27 27 ArmPkg/ArmPkg.dec 28 28 ArmPlatformPkg/ArmPlatformPkg.dec 29 VBoxPkg/VBoxPkg.dec # VBox: Added 29 30 30 31 [LibraryClasses] … … 35 36 ArmPlatformLib 36 37 MemoryInitPeiLib 38 VBoxArmPlatformLib # VBox: Added 37 39 38 40 [Guids] … … 43 45 44 46 [FixedPcd] 45 gArmTokenSpaceGuid.PcdSystemMemoryBase 47 # gArmTokenSpaceGuid.PcdSystemMemoryBase VBox: Commented out 46 48 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize 47 49 -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxVirtMemInfoLib/VBoxVirtMemInfoPeiLib.inf
r101434 r101439 69 69 gArmTokenSpaceGuid.PcdFdBaseAddress 70 70 gArmTokenSpaceGuid.PcdFvBaseAddress 71 gArmTokenSpaceGuid.PcdSystemMemoryBase72 gArmTokenSpaceGuid.PcdSystemMemorySize73 71 gArmTokenSpaceGuid.PcdFdSize 74 72 gArmTokenSpaceGuid.PcdFvSize -
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxVirtMemInfoLib/VBoxVirtMemInfoPeiLibConstructor.c
r101434 r101439 56 56 57 57 /** @todo This will go away soon when we change the other places to deal with dynamic RAM ranges. */ 58 //59 // Make sure the start of DRAM matches our expectation60 //61 ASSERT (PcdGet64 (PcdSystemMemoryBase) == NewBase);62 63 58 Hob = BuildGuidDataHob ( 64 59 &gArmVirtSystemMemorySizeGuid,
Note:
See TracChangeset
for help on using the changeset viewer.