Hi Ard,
So what do you suggest? Write some new functions to handle the MMIO method under the CpuIo2Dxe?On Thu, 21 Dec 2023 at 04:48, Chao Li <lichao@loongson.cn> wrote:...Ard, PcdPciIoTranslationIsEnabled is only use for whether to trigger the Ffio read or write, it seem that only x86 or x64 need them, not others. When I was submitted the patch V2, CpuIo2Dxe was private to LoongArch, just like Arm and RISC-V. Gerd recommended finding a better place for ArmPciCpuIo2Dxe so that other ARCH can easily use it. And then I found the UefiCpuPkg/CpuIo2Dxe might be able to accommodate the MMIO methods, so I merged them togeter in this change.I think it makes sense to have a shared implementation under UefiCpuPkg or even MdeModulePkg. But merging it with the x86 implementation using function pointers that are dereferenced at runtime seems unnecessary to me.
Let's wait for Ray together. :)My preference would be to put this into MdeModulePkg, but Ray may have a different view.