On Wed, Sep 08, 2021 at 15:33:34 +0000, Abner Chang wrote:
> > > I prefer to have RISC-V instance because I
> > > am not sure if any fw_cfg interface changes would be made on RISC-V
> > > QEMU.
> > 
> > The fw_cfg interface should not diverge.  ia32/x64 works a bit different
> > because there is a separate io address space on that architecture and
> > fw_cfg uses that for historical reasons.  All platforms using the mmio
> > variant of the fw_cfg interface should work alike though.
>
> Hmm, ok. 
> We can have the common one for both ARM and RISC-V if there is no
> potential issues in the future as you mentioned. We can also add
> #defined (MDE_CPU_RISCV64) to avoid the build error as ARM and
> RISC-V share the same code.

Well, if it's a single file, we can easily make sure it doesn't break.
And we help improving the code quality. It's very easy for code that
gets shoved into architecture-specific subtrees to start growing
architecture-specific statements that don't actually describe anything
architecture-specific - because that sets the stage for how the code
is interpreted.

> One more question, there is already a QemuFwCfgLib library for
> ia32/x64. The naming of QemuFwCfgCommonLib under Library seems
> confusing. How about we  put this library under /FDT and also name
> it as QemuFwCfgLib? Because ARM/RISC-V fw_cfg also depends on FDT.

I mean, I would more prefer to rename the x86 one, since that one
becomes the special case. Dependency isn't what should dictate
hierarchy. The FwCfg interface is about a lot more than FDT.

/
    Leif



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80369): https://edk2.groups.io/g/devel/message/80369
Mute This Topic: https://groups.io/mt/85405739/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to