On Sat, Mar 16, 2024 at 10:17:00AM +0800, lixianglai wrote: > Hi Gerd: > > On Mon, Mar 11, 2024 at 02:39:31AM -0700, Chao Li wrote: > >> This library for PEI phase, and obtains the QemuFwCfg base address by > >> directly parsing the FDT, reads and writes the data in QemuFwCfg by > >> operating on the QemuFwCfg base address. > >> create mode 100644 > >> OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.c > >> create mode 100644 > >> OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.inf > >> create mode 100644 > >> OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfgLibInternal.h > >> create mode 100644 > >> OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfgPei.c > > Is there anything LoongArch-specific in there? > No,The main function of this lib library is to obtain the fwcfg base address > by parsing fdt in the pei stage, > and provide access to fwcfg through mmio mode, > the difference between it and the existing library is that the fwcfg base > address is not hard-coded in the compilation stage, > and is accessed through mmio rather than io port.
That would be the case for risc-v and aarch64 too, although I think they don't need fw_cfg right now (they get all info needed via fdt). I think we should add this as OvmfPkg/Library/FdtQemuFwCfgLib. > Another point that needs to be explained is that because loongarch virtual > machine runs on flash in pei phase, > it cannot assign the pcd global variable, so we use Hob as the global > variable to store the fwcfg base address. I think the dynamic PCD database is stored in a HOB and you should be able to set PCDs them even when running from (read-only) flash. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116843): https://edk2.groups.io/g/devel/message/116843 Mute This Topic: https://groups.io/mt/104859897/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-