From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 31CD41A1E3E for ; Mon, 10 Oct 2016 00:19:10 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 10 Oct 2016 00:19:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,471,1473145200"; d="scan'208";a="1068347022" Received: from jyao1-mobl.ccr.corp.intel.com ([10.239.193.160]) by fmsmga002.fm.intel.com with ESMTP; 10 Oct 2016 00:19:08 -0700 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Michael D Kinney , Kelly Steele , Eric Dong , Ruiyu Ni , Feng Tian , Star Zeng , Liming Gao Date: Mon, 10 Oct 2016 15:18:58 +0800 Message-Id: <1476083939-15668-4-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1476083939-15668-1-git-send-email-jiewen.yao@intel.com> References: <1476083939-15668-1-git-send-email-jiewen.yao@intel.com> Subject: [PATCH V2 3/4] QuarkPlatformPkg/Bds: Produce PcdTestKeyUsed. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 07:19:10 -0000 Update BDS to produce PcdTestKeyUsed to indicate if there is any test key used in current BIOS, such as recovery key, or capsule update key. Then the generic UI may consume this PCD to show warning information. Cc: Michael D Kinney Cc: Kelly Steele Cc: Eric Dong Cc: Ruiyu Ni Cc: Feng Tian Cc: Star Zeng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 2 ++ QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + 2 files changed, 3 insertions(+) diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 77c1efc..f327c89 100644 --- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -419,6 +419,7 @@ PlatformBootManagerAfterConsole ( if ((Size == PcdGetSize(PcdRsa2048Sha256PublicKeyBuffer)) && (CompareMem(Buffer, PcdGetPtr(PcdRsa2048Sha256PublicKeyBuffer), Size) == 0)) { Print(L"WARNING: Recovery Test Key is used.\n"); + PcdSetBoolS(PcdTestKeyUsed, TRUE); } FreePool(Buffer); } @@ -433,6 +434,7 @@ PlatformBootManagerAfterConsole ( if ((Size == PcdGetSize(PcdPkcs7CertBuffer)) && (CompareMem(Buffer, PcdGetPtr(PcdPkcs7CertBuffer), Size) == 0)) { Print(L"WARNING: Capsule Test Key is used.\n"); + PcdSetBoolS(PcdTestKeyUsed, TRUE); } FreePool(Buffer); } diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 09a01d3..eadf1fe 100644 --- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -82,4 +82,5 @@ gQuarkPlatformTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer + gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed -- 2.7.4.windows.1