OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 2 +- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 9 +- .../VirtNorFlashDeviceTreeLib.inf | 40 +++++ .../VirtNorFlashDeviceTreeLib.c | 137 ++++++++++++++++++ OvmfPkg/RiscVVirt/README.md | 41 ++++++ OvmfPkg/RiscVVirt/RiscVVirt.fdf.inc | 12 +- OvmfPkg/RiscVVirt/VarStore.fdf.inc | 25 ++-- 7 files changed, 245 insertions(+), 21 deletions(-) create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.inf create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.c create mode 100644 OvmfPkg/RiscVVirt/README.md
Recent updates to RISC-V qemu virt platform merged today (07/14), have enabled both pflash devices for the S-mode payload like EDK2. These updates also aligned the design similar to other architectures where pflash0 is for read-only code and pflash1 for variable store. Previously only pflash1 was available for S-mode use. Current EDK2 will not work with this latest qemu changes since it always assumed to boot from pflash1. So, separate the code and variable store and use pflash0 to keep the code. Add 'readme' about build and test as per these changes. The changes are available in the branch : https://github.com/vlsunil/edk2/tree/separate_code_vars CI tests passed (#4553). Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Cc: Dann Frazier <dann.frazier@canonical.com> Sunil V L (4): OvmfPkg/RiscVVirt: Fix couple of issues in VarStore OvmfPkg/RiscVVirt: Add VirtNorFlashDeviceTreeLib library OvmfPkg/RiscVVirt: Add support for separate code and variable store OvmfPkg/RiscVVirt: Add a readme for build and test OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 2 +- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 9 +- .../VirtNorFlashDeviceTreeLib.inf | 40 +++++ .../VirtNorFlashDeviceTreeLib.c | 137 ++++++++++++++++++ OvmfPkg/RiscVVirt/README.md | 41 ++++++ OvmfPkg/RiscVVirt/RiscVVirt.fdf.inc | 12 +- OvmfPkg/RiscVVirt/VarStore.fdf.inc | 25 ++-- 7 files changed, 245 insertions(+), 21 deletions(-) create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.inf create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.c create mode 100644 OvmfPkg/RiscVVirt/README.md -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106091): https://edk2.groups.io/g/devel/message/106091 Mute This Topic: https://groups.io/mt/99532021/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Sunil V L <sunilvl@ventanamicro.com> schrieb am Mi., 14. Juni 2023, 19:01: > Recent updates to RISC-V qemu virt platform merged today (07/14), > have enabled both pflash devices for the S-mode payload like EDK2. > These updates also aligned the design similar to other architectures > where pflash0 is for read-only code and pflash1 for variable store. > Previously only pflash1 was available for S-mode use. > > Current EDK2 will not work with this latest qemu changes since it always > assumed to boot from pflash1. So, separate the code and variable > store and use pflash0 to keep the code. > Not all users will have the newest QEMU provided by their Linx distro. Will it be possible to boot the the same EDK II binary on old and new QEMU releases? Best regards Heinrich > Add 'readme' about build and test as per these changes. > > The changes are available in the branch : > https://github.com/vlsunil/edk2/tree/separate_code_vars > > CI tests passed (#4553). > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> > Cc: Jiewen Yao <jiewen.yao@intel.com> > Cc: Jordan Justen <jordan.l.justen@intel.com> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Andrei Warkentin <andrei.warkentin@intel.com> > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> > Cc: Dann Frazier <dann.frazier@canonical.com> > > > Sunil V L (4): > OvmfPkg/RiscVVirt: Fix couple of issues in VarStore > OvmfPkg/RiscVVirt: Add VirtNorFlashDeviceTreeLib library > OvmfPkg/RiscVVirt: Add support for separate code and variable store > OvmfPkg/RiscVVirt: Add a readme for build and test > > OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 2 +- > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 9 +- > .../VirtNorFlashDeviceTreeLib.inf | 40 +++++ > .../VirtNorFlashDeviceTreeLib.c | 137 ++++++++++++++++++ > OvmfPkg/RiscVVirt/README.md | 41 ++++++ > OvmfPkg/RiscVVirt/RiscVVirt.fdf.inc | 12 +- > OvmfPkg/RiscVVirt/VarStore.fdf.inc | 25 ++-- > 7 files changed, 245 insertions(+), 21 deletions(-) > create mode 100644 > OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.inf > create mode 100644 > OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.c > create mode 100644 OvmfPkg/RiscVVirt/README.md > > -- > 2.34.1 > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106096): https://edk2.groups.io/g/devel/message/106096 Mute This Topic: https://groups.io/mt/99532021/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Wed, Jun 14, 2023 at 07:11:18PM +0200, Heinrich Schuchardt wrote: > Sunil V L <sunilvl@ventanamicro.com> schrieb am Mi., 14. Juni 2023, 19:01: > > > Recent updates to RISC-V qemu virt platform merged today (07/14), > > have enabled both pflash devices for the S-mode payload like EDK2. > > These updates also aligned the design similar to other architectures > > where pflash0 is for read-only code and pflash1 for variable store. > > Previously only pflash1 was available for S-mode use. > > > > Current EDK2 will not work with this latest qemu changes since it always > > assumed to boot from pflash1. So, separate the code and variable > > store and use pflash0 to keep the code. > > > > Not all users will have the newest QEMU provided by their Linx distro. Will > it be possible to boot the the same EDK II binary on old and new QEMU > releases? > Hi Heinrich, While both unified and separate images can not be generated at the same time, a build flag can be used by which the user can build one of the schemes matching qemu capabilities. Default will be separate code and vars matching the latest qemu. I believe this will alleviate the concern. If this looks better, let me test and send v2. Thanks! Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106114): https://edk2.groups.io/g/devel/message/106114 Mute This Topic: https://groups.io/mt/99532021/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 6/15/23 13:50, Sunil V L wrote: > On Wed, Jun 14, 2023 at 07:11:18PM +0200, Heinrich Schuchardt wrote: >> Sunil V L <sunilvl@ventanamicro.com> schrieb am Mi., 14. Juni 2023, 19:01: >> >>> Recent updates to RISC-V qemu virt platform merged today (07/14), >>> have enabled both pflash devices for the S-mode payload like EDK2. >>> These updates also aligned the design similar to other architectures >>> where pflash0 is for read-only code and pflash1 for variable store. >>> Previously only pflash1 was available for S-mode use. >>> >>> Current EDK2 will not work with this latest qemu changes since it always >>> assumed to boot from pflash1. So, separate the code and variable >>> store and use pflash0 to keep the code. >>> >> >> Not all users will have the newest QEMU provided by their Linx distro. Will >> it be possible to boot the same EDK II binary on old and new QEMU >> releases? >> > Hi Heinrich, > > While both unified and separate images can not be generated at the same > time, a build flag can be used by which the user can build one of > the schemes matching qemu capabilities. Default will be separate > code and vars matching the latest qemu. > > I believe this will alleviate the concern. If this looks better, let me > test and send v2. > > Thanks! > Sunil At least Debian and Ubuntu packaging relies on the separation of code and variables. So anyway we would not be able back-port EDK II as package to anything that does not have the upcoming QEMU release. It would be helpful to document the constraints in the yet to be created OvmfPkg/RiscVVirt/ReadMe.rst. Best regards Heinrich -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106117): https://edk2.groups.io/g/devel/message/106117 Mute This Topic: https://groups.io/mt/99532021/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Wed, Jun 14, 2023 at 07:11:18PM +0200, Heinrich Schuchardt wrote: > Sunil V L <sunilvl@ventanamicro.com> schrieb am Mi., 14. Juni 2023, 19:01: > > > Recent updates to RISC-V qemu virt platform merged today (07/14), > > have enabled both pflash devices for the S-mode payload like EDK2. > > These updates also aligned the design similar to other architectures > > where pflash0 is for read-only code and pflash1 for variable store. > > Previously only pflash1 was available for S-mode use. > > > > Current EDK2 will not work with this latest qemu changes since it always > > assumed to boot from pflash1. So, separate the code and variable > > store and use pflash0 to keep the code. > > > > Not all users will have the newest QEMU provided by their Linx distro. Will > it be possible to boot the the same EDK II binary on old and new QEMU > releases? > Hi Heinrich, I was initially thinking to have support for both unified and separate images something similar to x86. However, it doesn't work for RISC-V since we need code in the beginning of the image. So, if we try to add both unified and separate image support, the PCD variables for NVRAM get different values during build and boot will fail for one of the image. I don't think it is worth of the effort to have two different infrastructure files for old and new qemu. We discussed this issue in qemu community and consensus was it is better in the long term to move to this design while in short term we will have this incompatibility. Since RISC-V EDK2 is relatively new, I think it is OK to request people with old qemu to use older EDK2 or current stable release. For next stable release, both qemu and edk2 will be compatible to each other. Thanks, Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106107): https://edk2.groups.io/g/devel/message/106107 Mute This Topic: https://groups.io/mt/99532021/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.