Changeset 58173 in vbox
- Timestamp:
- Oct 12, 2015 10:47:27 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/Config.kmk
r56292 r58173 180 180 VBoxPkg/AcpiPlatformDxe/AcpiPlatformDxe/$(VBOX_EFI_DEBUG_DIR)/AcpiPlatform \ 181 181 VBoxPkg/PartitionDxe/PartitionDxe/$(VBOX_EFI_DEBUG_DIR)/PartitionDxe \ 182 VBoxPkg/PlatformPei/PlatformPei/$(VBOX_EFI_DEBUG_DIR)/PlatformPei \182 OvmfPkg/PlatformPei/PlatformPei/$(VBOX_EFI_DEBUG_DIR)/PlatformPei \ 183 183 VBoxPkg/VBoxAppleSim/VBoxAppleSim/$(VBOX_EFI_DEBUG_DIR)/VBoxAppleSim \ 184 184 VBoxPkg/VBoxFsDxe/VBoxHfs/$(VBOX_EFI_DEBUG_DIR)/VBoxHfs \ -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.dsc
r58172 r58173 347 347 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 348 348 349 !ifndef $(VBOX)350 349 OvmfPkg/PlatformPei/PlatformPei.inf { 351 350 <LibraryClasses> 352 351 PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf 353 352 } 354 !else355 VBoxPkg/PlatformPei/PlatformPei.inf {356 <LibraryClasses>357 PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf358 }359 !endif360 353 361 354 # -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgIa32.fdf
r48674 r58173 112 112 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf 113 113 INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf 114 !ifndef $(VBOX)115 114 INF OvmfPkg/PlatformPei/PlatformPei.inf 116 !else117 INF VBoxPkg/PlatformPei/PlatformPei.inf118 !endif119 115 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 120 116 -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.dsc
r58172 r58173 347 347 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 348 348 349 !ifndef $(VBOX)350 349 OvmfPkg/PlatformPei/PlatformPei.inf { 351 350 <LibraryClasses> 352 351 PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf 353 352 } 354 !else355 VBoxPkg/PlatformPei/PlatformPei.inf {356 <LibraryClasses>357 PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf358 }359 !endif360 353 361 354 # -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgX64.fdf
r48674 r58173 110 110 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf 111 111 INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf 112 !ifndef $(VBOX)113 112 INF OvmfPkg/PlatformPei/PlatformPei.inf 114 !else115 INF VBoxPkg/PlatformPei/PlatformPei.inf116 !endif117 113 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 118 114 -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei/MemDetect.c
r48674 r58173 118 118 MemorySize = SIZE_64MB; 119 119 } 120 #ifdef VBOX 121 MemorySize -= BASE_64KB; /* Reserves 64KB for ACPI tables. */ 122 #endif 120 123 121 124 // … … 130 133 AddMemoryBaseSizeHob (MemoryBase, MemorySize); 131 134 AddMemoryRangeHob (BASE_1MB, MemoryBase); 135 #ifndef VBOX 132 136 AddMemoryRangeHob (0, BASE_512KB + BASE_128KB); 137 #endif 133 138 134 139 MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack); 135 140 141 #ifdef VBOX 142 AddMemoryRangeHob (0, BASE_512KB + BASE_128KB); 143 #endif 136 144 MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack); 137 145 -
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/PlatformPei/Platform.c
r48674 r58173 93 93 } 94 94 95 #ifdef VBOX 96 VOID 97 AddRomMemoryBaseSizeHob ( 98 EFI_PHYSICAL_ADDRESS MemoryBase, 99 UINT64 MemorySize 100 ) 101 { 102 STATIC EFI_RESOURCE_ATTRIBUTE_TYPE Attributes = 103 ( 104 EFI_RESOURCE_ATTRIBUTE_PRESENT | 105 EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED | 106 EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE | 107 EFI_RESOURCE_ATTRIBUTE_INITIALIZED | 108 EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 109 ); 110 111 BuildResourceDescriptorHob ( 112 EFI_RESOURCE_FIRMWARE_DEVICE, 113 Attributes, 114 MemoryBase, 115 MemorySize 116 ); 117 118 DEBUG ((DEBUG_INFO, "ROM HOB: at 0x%llx size 0x%llx\n", MemoryBase, MemorySize)); 119 } 120 121 static VOID * 122 FindAcpiRsdPtr ( 123 VOID 124 ) 125 { 126 #define ACPI_RSD_PTR SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ') 127 UINTN Address; 128 129 // 130 // First Search 0x0e0000 - 0x0fffff for RSD Ptr 131 // 132 for (Address = 0xe0000; Address < 0xfffff; Address += 0x10) { 133 if (*(UINT64 *)(Address) == ACPI_RSD_PTR) { 134 return (VOID *)Address; 135 } 136 } 137 return NULL; 138 } 139 #undef ACPI_RSD_PTR 140 #endif 141 95 142 VOID 96 143 AddIoMemoryRangeHob ( … … 169 216 ) 170 217 { 218 #ifdef VBOX 219 EFI_PHYSICAL_ADDRESS RsdPtr; 220 EFI_PHYSICAL_ADDRESS AcpiTables; 221 #endif 171 222 // 172 223 // Create Memory Type Information HOB … … 210 261 // 211 262 // Video memory + Legacy BIOS region 263 #ifdef VBOX 264 // This includes ACPI floating pointer region. 265 #endif 212 266 // 213 267 AddIoMemoryRangeHob (0x0A0000, BASE_1MB); 268 269 #ifdef VBOX 270 // 271 // Add ACPI memory, provided by VBox 272 // 273 RsdPtr = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr(); 274 ASSERT(RsdPtr != 0); 275 AcpiTables = (EFI_PHYSICAL_ADDRESS)*(UINT32*)((UINTN)RsdPtr + 16) & ~0xfff; 276 ASSERT(AcpiTables != 0); 277 278 // ACPI tables 64 K 279 AddRomMemoryBaseSizeHob(AcpiTables, 0x10000); 280 #endif 214 281 } 215 282 … … 326 393 TopOfMemory = MemDetect (); 327 394 395 #ifndef VBOX 328 396 Status = InitializeXen (); 329 397 Xen = EFI_ERROR (Status) ? FALSE : TRUE; 398 #else 399 Xen = FALSE; 400 #endif 330 401 331 402 ReserveEmuVariableNvStore ();
Note:
See TracChangeset
for help on using the changeset viewer.