From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, sami.mujawar@arm.com,
Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
Thomas Abraham <thomas.abraham@arm.com>,
"nd@arm.com" <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 2/4] Platform/ARM: create local definition of NorFlashPlatformLib
Date: Wed, 19 Oct 2022 14:56:39 +0200 [thread overview]
Message-ID: <CAMj1kXFM9Tdf=qRLcqT56ogfKOk3ADMNJU=AgV34sSWT1GL9fg@mail.gmail.com> (raw)
In-Reply-To: <0d8b82d3-83ce-e8a8-468a-c41907f015d6@arm.com>
On Wed, 19 Oct 2022 at 14:52, Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> Hi Ard,
>
> Thank you for this patch.
>
> The patch at 'https://edk2.groups.io/g/devel/message/95239' is moving
> the NorFlashPlatformLib.h to
> MdePkg/Include/Library/NorFlashPlatformLib.h. Is the plan to drop
> Platform/ARM/Include/Library/NorFlashPlatformLib.h once the MdePkg patch
> is merged?
>
MdePkg is not the place for this - it only carries things that are
defined in PI, UEFI, or other industry standard specifications.
NorFlashPlatformLib is tightly coupled to NorFlashDxe. We will be
moving the latter into OvmfPkg/ so the library definition should move
there as well, most probably.
> Other than that, these changes look good to me.
>
> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
>
> Regards,
>
> Sami Mujawar
>
> On 19/10/2022 11:35 am, Ard Biesheuvel wrote:
> > The version of NorFlashPlatformLib defined in ArmPlatformPkg will go
> > away once we retire its version of NorFlashDxe, so switch to a local
> > Platform/ARM version instead.
> >
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> > ---
> > Platform/ARM/ARM.dec | 1 +
> > Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf | 2 +-
> > Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf | 2 +-
> > Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf | 2 +-
> > Platform/ARM/Include/Library/NorFlashPlatformLib.h | 30 ++++++++++++++++++++
> > 5 files changed, 34 insertions(+), 3 deletions(-)
> >
> > diff --git a/Platform/ARM/ARM.dec b/Platform/ARM/ARM.dec
> > index 5175b313f95a..cf1c8ef04742 100644
> > --- a/Platform/ARM/ARM.dec
> > +++ b/Platform/ARM/ARM.dec
> > @@ -17,6 +17,7 @@ [Includes]
> >
> >
> > [LibraryClasses]
> >
> > BdsLib|Include/Library/BdsLib.h
> >
> > + NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h
> >
> >
> >
> > [Guids]
> >
> > gArmBootMonFsFileInfoGuid = { 0x41e26b9c, 0xada6, 0x45b3, { 0x80, 0x8e, 0x23, 0x57, 0xa3, 0x5b, 0x60, 0xd6 } }
> >
> > diff --git a/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf b/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf
> > index e5e5628de387..1a38bf81b349 100644
> > --- a/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf
> > +++ b/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf
> > @@ -17,8 +17,8 @@ [Sources.common]
> > NorFlashJuno.c
> >
> >
> >
> > [Packages]
> >
> > - ArmPlatformPkg/ArmPlatformPkg.dec
> >
> > MdePkg/MdePkg.dec
> >
> > + Platform/ARM/ARM.dec
> >
> > Platform/ARM/JunoPkg/ArmJuno.dec
> >
> >
> >
> > [LibraryClasses]
> >
> > diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf b/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf
> > index 74486eacd009..06068db0e4f3 100644
> > --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf
> > +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf
> > @@ -18,8 +18,8 @@ [Sources.common]
> > NorFlashLib.c
> >
> >
> >
> > [Packages]
> >
> > - ArmPlatformPkg/ArmPlatformPkg.dec
> >
> > MdePkg/MdePkg.dec
> >
> > + Platform/ARM/ARM.dec
> >
> > Platform/ARM/SgiPkg/SgiPlatform.dec
> >
> >
> >
> > [LibraryClasses]
> >
> > diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf
> > index 96bbf1e42313..54b3cb041645 100644
> > --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf
> > +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf
> > @@ -19,8 +19,8 @@ [Sources.common]
> > StandaloneMmNorFlashLib.c
> >
> >
> >
> > [Packages]
> >
> > - ArmPlatformPkg/ArmPlatformPkg.dec
> >
> > MdePkg/MdePkg.dec
> >
> > + Platform/ARM/ARM.dec
> >
> > Platform/ARM/SgiPkg/SgiPlatform.dec
> >
> >
> >
> > [LibraryClasses]
> >
> > diff --git a/Platform/ARM/Include/Library/NorFlashPlatformLib.h b/Platform/ARM/Include/Library/NorFlashPlatformLib.h
> > new file mode 100644
> > index 000000000000..6ef5b70e9948
> > --- /dev/null
> > +++ b/Platform/ARM/Include/Library/NorFlashPlatformLib.h
> > @@ -0,0 +1,30 @@
> > +/** @file
> >
> > +
> >
> > + Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
> >
> > +
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > + **/
> >
> > +
> >
> > +#ifndef _NORFLASHPLATFORMLIB_H_
> >
> > +#define _NORFLASHPLATFORMLIB_H_
> >
> > +
> >
> > +typedef struct {
> >
> > + UINTN DeviceBaseAddress; // Start address of the Device Base Address (DBA)
> >
> > + UINTN RegionBaseAddress; // Start address of one single region
> >
> > + UINTN Size;
> >
> > + UINTN BlockSize;
> >
> > +} NOR_FLASH_DESCRIPTION;
> >
> > +
> >
> > +EFI_STATUS
> >
> > +NorFlashPlatformInitialization (
> >
> > + VOID
> >
> > + );
> >
> > +
> >
> > +EFI_STATUS
> >
> > +NorFlashPlatformGetDevices (
> >
> > + OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
> >
> > + OUT UINT32 *Count
> >
> > + );
> >
> > +
> >
> > +#endif /* _NORFLASHPLATFORMLIB_H_ */
> >
>
>
>
>
>
next prev parent reply other threads:[~2022-10-19 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 10:35 [PATCH edk2-platforms 0/4] Platform/ARM: clone ArmPlatformPkg's NorFlashDxe Ard Biesheuvel
2022-10-19 10:35 ` [PATCH edk2-platforms 1/4] Platform/ARM/BootMonFs: drop spurious dependency on ArmPlatformPkg Ard Biesheuvel
2022-10-19 12:46 ` Sami Mujawar
2022-10-19 10:35 ` [PATCH edk2-platforms 2/4] Platform/ARM: create local definition of NorFlashPlatformLib Ard Biesheuvel
2022-10-19 12:51 ` [edk2-devel] " Sunil V L
2022-10-19 12:52 ` Sami Mujawar
2022-10-19 12:56 ` Ard Biesheuvel [this message]
2022-10-19 13:26 ` [edk2-devel] " Sunil V L
2022-10-19 10:35 ` [PATCH edk2-platforms 3/4] Platform/ARM: clone NorFlashDxe from ArmPlatformPkg Ard Biesheuvel
2022-10-19 12:52 ` Sami Mujawar
2022-10-19 10:35 ` [PATCH edk2-platforms 4/4] Platform/ARM: switch to local version of NorFlashDxe drivers Ard Biesheuvel
2022-10-19 12:53 ` Sami Mujawar
2022-10-19 15:12 ` [PATCH edk2-platforms 0/4] Platform/ARM: clone ArmPlatformPkg's NorFlashDxe Ard Biesheuvel
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='CAMj1kXFM9Tdf=qRLcqT56ogfKOk3ADMNJU=AgV34sSWT1GL9fg@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