[edk2-devel] [PATCH 00/11] ArmVirtPkg: introduce VirtNorFlashDxe

Ard Biesheuvel posted 11 patches 1 year, 6 months ago
Failed in applying to current master (apply log)
ArmPlatformPkg/ArmPlatformPkg.dec                                                                         |   6 -
ArmPlatformPkg/ArmPlatformPkg.dsc                                                                         |   6 -
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c                                                   | 123 -----
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.c                                                 | 383 ---------------
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf                                               |  66 ---
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c                                  |  28 --
ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf                                |  24 -
ArmVirtPkg/ArmVirtKvmTool.dsc                                                                             |   4 +-
ArmVirtPkg/ArmVirtKvmTool.fdf                                                                             |   2 +-
ArmVirtPkg/ArmVirtQemu.dsc                                                                                |   4 +-
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                                                                      |   2 +-
ArmVirtPkg/ArmVirtQemuKernel.dsc                                                                          |   4 +-
ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c                                                   |  20 +-
ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf                                              |   4 +-
ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c                                                      |  12 +-
ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf                                                    |   4 +-
ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h => OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h |  16 +-
OvmfPkg/OvmfPkg.dec                                                                                       |   4 +
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c                   | 492 ++++----------------
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.h => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h                   |  83 +---
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c             |  77 +--
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf         |  39 +-
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvb.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c             |  62 +--
23 files changed, 205 insertions(+), 1260 deletions(-)
delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c
delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.c
delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf
delete mode 100644 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c
delete mode 100644 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf
rename ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h => OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h (52%)
rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c (54%)
rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.h => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h (78%)
rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c (85%)
rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf (78%)
rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvb.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c (92%)
[edk2-devel] [PATCH 00/11] ArmVirtPkg: introduce VirtNorFlashDxe
Posted by Ard Biesheuvel 1 year, 6 months ago
Create a new driver VirtNorFlashDxe that targets QEMU and KvmTool's NOR
flash emulation specifically, and retire the ArmPlatformPkg one.

This permits new virt implementations to wire up QEMU's NOR flash
emulation without having to rely on ARM specific packages. It also
permits us to implement some tweaks to work around some rough
performance edges of KVM memslot backed NOR flash.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>

Ard Biesheuvel (11):
  OvmfPkg: clone NorFlashPlatformLib into VirtNorFlashPlatformLib
  OvmfPkg/VirtNorFlashDxe: clone ArmPlatformPkg's NOR flash driver
  OvmfPkg/VirtNorFlashDxe: remove CheckBlockLocked feature
  OvmfPkg/VirtNorFlashDxe: remove disk I/O protocol implementation
  OvmfPkg/VirtNorFlashDxe: drop block I/O protocol implementation
  OvmfPkg/VirtNorFlashDxe: avoid array mode switch after each word write
  OvmfPkg/VirtNorFlashDxe: avoid switching between modes in a tight loop
  OvmfPkg/VirtNorFlashDxe: use EFI_MEMORY_WC and drop AlignedCopyMem()
  ArmVirtPkg/ArmVirtQemu: migrate to OVMF's VirtNorFlashDxe
  ArmVirtPkg/ArmVirtKvmTool: Migrate to OVMF's VirtNorFlashDxe
  ArmPlatformPkg: Retire NorFlashDxe driver

 ArmPlatformPkg/ArmPlatformPkg.dec                                                                         |   6 -
 ArmPlatformPkg/ArmPlatformPkg.dsc                                                                         |   6 -
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c                                                   | 123 -----
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.c                                                 | 383 ---------------
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf                                               |  66 ---
 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c                                  |  28 --
 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf                                |  24 -
 ArmVirtPkg/ArmVirtKvmTool.dsc                                                                             |   4 +-
 ArmVirtPkg/ArmVirtKvmTool.fdf                                                                             |   2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                                                                                |   4 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                                                                      |   2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                                                                          |   4 +-
 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c                                                   |  20 +-
 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf                                              |   4 +-
 ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c                                                      |  12 +-
 ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf                                                    |   4 +-
 ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h => OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h |  16 +-
 OvmfPkg/OvmfPkg.dec                                                                                       |   4 +
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c                   | 492 ++++----------------
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.h => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h                   |  83 +---
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c             |  77 +--
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf         |  39 +-
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvb.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c             |  62 +--
 23 files changed, 205 insertions(+), 1260 deletions(-)
 delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c
 delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.c
 delete mode 100644 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf
 delete mode 100644 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c
 delete mode 100644 ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf
 rename ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h => OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h (52%)
 rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c (54%)
 rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlash.h => OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h (78%)
 rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c (85%)
 rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf => OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf (78%)
 rename ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvb.c => OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c (92%)

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95510): https://edk2.groups.io/g/devel/message/95510
Mute This Topic: https://groups.io/mt/94539642/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 00/11] ArmVirtPkg: introduce VirtNorFlashDxe
Posted by Sunil V L 1 year, 6 months ago
On Mon, Oct 24, 2022 at 07:01:11PM +0200, Ard Biesheuvel wrote:
> Create a new driver VirtNorFlashDxe that targets QEMU and KvmTool's NOR
> flash emulation specifically, and retire the ArmPlatformPkg one.
> 
> This permits new virt implementations to wire up QEMU's NOR flash
> emulation without having to rely on ARM specific packages. It also
> permits us to implement some tweaks to work around some rough
> performance edges of KVM memslot backed NOR flash.
> 

Thank you very much!. Looks good to me. May be you want to fix the
include gaurd in NorFlash.h and VirtNorFlashPlatformLib.h as per the
coding standards.

Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95632): https://edk2.groups.io/g/devel/message/95632
Mute This Topic: https://groups.io/mt/94539642/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 00/11] ArmVirtPkg: introduce VirtNorFlashDxe
Posted by Ard Biesheuvel 1 year, 6 months ago
On Thu, 27 Oct 2022 at 06:47, Sunil V L <sunilvl@ventanamicro.com> wrote:
>
> On Mon, Oct 24, 2022 at 07:01:11PM +0200, Ard Biesheuvel wrote:
> > Create a new driver VirtNorFlashDxe that targets QEMU and KvmTool's NOR
> > flash emulation specifically, and retire the ArmPlatformPkg one.
> >
> > This permits new virt implementations to wire up QEMU's NOR flash
> > emulation without having to rely on ARM specific packages. It also
> > permits us to implement some tweaks to work around some rough
> > performance edges of KVM memslot backed NOR flash.
> >
>
> Thank you very much!. Looks good to me. May be you want to fix the
> include gaurd in NorFlash.h and VirtNorFlashPlatformLib.h as per the
> coding standards.
>
> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>

Thanks. I've merged these now.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95654): https://edk2.groups.io/g/devel/message/95654
Mute This Topic: https://groups.io/mt/94539642/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-