From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga12.intel.com (mga12.intel.com []) by groups.io with SMTP; Wed, 08 May 2019 21:31:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 21:31:16 -0700 X-ExtLoop1: 1 Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.98.74]) by orsmga004.jf.intel.com with ESMTP; 08 May 2019 21:31:16 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Date: Wed, 8 May 2019 21:31:01 -0700 Message-Id: <20190509043111.15272-7-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190509043111.15272-1-michael.d.kinney@intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove use of PCD PcdShellFile from the IntelFrameworkModulePkg and instead use gUefiShellFileGuid to find the UEFI Shell in an FV. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c | 4 ++-- .../Library/PlatformBdsLib/PlatformBdsLib.inf | 10 ++++++---- .../Library/GenericBdsLib/BdsBoot.c | 8 ++++---- .../Library/GenericBdsLib/GenericBdsLib.inf | 5 +++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c index 0f0e15c64a..e86c6b3e2e 100644 --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c @@ -1356,7 +1356,7 @@ PlatformBdsLibEnumerateAllBootOption ( Status = Fv->ReadFile ( Fv, - PcdGetPtr(PcdShellFile), + &gUefiShellFileGuid, NULL, &Size, &Type, @@ -1528,7 +1528,7 @@ PlatformBdsLibEnumerateAllBootOption ( Status = Fv->ReadFile ( Fv, - PcdGetPtr(PcdShellFile), + &gUefiShellFileGuid, NULL, &Size, &Type, diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf index 5831569fae..d3bef0fa39 100644 --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf @@ -1,11 +1,13 @@ #/** @file # Component name for module PlatformBootManagerLib # -# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.
-# +# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.
+# + # SPDX-License-Identifier: BSD-2-Clause-Patent -# +# + # # # @@ -97,6 +99,7 @@ [Guids] gEfiNormalSetupGuid gEfiPartTypeSystemPartGuid gEfiEndOfDxeEventGroupGuid + gUefiShellFileGuid [Pcd] gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiRsa2048Sha256TestPublicKeyFileGuid @@ -111,7 +114,6 @@ [Pcd] gPlatformModuleTokenSpaceGuid.PcdFlashFvShellSize gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile gPlatformModuleTokenSpaceGuid.PcdIFWISigBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index b875041880..3034853695 100644 --- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -1,7 +1,7 @@ /** @file BDS Lib functions which relate with create or process the boot option. -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -2342,7 +2342,7 @@ BdsLibBootViaBootOption ( // // If the boot option point to Internal FV shell, make sure it is valid // - Status = BdsLibUpdateFvFileDevicePath (&DevicePath, PcdGetPtr(PcdShellFile)); + Status = BdsLibUpdateFvFileDevicePath (&DevicePath, &gUefiShellFileGuid); if (!EFI_ERROR(Status)) { if (Option->DevicePath != NULL) { FreePool(Option->DevicePath); @@ -3544,7 +3544,7 @@ BdsLibEnumerateAllBootOption ( Status = Fv->ReadFile ( Fv, - PcdGetPtr(PcdShellFile), + &gUefiShellFileGuid, NULL, &Size, &Type, @@ -3629,7 +3629,7 @@ BdsLibBuildOptionFromShell ( // // Build the shell device path // - EfiInitializeFwVolDevicepathNode (&ShellNode, PcdGetPtr(PcdShellFile)); + EfiInitializeFwVolDevicepathNode (&ShellNode, &gUefiShellFileGuid); DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *) &ShellNode); diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf index a978b5cbfa..e3c8a6fa27 100644 --- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf +++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf @@ -6,7 +6,7 @@ # 2) BDS boot device connect interface; # 3) BDS Misc interfaces for mainting boot variable, ouput string, etc. # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -43,6 +43,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec + ShellPkg/ShellPkg.dec [LibraryClasses] DevicePathLib @@ -98,6 +99,7 @@ [Guids] ## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder" gEfiLegacyDevOrderVariableGuid gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID + gUefiShellFileGuid [Protocols] gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES @@ -131,7 +133,6 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## CONSUMES - gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES # -- 2.21.0.windows.1