]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/Microvm/pcie: add pcie support
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 2 Jun 2022 08:42:16 +0000 (10:42 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 3 Jun 2022 09:06:44 +0000 (09:06 +0000)
Link in pcie and host bridge bits.  Enables support for PCIe in microvm
(qemu-system-x86_64 -M microvm,pcie=on).

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3777
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OvmfPkg/Microvm/MicrovmX64.dsc
OvmfPkg/Microvm/README

index f8fc977cb205eab311f242425ca9dc39d84a906f..5b150a959c12140a96672b49a995fcfcf90392a9 100644 (file)
 !endif\r
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+#  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+#  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+#  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf\r
   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf\r
 \r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
 !if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf\r
 !endif\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
   MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf\r
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf\r
   QemuLoadImageLib|OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.inf\r
 !else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
 \r
 [LibraryClasses.common.DXE_SMM_DRIVER]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf\r
 !endif\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
 \r
 [LibraryClasses.common.SMM_CORE]\r
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
 !else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
+  PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf\r
 \r
 ################################################################################\r
 #\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F\r
 !endif\r
 \r
-  # This PCD is used to set the base address of the PCI express hierarchy. It\r
-  # is only consulted when OVMF runs on Q35. In that case it is programmed into\r
-  # the PCIEXBAR register.\r
-  #\r
-  # On Q35 machine types that QEMU intends to support in the long term, QEMU\r
-  # never lets the RAM below 4 GB exceed 2816 MB.\r
-  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000\r
-\r
 !if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2\r
 !endif\r
   gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000\r
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0\r
 \r
+  # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this\r
+  # PCD and PcdPciDisableBusEnumeration below have not been assigned yet\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF\r
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE\r
+\r
   # Set video resolution for text setup.\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480\r
   OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf\r
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {\r
     <LibraryClasses>\r
-      PciHostBridgeLib|MdeModulePkg/Library/PciHostBridgeLibNull/PciHostBridgeLibNull.inf\r
+      PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf\r
       PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf\r
       NULL|OvmfPkg/Library/PlatformHasIoMmuLib/PlatformHasIoMmuLib.inf\r
   }\r
index 540d39f2ec21b8195557916b27ba4d2941fdda6e..813920d92a60c6b73b5bd81f3425a11ac88857e9 100644 (file)
@@ -29,7 +29,7 @@ features
  [working] serial console\r
  [working] direct kernel boot\r
  [working] virtio-mmio support\r
- [in progress] pcie support\r
+ [working] pcie support\r
 \r
 known limitations\r
 -----------------\r