Hi Ard,
Could you take a look at this patch set and give
you some suggestions?
Hi Gerd,
On 2024/4/17 17:35, Gerd Hoffmann wrote:
Yes. :)On Wed, Apr 17, 2024 at 04:12:56PM +0800, Chao Li wrote:Patch1: Added three PCDs for QemuFwCfgLibMmio Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE stage library. Patch3: Added QemuFwCfgMmiLib PEI version Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf and enable it in AARCH64 and RISCV64.Ok, I see, you are using the PCDs because global variables don't work in PEI.
I think HOB might be heavy, and the dynamically PCD is also uses the HOB, so this I think this way is more simpler. I'm also looking forward Ard's suggestions. :)Alternative approach would be to create a HOB for that (see EFI_HOB_PLATFORM_INFO used by X64). Not sure this is a good idea though given that we have three different architectures using that code. Ard, any advise?
OK, I will split it in V2.OvmfPkg: Add three PCDs for QemuFwCfgLib OvmfPkg: Separate QemuFwCfgLibMmio.c into two filesThis patch should be splitted into two, one doing the code split without functional change, and one which switches from global variables to PCDs (or HOB).
Sure!Otherwise this looks good to me (and I'd suggest to keep and merge this as separate patch series).
take care, Gerd