public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org, ryan.harkin@linaro.org
Subject: Re: [PATCH 2/3] ArmPkg/PlatformBootManagerLib: refer to Shell FILE_GUID directly
Date: Wed, 22 Mar 2017 12:53:09 +0000	[thread overview]
Message-ID: <20170322125308.GT16034@bivouac.eciton.net> (raw)
In-Reply-To: <1490042145-19509-3-git-send-email-ard.biesheuvel@linaro.org>

On Mon, Mar 20, 2017 at 08:35:44PM +0000, Ard Biesheuvel wrote:
> Instead of indirecting the reference to the Shell binary via a PCD
> that is defined in IntelFrameworkModulePkg, and which invariably
> gets set to the same value by all users of this library, move the
> reference into the code, and drop the reference to the PCD entirely.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c               | 7 +++++--
>  ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 -
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> index cc5a4d1ff9b3..d479c28775fb 100644
> --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -33,6 +33,9 @@
>  
>  #define DP_NODE_LEN(Type) { (UINT8)sizeof (Type), (UINT8)(sizeof (Type) >> 8) }
>  
> +STATIC CONST EFI_GUID mUefiShellFileGuid = {
> +  0x7C04A583, 0x9E3E, 0x4f1c, { 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
> +};

Surely this ought to be defined in a shared header file rather than
replicated across the tree? (And yes, used in QuarkPlatformPkg as
well.)

Otherwise, looks like a good change.

/
    Leif

>  
>  #pragma pack (1)
>  typedef struct {
> @@ -327,7 +330,7 @@ AddOutput (
>  STATIC
>  VOID
>  PlatformRegisterFvBootOption (
> -  EFI_GUID                         *FileGuid,
> +  CONST EFI_GUID                   *FileGuid,
>    CHAR16                           *Description,
>    UINT32                           Attributes
>    )
> @@ -540,7 +543,7 @@ PlatformBootManagerAfterConsole (
>    // Register UEFI Shell
>    //
>    PlatformRegisterFvBootOption (
> -    PcdGetPtr (PcdShellFile), L"UEFI Shell", LOAD_OPTION_ACTIVE
> +    &mUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE
>      );
>  }
>  
> diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> index 8ec4f1dea6c4..8ac3b3799674 100644
> --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> @@ -59,7 +59,6 @@ [FeaturePcd]
>  
>  [FixedPcd]
>    gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
> -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
>    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
>    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
>    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> -- 
> 2.7.4
> 


  reply	other threads:[~2017-03-22 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 20:35 [PATCH 0/3] ArmPkg/PlatformBootManagerLib: fixes Ard Biesheuvel
2017-03-20 20:35 ` [PATCH 1/3] ArmPkg/PlatformBootManagerLib: dispatch deferred images after EndOfDxe Ard Biesheuvel
2017-03-20 20:35 ` [PATCH 2/3] ArmPkg/PlatformBootManagerLib: refer to Shell FILE_GUID directly Ard Biesheuvel
2017-03-22 12:53   ` Leif Lindholm [this message]
2017-03-22 13:16     ` Ard Biesheuvel
2017-03-22 13:22       ` Leif Lindholm
2017-03-20 20:35 ` [PATCH 3/3] ArmPkg/PlatformBootManagerLib: move to BootLogoLib for boot splash support Ard Biesheuvel
2017-03-22 12:59   ` Leif Lindholm

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=20170322125308.GT16034@bivouac.eciton.net \
    --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