[edk2-devel] [RFC] RISC-V QEMU virtual package

Abner Chang abner.chang at hpe.com
Wed Sep 8 12:31:07 UTC 2021



> -----Original Message-----
> From: Leif Lindholm [mailto:leif at nuviainc.com]
> Sent: Wednesday, September 8, 2021 1:22 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang at hpe.com>
> Cc: Yao, Jiewen <jiewen.yao at intel.com>; devel at edk2.groups.io; gaoliming
> <gaoliming at byosoft.com.cn>; 'Ard Biesheuvel' <ard.biesheuvel at arm.com>;
> Kinney, Michael D <michael.d.kinney at intel.com>; Ni, Ray
> <ray.ni at intel.com>; Schaefer, Daniel <daniel.schaefer at hpe.com>; 'Sunil V L'
> <sunilvl at ventanamicro.com>; 'Ard Biesheuvel'
> <ardb+tianocore at kernel.org>; 'Gerd Hoffmann' <kraxel at redhat.com>
> Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package
> 
> Hi Abner,
> 
> Happy to see this happening.
> 
> I think the capitalisation should be
> RiscVVirtPkg rather than
> RiscvVirtPkg though.
NP.
> 
> More comments below.
> 
> On Mon, Sep 06, 2021 at 11:08:47 +0000, Chang, Abner (HPS SW/FW
> Technologist) wrote:
> > We currently only use below modules from ArmVirtPkg,
> >
> > - ArmVirtPkg/Library
> >   o   FdtPciPcdProducerLib
> >   o   FdtPciHostBridgeLib
> >
> > - ArmVirtPkg/
> >   o   VirtioFdtDxe
> >   o   FdtClientDxe
> >   o   HighMemDxe
> >
> > Above modules are related to the extraction of the platform
> > configuration from FDT. We also use ArmPkg/DriverArmPciCpuIoDxe,  we
> > can have RISC-V instance of CpuIoDxe but still leverage PCD produced
> > by FdtPciPcdProducerLib.
> >
> > Another library is QemuFwCfgLib from ArmVirtPkg/Library, I think we
> > can have RISC-V own instance because there is a one instance under
> > OvmfPkg already.
> 
> Are you expecting to need different functionality from the ArmVirtPkg
> one? If not, you could move that one to
>   OvmfPkg/Library/QemuFwCfgCommonLib
> or something.
The interfaces provided by ARM QemuFwLib seems works fine with RISC-V OVMF, however the build fail with the recent change of adding "#if defined(MDE_CPU_AARCH64)". 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.

> 
> Note that there are also a couple of platforms in edk2-platforms that
> reference ArmVirtPkg code. Those would need to be fixed up as well, if
> anything they depend on moves.
Thanks for this  information.
Abner
> 
> Agree with comments others made regarding use of git mv of single
> module at a time.
> 
> I wouldn't mind being a reviewer for the FDT-related common modules.
Nice :)
Abner
> 
> Regards,
> 
> Leif
> 
> > 发件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> 代表 Abner Chang
> > 发送时间: 2021年9月5日 11:15
> > 收件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
> > 抄送: Ard Biesheuvel
> <ard.biesheuvel at arm.com<mailto:ard.biesheuvel at arm.com>>; Michael D
> Kinney <michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>>;
> Leif Lindholm <leif at nuviainc.com<mailto:leif at nuviainc.com>>;
> ray.ni at intel.com<mailto:ray.ni at intel.com>; Liming Gao
> <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>; Schaefer,
> Daniel <daniel.schaefer at hpe.com<mailto:daniel.schaefer at hpe.com>>;
> Sunil V L <sunilvl at ventanamicro.com<mailto:sunilvl at ventanamicro.com>>
> > 主题: [edk2-devel] [RFC] RISC-V QEMU virtual package
> >
> > Hi all,
> > We currently have RISC-V edk2 OVMF package that can boot to Linux
> kernel on QEMU RISC-V virt platform.
> > First at all, we would like to create a folder RiscvVirtPkg under edk2 repo
> and integrated in the Platform CI build.
> >
> > Second, RISC-V edk2 OVMF package leverages some edk2 libraries and
> drivers from ArmVirtPkg, such as FDT related modules for PCI bus, host
> bridge and etc. We would like to move those generic virtual drivers to
> > a common folder for ARM and RISC-V (I don’t think this way is necessary
> though). Or can we move those to just under OvmfPkg because OvmfPkg
> also provides some common drivers for the processor architectures.
> > Thoughts?
> >
> > Thanks
> > Abner
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80351): https://edk2.groups.io/g/devel/message/80351
Mute This Topic: https://groups.io/mt/85405739/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list