public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: devel@edk2.groups.io, Graeme Gregory <quic_ggregory@quicinc.com>
Subject: Re: [PATCH edk2-platforms] Platform/SbsaQemu: Switch to VirtNorFlashDxe
Date: Thu, 27 Oct 2022 19:15:09 +0200	[thread overview]
Message-ID: <CAMj1kXHtzk6AAYgh3UX+k3v3QVEUo5QR7AsgQ=pCS7xOFv_aHw@mail.gmail.com> (raw)
In-Reply-To: <Y1ph5yjn9UfIAcJ3@qc-i7.hemma.eciton.net>

On Thu, 27 Oct 2022 at 12:48, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> On Wed, Oct 26, 2022 at 19:42:10 +0200, Ard Biesheuvel wrote:
> > Switch to the OVMF version of the NOR flash DXE driver, which supports
> > QEMU's NOR flash emulation specifically, and carries some optimizations
> > that are therefore permitted.
> >
> > Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> > Cc: Graeme Gregory <graeme@nuviainc.com>
>
> Graeme Gregory <quic_ggregory@quicinc.com> is probably more likely to
> be seen these days. Patch to Maintainers.txt coming up (although
> Graeme is out this week).
>
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
>
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
>
>

Thanks

Merged as 8ea6ec38da88..2ce82b713db8


> > ---
> >  Platform/Qemu/SbsaQemu/SbsaQemu.dsc                                       |  4 ++--
> >  Platform/Qemu/SbsaQemu/SbsaQemu.fdf                                       |  2 +-
> >  Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf |  4 ++--
> >  Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c   | 12 ++++++------
> >  4 files changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> > index ff280709a509..79dd200ca7fc 100644
> > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> > @@ -178,7 +178,7 @@ [LibraryClasses.common]
> >    ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
> >
> >    TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
> > -  NorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> > +  VirtNorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> >
> >    CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
> >    BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
> > @@ -663,7 +663,7 @@ [Components.common]
> >
> >    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
> >    ArmPkg/Drivers/TimerDxe/TimerDxe.inf
> > -  ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
> > +  OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
> >    MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
> >
> >    #
> > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> > index 9f031c3e6649..781215707c3d 100644
> > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> > @@ -189,7 +189,7 @@ [FV.FvMain]
> >
> >    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
> >    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
> > -  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
> > +  INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
> >    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
> >
> >    #
> > diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> > index f2ba41e1df99..f7e3f8e05eec 100644
> > --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> > +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> > @@ -14,16 +14,16 @@ [Defines]
> >    FILE_GUID                      = c53d904d-de50-40f1-a148-a2ece48303d8
> >    MODULE_TYPE                    = BASE
> >    VERSION_STRING                 = 1.0
> > -  LIBRARY_CLASS                  = NorFlashPlatformLib
> > +  LIBRARY_CLASS                  = VirtNorFlashPlatformLib
> >
> >  [Sources.common]
> >    SbsaQemuNorFlashLib.c
> >
> >  [Packages]
> > -  ArmPlatformPkg/ArmPlatformPkg.dec
> >    ArmPkg/ArmPkg.dec
> >    MdePkg/MdePkg.dec
> >    MdeModulePkg/MdeModulePkg.dec
> > +  OvmfPkg/OvmfPkg.dec
> >
> >  [FixedPcd]
> >    gArmTokenSpaceGuid.PcdFdBaseAddress
> > diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> > index 0946327cb529..56c26019a140 100644
> > --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> > +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> > @@ -8,19 +8,19 @@
> >
> >  #include <Base.h>
> >  #include <PiDxe.h>
> > -#include <Library/NorFlashPlatformLib.h>
> > +#include <Library/VirtNorFlashPlatformLib.h>
> >
> >  #define QEMU_NOR_BLOCK_SIZE    SIZE_256KB
> >
> >  EFI_STATUS
> > -NorFlashPlatformInitialization (
> > +VirtNorFlashPlatformInitialization (
> >    VOID
> >    )
> >  {
> >    return EFI_SUCCESS;
> >  }
> >
> > -NOR_FLASH_DESCRIPTION mNorFlashDevice =
> > +STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =
> >  {
> >   FixedPcdGet64(PcdFdBaseAddress),
> >   FixedPcdGet64(PcdFlashNvStorageVariableBase),
> > @@ -29,9 +29,9 @@ NOR_FLASH_DESCRIPTION mNorFlashDevice =
> >  };
> >
> >  EFI_STATUS
> > -NorFlashPlatformGetDevices (
> > -  OUT NOR_FLASH_DESCRIPTION   **NorFlashDescriptions,
> > -  OUT UINT32                  *Count
> > +VirtNorFlashPlatformGetDevices (
> > +  OUT VIRT_NOR_FLASH_DESCRIPTION  **NorFlashDescriptions,
> > +  OUT UINT32                      *Count
> >    )
> >  {
> >    *NorFlashDescriptions = &mNorFlashDevice;
> > --
> > 2.35.1
> >

      reply	other threads:[~2022-10-27 17:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 17:42 [PATCH edk2-platforms] Platform/SbsaQemu: Switch to VirtNorFlashDxe Ard Biesheuvel
2022-10-27 10:48 ` Leif Lindholm
2022-10-27 17:15   ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMj1kXHtzk6AAYgh3UX+k3v3QVEUo5QR7AsgQ=pCS7xOFv_aHw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox