Hi Andrei,
Yes, the RISCV version is same as the ArmPkg
version. The ArmPkg version is almost similar to UefiCpuPkg
version, excapt that UefiCpuPkg version doesn't have MMIO
methods on CpuIoServiceRead and CpuIoServiceWrite, the MMIO
methods have been added in the patch 20, please check.
So are you saying the UefiCpuPkg version of CpuIo2 is equivalent in function to the OvmfPkg one?-----Original Message----- From: Chao Li <lichao@loongson.cn> Sent: Friday, November 17, 2023 4:02 AM To: devel@edk2.groups.io Cc: Sunil V L <sunilvl@ventanamicro.com>; Warkentin, Andrei <andrei.warkentin@intel.com> Subject: [PATCH v3 23/39] OvmfPkg/RiscVVirt: Enable UefiCpuPkg version CpuIo2Dxe Since the UefiCpuPkg/CpuIo2Dxe already supports MMIO, it is enabled at this thime. Build-tested only (with "RiscVVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> --- OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 4 +++- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc index 34b2037824..499902e445 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc @@ -143,6 +143,8 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE + gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslationIsEnabled|TRUE + [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 @@ -445,7 +447,7 @@ # # PCI support # - OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf { + UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf { <LibraryClasses> NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf } diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf index 40d12e0f4c..dd138957a0 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf @@ -184,7 +184,7 @@ INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf # # PCI support # -INF OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf +INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf -- 2.27.0