[RFC] RISC-V QEMU virtual package


Abner Chang
 

Thanks Liming. To have those modules under OvmfPkg also makes sense to me. See how others think of this.

 

Abner

 

From: gaoliming [mailto:gaoliming@...]
Sent: Monday, September 6, 2021 9:07 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; 'Michael D Kinney' <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; ray.ni@...; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; jiewen.yao@...; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: 回复: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Abner:

 If these modules are shared by ARM and RISC-V, they should not be ARM specific modules. I prefer to move them into OvmfPkg. Now, ArmVirtPkg also includes the modules from OvmfPkg.

 

 I also include OVMF package maintainers for this discussion.

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 202195 11:15
收件人: devel@edk2.groups.io
抄送: Ard Biesheuvel <ard.biesheuvel@...>; Michael D Kinney <michael.d.kinney@...>; Leif Lindholm <leif@...>; ray.ni@...; Liming Gao <gaoliming@...>; Schaefer, Daniel <daniel.schaefer@...>; Sunil V L <sunilvl@...>
主题: [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


Yao, Jiewen
 

Do you have a list of which module you want to move to Ovmf?

 

I think we can discuss case by case.

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
Sent: Monday, September 6, 2021 12:16 PM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; Yao, Jiewen <jiewen.yao@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Thanks Liming. To have those modules under OvmfPkg also makes sense to me. See how others think of this.

 

Abner

 

From: gaoliming [mailto:gaoliming@...]
Sent: Monday, September 6, 2021 9:07 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; 'Michael D Kinney' <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; ray.ni@...; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; jiewen.yao@...; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: 回复: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Abner:

 If these modules are shared by ARM and RISC-V, they should not be ARM specific modules. I prefer to move them into OvmfPkg. Now, ArmVirtPkg also includes the modules from OvmfPkg.

 

 I also include OVMF package maintainers for this discussion.

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 202195 11:15
收件人: devel@edk2.groups.io
抄送: Ard Biesheuvel <ard.biesheuvel@...>; Michael D Kinney <michael.d.kinney@...>; Leif Lindholm <leif@...>; ray.ni@...; Liming Gao <gaoliming@...>; Schaefer, Daniel <daniel.schaefer@...>; Sunil V L <sunilvl@...>
主题: [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


Abner Chang
 

Hi Jiewen,

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.

 

Thanks

Abner

 

 

From: Yao, Jiewen [mailto:jiewen.yao@...]
Sent: Monday, September 6, 2021 2:16 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; gaoliming <gaoliming@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Do you have a list of which module you want to move to Ovmf?

 

I think we can discuss case by case.

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
Sent: Monday, September 6, 2021 12:16 PM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; Yao, Jiewen <jiewen.yao@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Thanks Liming. To have those modules under OvmfPkg also makes sense to me. See how others think of this.

 

Abner

 

From: gaoliming [mailto:gaoliming@...]
Sent: Monday, September 6, 2021 9:07 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; 'Michael D Kinney' <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; ray.ni@...; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; jiewen.yao@...; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: 回复: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Abner:

 If these modules are shared by ARM and RISC-V, they should not be ARM specific modules. I prefer to move them into OvmfPkg. Now, ArmVirtPkg also includes the modules from OvmfPkg.

 

 I also include OVMF package maintainers for this discussion.

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 202195 11:15
收件人: devel@edk2.groups.io
抄送: Ard Biesheuvel <ard.biesheuvel@...>; Michael D Kinney <michael.d.kinney@...>; Leif Lindholm <leif@...>; ray.ni@...; Liming Gao <gaoliming@...>; Schaefer, Daniel <daniel.schaefer@...>; Sunil V L <sunilvl@...>
主题: [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


Yao, Jiewen
 

I think it makes sense to put Fdt to OvmfPkg. I suggest an Fdt folder and put all things there.

 

I also think we define Fdt feature in https://github.com/tianocore/edk2/blob/master/Maintainers.txt to add reviewer there to help review the code.

 

Thank you

Yao Jiewen

 

 

From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Sent: Monday, September 6, 2021 7:09 PM
To: Yao, Jiewen <jiewen.yao@...>; devel@edk2.groups.io; gaoliming <gaoliming@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Hi Jiewen,

We currently only use below modules from ArmVirtPkg,

  • ArmVirtPkg/Library
    • FdtPciPcdProducerLib
    • FdtPciHostBridgeLib
  • ArmVirtPkg/
    • VirtioFdtDxe
    • FdtClientDxe
    • 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.

 

Thanks

Abner

 

 

From: Yao, Jiewen [mailto:jiewen.yao@...]
Sent: Monday, September 6, 2021 2:16 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; gaoliming <gaoliming@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Do you have a list of which module you want to move to Ovmf?

 

I think we can discuss case by case.

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
Sent: Monday, September 6, 2021 12:16 PM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; Kinney, Michael D <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; Ni, Ray <ray.ni@...>; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; Yao, Jiewen <jiewen.yao@...>; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Thanks Liming. To have those modules under OvmfPkg also makes sense to me. See how others think of this.

 

Abner

 

From: gaoliming [mailto:gaoliming@...]
Sent: Monday, September 6, 2021 9:07 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@...>; 'Michael D Kinney' <michael.d.kinney@...>; 'Leif Lindholm' <leif@...>; ray.ni@...; Schaefer, Daniel <daniel.schaefer@...>; 'Sunil V L' <sunilvl@...>; jiewen.yao@...; 'Ard Biesheuvel' <ardb+tianocore@...>; 'Gerd Hoffmann' <kraxel@...>
Subject: 回复: [edk2-devel] [RFC] RISC-V QEMU virtual package

 

Abner:

 If these modules are shared by ARM and RISC-V, they should not be ARM specific modules. I prefer to move them into OvmfPkg. Now, ArmVirtPkg also includes the modules from OvmfPkg.

 

 I also include OVMF package maintainers for this discussion.

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 202195 11:15
收件人: devel@edk2.groups.io
抄送: Ard Biesheuvel <ard.biesheuvel@...>; Michael D Kinney <michael.d.kinney@...>; Leif Lindholm <leif@...>; ray.ni@...; Liming Gao <gaoliming@...>; Schaefer, Daniel <daniel.schaefer@...>; Sunil V L <sunilvl@...>
主题: [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


Ard Biesheuvel
 

On Mon, 6 Sept 2021 at 13:44, Yao, Jiewen <jiewen.yao@intel.com> wrote:

I think it makes sense to put Fdt to OvmfPkg. I suggest an Fdt folder and put all things there.



I also think we define Fdt feature in https://github.com/tianocore/edk2/blob/master/Maintainers.txt to add reviewer there to help review the code.

Agreed.






From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Sent: Monday, September 6, 2021 7:09 PM
To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D <michael.d.kinney@intel.com>; 'Leif Lindholm' <leif@nuviainc.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Gerd Hoffmann' <kraxel@redhat.com>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package



Hi Jiewen,

We currently only use below modules from ArmVirtPkg,

ArmVirtPkg/Library

FdtPciPcdProducerLib
FdtPciHostBridgeLib

ArmVirtPkg/

VirtioFdtDxe
FdtClientDxe
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.



Thanks

Abner





From: Yao, Jiewen [mailto:jiewen.yao@intel.com]
Sent: Monday, September 6, 2021 2:16 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; gaoliming <gaoliming@byosoft.com.cn>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D <michael.d.kinney@intel.com>; 'Leif Lindholm' <leif@nuviainc.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Gerd Hoffmann' <kraxel@redhat.com>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package



Do you have a list of which module you want to move to Ovmf?



I think we can discuss case by case.



From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
Sent: Monday, September 6, 2021 12:16 PM
To: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
Cc: 'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D <michael.d.kinney@intel.com>; 'Leif Lindholm' <leif@nuviainc.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; Yao, Jiewen <jiewen.yao@intel.com>; 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Gerd Hoffmann' <kraxel@redhat.com>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package



Thanks Liming. To have those modules under OvmfPkg also makes sense to me. See how others think of this.



Abner



From: gaoliming [mailto:gaoliming@byosoft.com.cn]
Sent: Monday, September 6, 2021 9:07 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: 'Ard Biesheuvel' <ard.biesheuvel@arm.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>; 'Leif Lindholm' <leif@nuviainc.com>; ray.ni@intel.com; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; jiewen.yao@intel.com; 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Gerd Hoffmann' <kraxel@redhat.com>
Subject: 回复: [edk2-devel] [RFC] RISC-V QEMU virtual package



Abner:

If these modules are shared by ARM and RISC-V, they should not be ARM specific modules. I prefer to move them into OvmfPkg. Now, ArmVirtPkg also includes the modules from OvmfPkg.



I also include OVMF package maintainers for this discussion.



Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 2021年9月5日 11:15
收件人: devel@edk2.groups.io
抄送: Ard Biesheuvel <ard.biesheuvel@arm.com>; Michael D Kinney <michael.d.kinney@intel.com>; Leif Lindholm <leif@nuviainc.com>; ray.ni@intel.com; Liming Gao <gaoliming@byosoft.com.cn>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@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


Gerd Hoffmann
 

Hi,

On Mon, Sep 06, 2021 at 02:04:48PM +0200, Ard Biesheuvel wrote:
On Mon, 6 Sept 2021 at 13:44, Yao, Jiewen <jiewen.yao@intel.com> wrote:

I think it makes sense to put Fdt to OvmfPkg. I suggest an Fdt folder and put all things there.

I also think we define Fdt feature in https://github.com/tianocore/edk2/blob/master/Maintainers.txt to add reviewer there to help review the code.
Agreed.
Agreeing too.

take care,
Gerd


Abner Chang
 

Ok thanks, do we need the two steps to migrate FDT modules under OvmfPkg/?
1. One patch set to clone those modules under OvmfPkg/
2. One patch set of ArmVirtPkg change to use those modules and deletes the ones under ArmVirtPkg/.

Or we just do all at once? I prefer to have two steps. How do you think?

Another question, who would like to be the reviewers of OvmfPkg/Fdt/*? Any volunteers from CC list?

Thanks
Abner

-----Original Message-----
From: Gerd Hoffmann [mailto:kraxel@redhat.com]
Sent: Monday, September 6, 2021 8:19 PM
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Chang, Abner (HPS SW/FW
Technologist) <abner.chang@hpe.com>; devel@edk2.groups.io; gaoliming
<gaoliming@byosoft.com.cn>; Ard Biesheuvel <ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm
<leif@nuviainc.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Ard
Biesheuvel <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

Hi,

On Mon, Sep 06, 2021 at 02:04:48PM +0200, Ard Biesheuvel wrote:
On Mon, 6 Sept 2021 at 13:44, Yao, Jiewen <jiewen.yao@intel.com> wrote:

I think it makes sense to put Fdt to OvmfPkg. I suggest an Fdt folder and
put all things there.

I also think we define Fdt feature in
https://github.com/tianocore/edk2/blob/master/Maintainers.txt to add
reviewer there to help review the code.
Agreed.
Agreeing too.

take care,
Gerd


Gerd Hoffmann
 

On Mon, Sep 06, 2021 at 01:04:56PM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
Ok thanks, do we need the two steps to migrate FDT modules under OvmfPkg/?
1. One patch set to clone those modules under OvmfPkg/
2. One patch set of ArmVirtPkg change to use those modules and deletes the ones under ArmVirtPkg/.
Clearly "git mv" the files to keep git history.

Also update the references in the dsc and fdf files in the same patch
to avoid breaking the build.

I'd suggest to have one patch per module you are moving over.

Another question, who would like to be the reviewers of OvmfPkg/Fdt/*? Any volunteers from CC list?
I'm already R: for all of OvmfPkg ;)

take care,
Gerd


Leif Lindholm
 

Hi Abner,

Happy to see this happening.

I think the capitalisation should be
RiscVVirtPkg rather than
RiscvVirtPkg though.

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.

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.

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.

Regards,

Leif

发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Abner Chang
发送时间: 2021年9月5日 11:15
收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
抄送: Ard Biesheuvel <ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; ray.ni@intel.com<mailto:ray.ni@intel.com>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@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


Abner Chang
 

-----Original Message-----
From: Leif Lindholm [mailto:leif@nuviainc.com]
Sent: Wednesday, September 8, 2021 1:22 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel' <ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Ni, Ray
<ray.ni@intel.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L'
<sunilvl@ventanamicro.com>; 'Ard Biesheuvel'
<ardb+tianocore@kernel.org>; 'Gerd Hoffmann' <kraxel@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@edk2.groups.io<mailto:devel@edk2.groups.io>
<devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Abner Chang
发送时间: 2021年9月5日 11:15
收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
抄送: Ard Biesheuvel
<ard.biesheuvel@arm.com<mailto:ard.biesheuvel@arm.com>>; Michael D
Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>;
Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>;
ray.ni@intel.com<mailto:ray.ni@intel.com>; Liming Gao
<gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Schaefer,
Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>;
Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@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


Gerd Hoffmann
 

Hi,

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)".
How does that fail to build?

The #ifdef looks like a performance optimization, doing 64bit mmio
access on 64bit platforms to reduce the number of traps. Even without
fixing that up for RISCV64 so it gets the same treatment everything
should work fine, just a little slower than it could.

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.

take care,
Gerd


Abner Chang
 

-----Original Message-----
From: 'Gerd Hoffmann' [mailto:kraxel@redhat.com]
Sent: Wednesday, September 8, 2021 9:37 PM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>; Yao, Jiewen <jiewen.yao@intel.com>;
devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; 'Ard
Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

Hi,

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)".
How does that fail to build?
That is the cast from pointer to integer on (UINT32)&Access). The build error could be fixed by adding (UINTN) before casting to UINT32 though.

The #ifdef looks like a performance optimization, doing 64bit mmio
access on 64bit platforms to reduce the number of traps. Even without
fixing that up for RISCV64 so it gets the same treatment everything
should work fine, just a little slower than it could.

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.
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.

Abner



take care,
Gerd


Leif Lindholm
 

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


Gerd Hoffmann
 

Hi,

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.
Move it to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?

take care,
Gerd


Abner Chang
 

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
Gerd Hoffmann
Sent: Thursday, September 9, 2021 1:23 PM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>; Yao, Jiewen <jiewen.yao@intel.com>;
devel@edk2.groups.io; gaoliming <gaoliming@byosoft.com.cn>; 'Ard
Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

Hi,

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.
Move it to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform? Currently RiscVPkg in under edk2-platform and the modules provided by RiscVPkg are referred by RiscVVirPkg.

Abner

take care,
Gerd





Leif Lindholm
 

On Fri, Sep 10, 2021 at 00:08:12 +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
Move it to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform? Currently
RiscVPkg in under edk2-platform and the modules provided by RiscVPkg
are referred by RiscVVirPkg.
Ideally not.

I think this serves as a reminder that RISC-V/ProcessorPkg should move
over to edk2.

/
Leif


Ni, Ray
 

I asked similar question to Mike who initially set up the CI.
The answer was: it's ok to pull a edk2-platform code in CI process to verify edk2 code change.

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif Lindholm
Sent: Friday, September 10, 2021 5:55 PM
To: Chang, Abner <abner.chang@hpe.com>
Cc: devel@edk2.groups.io; kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming <gaoliming@byosoft.com.cn>;
'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>;
Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard Biesheuvel'
<ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

On Fri, Sep 10, 2021 at 00:08:12 +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
Move it to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform? Currently
RiscVPkg in under edk2-platform and the modules provided by RiscVPkg
are referred by RiscVVirPkg.
Ideally not.

I think this serves as a reminder that RISC-V/ProcessorPkg should move
over to edk2.

/
Leif




Abner Chang
 

-----Original Message-----
From: Ni, Ray [mailto:ray.ni@intel.com]
Sent: Friday, September 10, 2021 6:07 PM
To: devel@edk2.groups.io; leif@nuviainc.com; Chang, Abner (HPS SW/FW
Technologist) <abner.chang@hpe.com>
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel' <ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

I asked similar question to Mike who initially set up the CI.
The answer was: it's ok to pull a edk2-platform code in CI process to verify
edk2 code change.
Move RiscVPkg/RiscVPlatformPkg to under edk2 rather than have it under edk2-platforms makes more sense to me, and just leave RISC-V platform code under edk2-platforms.
(Or we can merge RiscVPlatformPkg into RiscVPkg and put RiscVPkg under edk2 because it seems not necessary to have the common platform code in the separate package.)
This is not only the matter of RISC-V packages location, CI for any RISC-V change is also required.

Abner


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
Lindholm
Sent: Friday, September 10, 2021 5:55 PM
To: Chang, Abner <abner.chang@hpe.com>
Cc: devel@edk2.groups.io; kraxel@redhat.com; Yao, Jiewen
<jiewen.yao@intel.com>; gaoliming <gaoliming@byosoft.com.cn>;
'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>;
Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L'
<sunilvl@ventanamicro.com>; 'Ard Biesheuvel'
<ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

On Fri, Sep 10, 2021 at 00:08:12 +0000, Chang, Abner (HPS SW/FW
Technologist) wrote:
Move it to
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform? Currently
RiscVPkg in under edk2-platform and the modules provided by RiscVPkg
are referred by RiscVVirPkg.
Ideally not.

I think this serves as a reminder that RISC-V/ProcessorPkg should move
over to edk2.

/
Leif




Abner Chang
 

Hi all, below is the plan to move some module/libraries from Arm*Pkg to other packages for RiscVVirtPkg and RiscVPkg.

1. FdtClientDxe - which is a useful protocol for parsing FDT nodes. Move to stay with FdtLib under EmbeddedPkg. gFdtClientProtocolGuid will be also moved to under EmbeddedPkg.
2. HighMemDxe - Move to under OvmfPkg/Fdt
3. FdtPciHostBridgeLib and FdtPciPcdProducerLib - Move to under OvmfPkg/Fdt
The PCD PcdPciIoTranslation is used by above two libraries and ArmPciCpuIo2Dxe, RiscVVirtPkg will use that PCD as well. RiscVPkg may provide its own CPU_IO2 protocol and use this PCD as ARM does.
The definition of PcdPciIoTranslation will be moved to under MdeModulePkg for ARM and RISC-V.
4. VirtioFdtDxe - Will be moved to under OvmfPkg/Fdt
Let me know if you have any opinions.

Regards,
Abner

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
Abner Chang
Sent: Saturday, September 11, 2021 8:52 AM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; leif@nuviainc.com
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel' <ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package



-----Original Message-----
From: Ni, Ray [mailto:ray.ni@intel.com]
Sent: Friday, September 10, 2021 6:07 PM
To: devel@edk2.groups.io; leif@nuviainc.com; Chang, Abner (HPS SW/FW
Technologist) <abner.chang@hpe.com>
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel'
<ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

I asked similar question to Mike who initially set up the CI.
The answer was: it's ok to pull a edk2-platform code in CI process to verify
edk2 code change.
Move RiscVPkg/RiscVPlatformPkg to under edk2 rather than have it under
edk2-platforms makes more sense to me, and just leave RISC-V platform
code under edk2-platforms.
(Or we can merge RiscVPlatformPkg into RiscVPkg and put RiscVPkg under
edk2 because it seems not necessary to have the common platform code in
the separate package.)
This is not only the matter of RISC-V packages location, CI for any RISC-V
change is also required.

Abner


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif
Lindholm
Sent: Friday, September 10, 2021 5:55 PM
To: Chang, Abner <abner.chang@hpe.com>
Cc: devel@edk2.groups.io; kraxel@redhat.com; Yao, Jiewen
<jiewen.yao@intel.com>; gaoliming <gaoliming@byosoft.com.cn>;
'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>;
Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L'
<sunilvl@ventanamicro.com>; 'Ard Biesheuvel'
<ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

On Fri, Sep 10, 2021 at 00:08:12 +0000, Chang, Abner (HPS SW/FW
Technologist) wrote:
Move it to
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform? Currently
RiscVPkg in under edk2-platform and the modules provided by
RiscVPkg
are referred by RiscVVirPkg.
Ideally not.

I think this serves as a reminder that RISC-V/ProcessorPkg should move
over to edk2.

/
Leif







Abner Chang
 

One corection.

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
Abner Chang
Sent: Saturday, September 18, 2021 2:46 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@hpe.com>; Ni, Ray <ray.ni@intel.com>; leif@nuviainc.com
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel' <ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

Hi all, below is the plan to move some module/libraries from Arm*Pkg to
other packages for RiscVVirtPkg and RiscVPkg.

1. FdtClientDxe - which is a useful protocol for parsing FDT nodes. Move to
stay with FdtLib under EmbeddedPkg. gFdtClientProtocolGuid will be also
moved to under EmbeddedPkg.
2. HighMemDxe - Move to under OvmfPkg/Fdt
3. FdtPciHostBridgeLib and FdtPciPcdProducerLib - Move to under
OvmfPkg/Fdt
The PCD PcdPciIoTranslation is used by above two libraries and
ArmPciCpuIo2Dxe, RiscVVirtPkg will use that PCD as well. RiscVPkg may
provide its own CPU_IO2 protocol and use this PCD as ARM does.
The definition of PcdPciIoTranslation will be moved to under
MdeModulePkg for ARM and RISC-V.
PcdPciIoTranslation will be moved to under MdePkg/

Abner

4. VirtioFdtDxe - Will be moved to under OvmfPkg/Fdt
Let me know if you have any opinions.

Regards,
Abner

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
Abner Chang
Sent: Saturday, September 11, 2021 8:52 AM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; leif@nuviainc.com
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel'
<ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package



-----Original Message-----
From: Ni, Ray [mailto:ray.ni@intel.com]
Sent: Friday, September 10, 2021 6:07 PM
To: devel@edk2.groups.io; leif@nuviainc.com; Chang, Abner (HPS
SW/FW
Technologist) <abner.chang@hpe.com>
Cc: kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; gaoliming
<gaoliming@byosoft.com.cn>; 'Ard Biesheuvel'
<ard.biesheuvel@arm.com>;
Kinney, Michael D <michael.d.kinney@intel.com>; Schaefer, Daniel
<daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>;
'Ard
Biesheuvel' <ardb+tianocore@kernel.org>
Subject: RE: [edk2-devel] [RFC] RISC-V QEMU virtual package

I asked similar question to Mike who initially set up the CI.
The answer was: it's ok to pull a edk2-platform code in CI process to verify
edk2 code change.
Move RiscVPkg/RiscVPlatformPkg to under edk2 rather than have it under
edk2-platforms makes more sense to me, and just leave RISC-V platform
code under edk2-platforms.
(Or we can merge RiscVPlatformPkg into RiscVPkg and put RiscVPkg under
edk2 because it seems not necessary to have the common platform code in
the separate package.)
This is not only the matter of RISC-V packages location, CI for any RISC-V
change is also required.

Abner


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
Leif
Lindholm
Sent: Friday, September 10, 2021 5:55 PM
To: Chang, Abner <abner.chang@hpe.com>
Cc: devel@edk2.groups.io; kraxel@redhat.com; Yao, Jiewen
<jiewen.yao@intel.com>; gaoliming <gaoliming@byosoft.com.cn>;
'Ard Biesheuvel' <ard.biesheuvel@arm.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>;
Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L'
<sunilvl@ventanamicro.com>; 'Ard Biesheuvel'
<ardb+tianocore@kernel.org>
Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package

On Fri, Sep 10, 2021 at 00:08:12 +0000, Chang, Abner (HPS SW/FW
Technologist) wrote:
Move it to
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.{c,inf} ?
The naming sounds good to me.

Another question,
Can CI build the package with dependency of edk2-platform?
Currently
RiscVPkg in under edk2-platform and the modules provided by
RiscVPkg
are referred by RiscVVirPkg.
Ideally not.

I think this serves as a reminder that RISC-V/ProcessorPkg should move
over to edk2.

/
Leif