From patchwork Mon Mar 20 20:35:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 95579 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1126110qgd; Mon, 20 Mar 2017 13:36:11 -0700 (PDT) X-Received: by 10.84.164.225 with SMTP id l30mr17972069plg.30.1490042171605; Mon, 20 Mar 2017 13:36:11 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id v73si18076080pgb.209.2017.03.20.13.36.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2017 13:36:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 406C980474; Mon, 20 Mar 2017 13:36:11 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 82FF6803BF for ; Mon, 20 Mar 2017 13:36:10 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id n11so74083586wma.0 for ; Mon, 20 Mar 2017 13:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8eD0CbGeku9ZnQe7YLypSTY3Km7xh5Z3fJ3e+HHNJRw=; b=f00Rr5Mhv7iGw20GOYR1LlCGzxrzUBdJE9dXPduxqHz/YrdeLGXJBcvoc3jOK9PjIb 27Ov+UWjsWxoC5aunjHGqtvk2h755Ad81/mcfQsaD6TZY71ZKZVau1/h4WSFlHtqIeXx T0QtSsr/F3NSt6kUFF5rP8kWUizn2ikcuOYh4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8eD0CbGeku9ZnQe7YLypSTY3Km7xh5Z3fJ3e+HHNJRw=; b=DRcZ7zj2916Wq/KUQuvPDzjQfrVnNH0AsWzUq8b9C9h3P+o9QPA9j5RQdvnXOrOH2l S/zz7g7e22lUTZI+2/6QhtG1UQQtK5wmFlSN0NBwCWuiAiZOlMx5dY+kTUDUq14owr4E wCD9ok5dA5QqWIcDDBjaIFylEzLk42LZTktyLgYoR+11uxhCgi1tPW5tdYqBXKLbdA9c UBIxiq74V6kB9KzXKcLg045UfUw8hxKg7Gifn8XmGKqz99WRcUa6IhgW03I53DrosfMT 9F5XrYZxM0nx8Aih7h3yeKfW4IWsmUu2punwJX4zVk0ZG8cRHzQONbMCyj6RcN51whR0 1UfQ== X-Gm-Message-State: AFeK/H09gbW9RWMmGocabNA9HghoFdo7BzzDRr0Oa5MyfrmIzkLtitbIp0oLU+TwwEownpEL X-Received: by 10.28.141.143 with SMTP id p137mr9100595wmd.62.1490042169010; Mon, 20 Mar 2017 13:36:09 -0700 (PDT) Received: from localhost.localdomain (189.17.90.92.rev.sfr.net. [92.90.17.189]) by smtp.gmail.com with ESMTPSA id c35sm22086859wra.1.2017.03.20.13.36.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Mar 2017 13:36:08 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Date: Mon, 20 Mar 2017 20:35:44 +0000 Message-Id: <1490042145-19509-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490042145-19509-1-git-send-email-ard.biesheuvel@linaro.org> References: <1490042145-19509-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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 } +}; #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