public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org, leif.lindholm@linaro.org,
	lersek@redhat.com, jaben.carsey@intel.com, ruiyu.ni@intel.com,
	michael.d.kinney@intel.com, kelly.steele@intel.com
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 3/4] ArmPkg/PlatformBootManagerLib: refer to Shell FILE_GUID directly
Date: Wed, 22 Mar 2017 14:04:07 +0000	[thread overview]
Message-ID: <1490191448-22398-4-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1490191448-22398-1-git-send-email-ard.biesheuvel@linaro.org>

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, refer to
the UEFI Shell application by its declared symbolic GUID.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c               | 5 ++---
 ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
index cc5a4d1ff9b3..3eaed3a4799b 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
@@ -33,7 +33,6 @@
 
 #define DP_NODE_LEN(Type) { (UINT8)sizeof (Type), (UINT8)(sizeof (Type) >> 8) }
 
-
 #pragma pack (1)
 typedef struct {
   VENDOR_DEVICE_PATH         SerialDxe;
@@ -327,7 +326,7 @@ AddOutput (
 STATIC
 VOID
 PlatformRegisterFvBootOption (
-  EFI_GUID                         *FileGuid,
+  CONST EFI_GUID                   *FileGuid,
   CHAR16                           *Description,
   UINT32                           Attributes
   )
@@ -540,7 +539,7 @@ PlatformBootManagerAfterConsole (
   // Register UEFI Shell
   //
   PlatformRegisterFvBootOption (
-    PcdGetPtr (PcdShellFile), L"UEFI Shell", LOAD_OPTION_ACTIVE
+    &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE
     );
 }
 
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 8ec4f1dea6c4..beca5800d649 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -39,6 +39,7 @@ [Packages]
   IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
+  ShellPkg/ShellPkg.dec
 
 [LibraryClasses]
   BaseLib
@@ -59,7 +60,6 @@ [FeaturePcd]
 
 [FixedPcd]
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
@@ -75,6 +75,7 @@ [Guids]
   gEfiFileSystemVolumeLabelInfoIdGuid
   gEfiEndOfDxeEventGroupGuid
   gEfiTtyTermGuid
+  gUefiShellFileGuid
 
 [Protocols]
   gEfiDevicePathProtocolGuid
-- 
2.7.4



  parent reply	other threads:[~2017-03-22 14:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 14:04 [PATCH 0/4] Shell/Quark/ArmPkg: promote shell app FILE_GUID to proper GUID Ard Biesheuvel
2017-03-22 14:04 ` [PATCH 1/4] ShellPkg: add GUID declaration for FILE_GUID of UEFI Shell app to package Ard Biesheuvel
2017-03-22 15:13   ` Carsey, Jaben
2017-03-22 15:19     ` Ard Biesheuvel
2017-03-22 15:21       ` Carsey, Jaben
2017-03-22 15:39         ` Kinney, Michael D
2017-03-22 15:41           ` Carsey, Jaben
2017-03-22 15:54           ` Andrew Fish
2017-03-22 14:04 ` [PATCH 2/4] QuarkPlatformPkg/PlatformBootManagerLib: use new UefiShellFileGuid definition Ard Biesheuvel
2017-03-22 15:43   ` Kinney, Michael D
2017-03-22 14:04 ` Ard Biesheuvel [this message]
2017-03-22 14:04 ` [PATCH 4/4] ArmVirtPkg/ArmVirtQemu: refer to Shell app via its declared GUID Ard Biesheuvel
2017-03-22 14:39   ` Laszlo Ersek
2017-03-22 15:38 ` [PATCH 0/4] Shell/Quark/ArmPkg: promote shell app FILE_GUID to proper GUID Ard Biesheuvel
2017-03-22 15:39   ` Carsey, Jaben

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=1490191448-22398-4-git-send-email-ard.biesheuvel@linaro.org \
    --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