Hi Ard,

Could you take a look at this patch set and give you some suggestions?


Thanks,
Chao
On 2024/4/17 18:01, Chao Li wrote:

Hi Gerd,

On 2024/4/17 17:35, Gerd Hoffmann wrote:
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.
Yes. :)
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?
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. :)
  OvmfPkg: Add three PCDs for QemuFwCfgLib
  OvmfPkg: Separate QemuFwCfgLibMmio.c into two files
This 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).
OK, I will split it in V2.
Otherwise this looks good to me (and I'd suggest to keep and merge this
as separate patch series).
Sure!
take care,
  Gerd





_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#118079) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_