From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9721E8038F for ; Wed, 22 Mar 2017 05:53:13 -0700 (PDT) Received: by mail-wr0-x22e.google.com with SMTP id u108so129149498wrb.3 for ; Wed, 22 Mar 2017 05:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ivqGzuWi9LPl4j+RszcAkE1kKMskYosulWf4YyUudnI=; b=jkll+nBmUUYIuiEQgvTDiJ6X4L5p+n+49u0imIK5hUqovJJqqAu8CYQb17UZbRyaF0 kdzXhehprh0iZqVWYqY+MwD7Som/Y42sqNuaxzC9JiI9cjCvrHLKB3e9l/L8ShGlwDsh wnOjqH1OqAMIm+UbLWfLy1H8I3TK1iwQkdeXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ivqGzuWi9LPl4j+RszcAkE1kKMskYosulWf4YyUudnI=; b=rh0omLkBB14aAU23Rvg+bz9OrzEXJLlvSWrmUROqT+cEUTLc745XPNrODJ7OwSGX8J dPRUOUsWs7Ag5U/zRmhA8PuXyXw3iAeRWSPQIS1G5gB6dVq2oCnbTYUqgG1UiL+m8MBR GhY0TpQFm5IZPDLpy2QJzJglZ53k+UIcCflw5kvYAPs95525waTG7WIoqdjlUVqUhSDS bbXVNqDurHuZefd2YXk0SCp5H72epSTYb9UjkJhuO1uT9EKMdsnX2sYFpztctDYx/gph ETcaCyyQ7Emz6zo5CCBH1KdbQalI+0cqQBE80Oajo3re0Lqy+JDTcsb3NYAyYQVIOzwf 28fw== X-Gm-Message-State: AFeK/H25/u9vC/APZQ+Ge92DQfubx/WrxM9pupV37cg45uLf8f5Lex4Y76F+cRrqptQK04hB X-Received: by 10.223.177.207 with SMTP id r15mr39640305wra.127.1490187191860; Wed, 22 Mar 2017 05:53:11 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id r124sm230853wmf.11.2017.03.22.05.53.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 05:53:11 -0700 (PDT) Date: Wed, 22 Mar 2017 12:53:09 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, ryan.harkin@linaro.org Message-ID: <20170322125308.GT16034@bivouac.eciton.net> References: <1490042145-19509-1-git-send-email-ard.biesheuvel@linaro.org> <1490042145-19509-3-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1490042145-19509-3-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH 2/3] ArmPkg/PlatformBootManagerLib: refer to Shell FILE_GUID directly X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 12:53:14 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 >