From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: Re: [PATCH edk2-platforms 2/7] Silicon/SynQuacer/Fip006Dxe: factor out DXE specific pieces
Date: Thu, 17 Jan 2019 12:27:47 +0100 [thread overview]
Message-ID: <CAKv+Gu-dKUoRBCh613OYMtijGWtJ03HBUnSD=VZc0fPkSt-3Fg@mail.gmail.com> (raw)
In-Reply-To: <20190117101000.hsesfat7kcie7yuu@bivouac.eciton.net>
On Thu, 17 Jan 2019 at 11:10, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> On Fri, Jan 04, 2019 at 03:43:31PM +0100, Ard Biesheuvel wrote:
> > In preparation of creating a SMM version of the FIP006 NOR flash
> > driver, refactor the existing pieces into a core driver, the FVB
> > methods and the DXE instantiation code.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> I only have one nitpicky question on this patch:
>
> > ---
> > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf | 6 +-
> > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.c | 1006 +++++++++++++++++
> > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/{NorFlashDxe.h => NorFlash.h} | 52 +-
> > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c | 1150 +++-----------------
> > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/{NorFlashFvbDxe.c => NorFlashFvb.c} | 161 +--
> > 5 files changed, 1194 insertions(+), 1181 deletions(-)
> >
>
> > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h
> > similarity index 88%
> > rename from Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h
> > rename to Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h
> > index 20e74b0320ce..61b8e6a08fa0 100644
> > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h
> > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h
> > @@ -27,11 +27,9 @@
> > #include <Protocol/FirmwareVolumeBlock.h>
> >
> > #include <Library/DebugLib.h>
> > -#include <Library/DxeServicesTableLib.h>
> > #include <Library/IoLib.h>
> > +#include <Library/MemoryAllocationLib.h>
>
> Why add this include?
> I'm not going to ask to move out the existing headers not actually
> used by this file, but could we avoid adding new ones?
>
> https://edk2-docs.gitbooks.io/edk-ii-c-coding-standards-specification/content/v/release/2.20/5_source_files/53_include_files.html#534-include-files-may-include-only-those-headers-that-it-directly-depends-upon
> is actually a rule I agree with.
>
> But also, aren't all of the users of this file already manually
> including this one?
>
Fair enough. I will drop the include here, and add it to whichever
source file requires it afterwards.
> > #include <Library/NorFlashPlatformLib.h>
> > -#include <Library/UefiLib.h>
> > -#include <Library/UefiRuntimeLib.h>
> >
> > #include "Fip006Reg.h"
> >
>
> > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
> > index e52ab52d8cf7..6c07799b22d8 100644
> > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
> > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
> > @@ -15,15 +15,16 @@
> > **/
> >
> > #include <Library/BaseMemoryLib.h>
> > +#include <Library/DxeServicesTableLib.h>
> > +#include <Library/HobLib.h>
> > #include <Library/MemoryAllocationLib.h>
>
> At least this one does.
>
> > #include <Library/NorFlashInfoLib.h>
> > #include <Library/PcdLib.h>
> > #include <Library/UefiBootServicesTableLib.h>
> > #include <Library/UefiLib.h>
> > +#include <Library/UefiRuntimeLib.h>
> >
> > -#include "NorFlashDxe.h"
> > -
> > -STATIC EFI_EVENT mNorFlashVirtualAddrChangeEvent;
> > +#include "NorFlash.h"
next prev parent reply other threads:[~2019-01-17 11:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-04 14:43 [PATCH edk2-platforms 0/7] Silicon/SynQuacer: implement SMM based secure boot Ard Biesheuvel
2019-01-04 14:43 ` [PATCH edk2-platforms 1/7] Silicon/SynQuacer/Fip006Dxe: drop block I/O and disk I/O routines Ard Biesheuvel
2019-01-17 9:50 ` Leif Lindholm
2019-01-17 10:59 ` Ard Biesheuvel
2019-01-04 14:43 ` [PATCH edk2-platforms 2/7] Silicon/SynQuacer/Fip006Dxe: factor out DXE specific pieces Ard Biesheuvel
2019-01-17 10:10 ` Leif Lindholm
2019-01-17 11:27 ` Ard Biesheuvel [this message]
2019-01-21 16:16 ` Ard Biesheuvel
2019-01-21 16:46 ` Leif Lindholm
2019-01-21 16:47 ` Ard Biesheuvel
2019-01-21 16:53 ` Leif Lindholm
2019-01-04 14:43 ` [PATCH edk2-platforms 3/7] Silicon/SynQuacer/Fip006Dxe: implement standalone MM variant Ard Biesheuvel
2019-01-04 14:43 ` [PATCH edk2-platforms 4/7] Silicon/SynQuacer/Fip006Dxe: use proper accessor for unaligned access Ard Biesheuvel
2019-01-04 14:43 ` [PATCH edk2-platforms 5/7] Platform/DeveloperBox: create shared .DSC include file Ard Biesheuvel
2019-01-04 14:43 ` [PATCH edk2-platforms 6/7] Platform/DeveloperBox: add .DSC/.FDF description of MM components Ard Biesheuvel
2019-01-17 11:04 ` Leif Lindholm
2019-01-17 11:10 ` Ard Biesheuvel
2019-01-17 12:08 ` Leif Lindholm
2019-01-17 12:18 ` Ard Biesheuvel
2019-01-21 16:57 ` Ard Biesheuvel
2019-01-21 17:03 ` Leif Lindholm
2019-01-04 14:43 ` [PATCH edk2-platforms 7/7] Platform/DeveloperBox: add MM based UEFI secure boot support Ard Biesheuvel
2019-01-17 11:14 ` [PATCH edk2-platforms 0/7] Silicon/SynQuacer: implement SMM based secure boot Leif Lindholm
2019-01-21 17:40 ` 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='CAKv+Gu-dKUoRBCh613OYMtijGWtJ03HBUnSD=VZc0fPkSt-3Fg@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