From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 BD20E210C6694 for ; Wed, 1 Aug 2018 00:53:19 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2018 00:53:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,431,1526367600"; d="scan'208";a="250728220" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 01 Aug 2018 00:53:19 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Aug 2018 00:53:18 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Aug 2018 00:53:18 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.57]) with mapi id 14.03.0319.002; Wed, 1 Aug 2018 15:53:16 +0800 From: "Zeng, Star" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Dong, Eric" , "Zeng, Star" Thread-Topic: [Patch v5 21/21] MdeModulePkg/BdsDxe: Move display of test key usage into BDS module Thread-Index: AQHUKWUP9s5YEGgpsUibtVpdieAsXqSqhgRQ Date: Wed, 1 Aug 2018 07:53:16 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BB8B58D@shsmsx102.ccr.corp.intel.com> References: <20180801065722.9500-1-michael.d.kinney@intel.com> <20180801065722.9500-22-michael.d.kinney@intel.com> In-Reply-To: <20180801065722.9500-22-michael.d.kinney@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch v5 21/21] MdeModulePkg/BdsDxe: Move display of test key usage into BDS module X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 07:53:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable A very minor comment. if (PcdGetBool (PcdTestKeyUsed)) can be used directly instead of if (PcdGetBool (PcdTestKeyUsed) =3D=3D TRUE) With update, Reviewed-by: Star Zeng . Thanks, Star -----Original Message----- From: Kinney, Michael D=20 Sent: Wednesday, August 1, 2018 2:55 PM To: edk2-devel@lists.01.org Cc: Ni, Ruiyu ; Zeng, Star ; Dong,= Eric ; Kinney, Michael D Subject: [Patch v5 21/21] MdeModulePkg/BdsDxe: Move display of test key usa= ge into BDS module Cc: Ruiyu Ni Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney --- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 1 + MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Univer= sal/BdsDxe/BdsDxe.inf index 7e644aa995..7030d67907 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -100,6 +100,7 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision ## C= ONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## C= ONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## S= OMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## C= ONSUMES =20 [Depex] TRUE diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index a25663ea43..b9ca31741e 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -884,6 +884,18 @@ BdsEntry ( PERF_INMODULE_BEGIN("PlatformBootManagerAfterConsole"); PlatformBootManagerAfterConsole (); PERF_INMODULE_END("PlatformBootManagerAfterConsole"); + + // + // If any component set PcdTestKeyUsed to TRUE because use of a test key + // was detected, then display a warning message on the debug log and the= console + // + if (PcdGetBool (PcdTestKeyUsed) =3D=3D TRUE) { + DEBUG ((DEBUG_ERROR, "**********************************\n")); + DEBUG ((DEBUG_ERROR, "** WARNING: Test Key is used. **\n")); + DEBUG ((DEBUG_ERROR, "**********************************\n")); + Print (L"** WARNING: Test Key is used. **\n"); + } + // // Boot to Boot Manager Menu when EFI_OS_INDICATIONS_BOOT_TO_FW_UI is se= t. Skip HotkeyBoot // --=20 2.14.2.windows.3