Changeset 77729 in vbox for trunk/src/VBox
- Timestamp:
- Mar 15, 2019 4:38:24 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c
r77662 r77729 49 49 switch (HostBridgeDevId) { 50 50 case INTEL_82441_DEVICE_ID: 51 #ifdef VBOX 52 // HACK ALERT! There is no host bridge device in the PCIe chipset, and the same PIIX4 PM device is used. 53 case 0xffff: 54 #endif 51 55 Pmba = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); 52 56 PmbaAndVal = ~(UINT32)PIIX4_PMBA_MASK; -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c
r77662 r77729 47 47 switch (HostBridgeDevId) { 48 48 case INTEL_82441_DEVICE_ID: 49 #ifdef VBOX 50 // HACK ALERT! There is no host bridge device in the PCIe chipset, and the same PIIX4 PM device is used. 51 case 0xffff: 52 #endif 49 53 Pmba = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); 50 54 PmbaAndVal = ~(UINT32)PIIX4_PMBA_MASK; -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c
r77662 r77729 51 51 HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId); 52 52 switch (HostBridgeDevId) { 53 #ifdef VBOX 54 // HACK ALERT! In the PCIe chipset, the same PIIX4 PM device is used. 55 case INTEL_Q35_MCH_DEVICE_ID: 56 #endif 53 57 case INTEL_82441_DEVICE_ID: 54 58 Pmba = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); 55 59 break; 60 #ifndef VBOX 56 61 case INTEL_Q35_MCH_DEVICE_ID: 57 62 Pmba = POWER_MGMT_REGISTER_Q35 (ICH9_PMBASE); 58 63 break; 64 #endif 59 65 default: 60 66 DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/OvmfPkgIa32.dsc
r77678 r77729 526 526 !endif 527 527 528 !ifndef $(VBOX) 528 529 # This PCD is used to set the base address of the PCI express hierarchy. It 529 530 # is only consulted when OVMF runs on Q35. In that case it is programmed into … … 533 534 # never lets the RAM below 4 GB exceed 2 GB. 534 535 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 536 !endif 535 537 536 538 !ifdef $(SOURCE_DEBUG_ENABLE) … … 613 615 614 616 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 617 618 !ifdef $(VBOX) 619 # This PCD is used to set the base address of the PCI express hierarchy. It 620 # is only consulted when OVMF runs on Q35. In that case it is programmed into 621 # the PCIEXBAR register. 622 # 623 # On Q35 machine types that QEMU intends to support in the long term, QEMU 624 # never lets the RAM below 4 GB exceed 2 GB. 625 # 626 # On VirtualBox it is dynamic. 627 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 628 !endif 615 629 616 630 ################################################################################ -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/OvmfPkgX64.dsc
r77678 r77729 44 44 DEFINE SMM_REQUIRE = FALSE 45 45 DEFINE TLS_ENABLE = FALSE 46 47 DEFINE SOURCE_DEBUG_ENABLE = TRUE 46 48 47 49 # … … 104 106 MSFT:*_*_*_CC_FLAGS = -DVBOX -DIPRT_NO_CRT -DRT_OS_UEFI -DARCH_BITS=64 -DHC_ARCH_BITS=64 -DVBOX_REV=$(VBOX_REV) 105 107 INTEL:*_*_*_CC_FLAGS = -DVBOX -DIPRT_NO_CRT -DRT_OS_UEFI -DARCH_BITS=64 -DHC_ARCH_BITS=64 -DVBOX_REV=$(VBOX_REV) 108 109 !ifdef $(SOURCE_DEBUG_ENABLE) 110 # Get much better source-level debugging 111 MSFT:DEBUG_*_*_CC_FLAGS = /Od 112 !endif 113 106 114 !endif 107 115 … … 134 142 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 135 143 !else 144 !ifdef $(SOURCE_DEBUG_ENABLE) 145 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 146 !else 136 147 PeCoffLib|VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf 148 !endif 137 149 !endif 138 150 CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf … … 182 194 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf 183 195 196 !ifdef $(SOURCE_DEBUG_ENABLE) 197 PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf 198 DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf 199 !else 184 200 !ifdef $(VBOX) 185 201 PeCoffExtraActionLib|VBoxPkg/Library/VBoxPeCoffExtraActionLib/VBoxPeCoffExtraActionLib.inf 186 202 DebugAgentLib|VBoxPkg/Library/VBoxDebugAgentLib/VBoxDebugAgentLib.inf 187 !else188 !ifdef $(SOURCE_DEBUG_ENABLE)189 PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf190 DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf191 203 !else 192 204 PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf … … 247 259 !endif 248 260 !else 261 !ifdef $(SOURCE_DEBUG_ENABLE) 262 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 263 !else 249 264 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 265 !endif 250 266 !endif 251 267 ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf 252 268 ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf 253 !ifdef $(VBOX)254 269 !ifdef $(SOURCE_DEBUG_ENABLE) 255 270 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf 256 !endif257 271 !endif 258 272 HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf … … 279 293 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 280 294 !else 295 !ifdef $(SOURCE_DEBUG_ENABLE) 296 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 297 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 298 !else 281 299 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 282 300 PeCoffLib|VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf 301 !endif 283 302 !endif 284 303 … … 297 316 !else 298 317 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 299 !endif PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 318 !endif 319 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 320 !else 321 !ifdef $(SOURCE_DEBUG_ENABLE) 322 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 323 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf 300 324 !else 301 325 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 302 326 PeCoffLib|VBoxPkg/Library/VBoxPeCoffLib/VBoxPeCoffLib.inf 327 !endif 303 328 !endif 304 329 PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf … … 325 350 !endif 326 351 !else 352 !ifdef $(SOURCE_DEBUG_ENABLE) 353 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 354 !else 327 355 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 356 !endif 328 357 !endif 329 358 ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf … … 348 377 !endif 349 378 !else 379 !ifdef $(SOURCE_DEBUG_ENABLE) 380 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 381 !else 350 382 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 383 !endif 351 384 !endif 352 385 UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf … … 369 402 !endif 370 403 !else 404 !ifdef $(SOURCE_DEBUG_ENABLE) 405 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 406 !else 371 407 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 408 !endif 372 409 !endif 373 410 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf … … 388 425 !endif 389 426 !else 427 !ifdef $(SOURCE_DEBUG_ENABLE) 428 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 429 !else 390 430 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 431 !endif 391 432 !endif 392 433 NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf … … 422 463 !endif 423 464 !else 465 !ifdef $(SOURCE_DEBUG_ENABLE) 466 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf 467 !else 424 468 DebugLib|VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.inf 469 !endif 425 470 !endif 426 471 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf … … 530 575 !endif 531 576 577 !ifndef $(VBOX) 532 578 # This PCD is used to set the base address of the PCI express hierarchy. It 533 579 # is only consulted when OVMF runs on Q35. In that case it is programmed into … … 537 583 # never lets the RAM below 4 GB exceed 2 GB. 538 584 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 585 !endif 539 586 540 587 !ifdef $(SOURCE_DEBUG_ENABLE) … … 619 666 620 667 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 668 669 !ifdef $(VBOX) 670 # This PCD is used to set the base address of the PCI express hierarchy. It 671 # is only consulted when OVMF runs on Q35. In that case it is programmed into 672 # the PCIEXBAR register. 673 # 674 # On VirtualBox it is dynamic. 675 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x80000000 676 !endif 621 677 622 678 ################################################################################ -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/Platform.c
r77669 r77729 271 271 // the base of the 32-bit PCI host aperture. 272 272 // 273 PciExBarBase = FixedPcdGet64 (PcdPciExpressBaseAddress);273 PciExBarBase = PcdGet64 (PcdPciExpressBaseAddress); 274 274 ASSERT (TopOfLowRam <= PciExBarBase); 275 275 ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB); … … 309 309 AddIoMemoryRangeHob (TopOfLowRam, McfgBase); 310 310 AddIoMemoryRangeHob (McfgBase + McfgSize, 0xFC000000); 311 PcdSet64S (PcdPciExpressBaseAddress, McfgBase); 311 312 #else 312 313 AddIoMemoryRangeHob (TopOfLowRam < BASE_2GB ? … … 470 471 // for DXE's page tables to cover the MMCONFIG area. 471 472 // 472 PciExBarBase.Uint64 = FixedPcdGet64 (PcdPciExpressBaseAddress);473 PciExBarBase.Uint64 = PcdGet64 (PcdPciExpressBaseAddress); 473 474 ASSERT ((PciExBarBase.Uint32[1] & MCH_PCIEXBAR_HIGHMASK) == 0); 474 475 ASSERT ((PciExBarBase.Uint32[0] & MCH_PCIEXBAR_LOWMASK) == 0); … … 755 756 // 756 757 mHostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID); 758 #ifdef VBOX 759 // HACK ALERT! There is no host bridge device in the PCIe chipset, but we pretend it's a 3 Series chip. 760 if (mHostBridgeDevId == 0xffff) 761 mHostBridgeDevId = INTEL_Q35_MCH_DEVICE_ID; 762 #endif 757 763 758 764 if (FeaturePcdGet (PcdSmmSmramRequire)) { -
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/PlatformPei.inf
r77662 r77729 89 89 gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes 90 90 gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress 91 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress 91 92 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize 92 93 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize … … 105 106 gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize 106 107 107 [FixedPcd]108 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress108 #[FixedPcd] 109 # gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress 109 110 110 111 [FeaturePcd]
Note:
See TracChangeset
for help on using the changeset viewer.