Changeset 82249 in vbox for trunk/src/VBox/Devices/EFI
- Timestamp:
- Nov 27, 2019 6:18:11 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135067
- Location:
- trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei/Fv.c
r80721 r82249 14 14 #include <Library/PcdLib.h> 15 15 16 #include <Library/BaseMemoryLib.h> 16 17 17 18 /** … … 28 29 { 29 30 BOOLEAN SecureS3Needed; 31 #ifdef VBOX 32 EFI_PHYSICAL_ADDRESS PhysOvmfDxeMemFvBaseRelocated = 0; 33 VOID *OvmfDxeMemFvBaseRelocated; 34 #endif 30 35 31 36 DEBUG ((EFI_D_INFO, "Platform PEI Firmware Volume Initialization\n")); 37 38 #ifdef VBOX 39 /* 40 * Relocate the DXE firmware to the top of the RAM so it doesn't interfer with older OS X bootloaders 41 * trying to allocate memory in the area where MEMFD is currently residing. 42 */ 43 PeiServicesAllocatePages (EfiRuntimeServicesCode, 44 EFI_SIZE_TO_PAGES(PcdGet32 (PcdOvmfDxeMemFvSize)), 45 &PhysOvmfDxeMemFvBaseRelocated); 46 47 OvmfDxeMemFvBaseRelocated = (VOID *)(UINTN)PhysOvmfDxeMemFvBaseRelocated; 48 CopyMem (OvmfDxeMemFvBaseRelocated, (VOID *)(UINTN)PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize)); 49 50 // 51 // Let DXE know about the DXE FV 52 // 53 BuildFvHob (PhysOvmfDxeMemFvBaseRelocated, PcdGet32 (PcdOvmfDxeMemFvSize)); 54 55 SecureS3Needed = mS3Supported && FeaturePcdGet (PcdSmmSmramRequire); 56 57 // 58 // Create a memory allocation HOB for the DXE FV. 59 // 60 // If "secure" S3 is needed, then SEC will decompress both PEI and DXE 61 // firmware volumes at S3 resume too, hence we need to keep away the OS from 62 // DXEFV as well. Otherwise we only need to keep away DXE itself from the 63 // DXEFV area. 64 // 65 BuildMemoryAllocationHob ( 66 PhysOvmfDxeMemFvBaseRelocated, 67 PcdGet32 (PcdOvmfDxeMemFvSize), 68 SecureS3Needed ? EfiACPIMemoryNVS : EfiBootServicesData 69 ); 70 71 // 72 // Let PEI know about the DXE FV so it can find the DXE Core 73 // 74 PeiServicesInstallFvInfoPpi ( 75 NULL, 76 (VOID *)(UINTN)OvmfDxeMemFvBaseRelocated, 77 PcdGet32 (PcdOvmfDxeMemFvSize), 78 NULL, 79 NULL 80 ); 81 #else 32 82 33 83 // … … 89 139 NULL 90 140 ); 141 #endif 91 142 92 143 return EFI_SUCCESS; -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei/MemDetect.c
r80934 r82249 882 882 883 883 if (mBootMode != BOOT_ON_S3_RESUME) { 884 #ifndef VBOX 885 /* 886 * This is currently no required and interferes with older OS X bootloaders trying to 887 * allocate memory in that area. Needs to be revisited once we need this. 888 */ 884 889 if (!FeaturePcdGet (PcdSmmSmramRequire)) { 885 890 // … … 903 908 ); 904 909 } 910 #endif 905 911 906 912 if (FeaturePcdGet (PcdSmmSmramRequire)) {
Note:
See TracChangeset
for help on using the changeset viewer.