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 5EDB081D54 for ; Wed, 2 Nov 2016 06:59:02 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 02 Nov 2016 06:59:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,583,1473145200"; d="scan'208";a="186752757" Received: from yliu149-mobl.ccr.corp.intel.com (HELO jyao1-MOBL.ccr.corp.intel.com) ([10.254.209.154]) by fmsmga004.fm.intel.com with ESMTP; 02 Nov 2016 06:59:02 -0700 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Eric Dong , Ruiyu Ni , Feng Tian , Star Zeng , Michael D Kinney , Liming Gao Date: Wed, 2 Nov 2016 21:57:10 +0800 Message-Id: <1478095036-16344-10-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1478095036-16344-1-git-send-email-jiewen.yao@intel.com> References: <1478095036-16344-1-git-send-email-jiewen.yao@intel.com> Subject: [PATCH V8 09/15] MdeModulePkg/UiApp: Show test key warning info in FrontPage. 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: Wed, 02 Nov 2016 13:59:02 -0000 The UiApp is updated to consume PcdTestKeyUsed to know if there is any test key used in current BIOS, such as recovery key, or capsule update key. Then UiApp show warning information in front page. Cc: Eric Dong Cc: Ruiyu Ni Cc: Feng Tian Cc: Star Zeng Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c | 13 +++++++++++++ MdeModulePkg/Application/UiApp/FrontPageStrings.uni | 4 +++- MdeModulePkg/Application/UiApp/UiApp.inf | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c index 6e4f7b5..a9d2269 100644 --- a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c +++ b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c @@ -16,8 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include "FrontPage.h" #include "FrontPageCustomizedUiSupport.h" +extern FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate; + /** Customize menus in the page. @@ -129,4 +132,14 @@ UiCustomizeFrontPageBanner ( IN OUT EFI_STRING *BannerStr ) { + if ((LineIndex == 5) && LeftOrRight) { + // Update STR_CUSTOMIZE_BANNER_LINE5_LEFT + if (PcdGetBool(PcdTestKeyUsed)) { + if (BannerStr != NULL) { + FreePool(*BannerStr); + } + *BannerStr = HiiGetString(gFrontPagePrivate.HiiHandle, STRING_TOKEN(STR_TEST_KEY_USED), NULL); + } + } + return; } diff --git a/MdeModulePkg/Application/UiApp/FrontPageStrings.uni b/MdeModulePkg/Application/UiApp/FrontPageStrings.uni index 71cb788..8080a20 100644 --- a/MdeModulePkg/Application/UiApp/FrontPageStrings.uni +++ b/MdeModulePkg/Application/UiApp/FrontPageStrings.uni @@ -2,7 +2,7 @@ // // String definitions for BdsPlatform formset. // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -68,5 +68,7 @@ #language fr-FR "" #string STR_CUSTOMIZE_BANNER_LINE5_RIGHT #language en-US "" #language fr-FR "" +#string STR_TEST_KEY_USED #language en-US "WARNING: Test key detected." + #language fr-FR "WARNING: Test key detected." #string STR_NULL_STRING #language en-US " " #language fr-FR " " diff --git a/MdeModulePkg/Application/UiApp/UiApp.inf b/MdeModulePkg/Application/UiApp/UiApp.inf index 6df6e47..d144462 100644 --- a/MdeModulePkg/Application/UiApp/UiApp.inf +++ b/MdeModulePkg/Application/UiApp/UiApp.inf @@ -1,7 +1,7 @@ ## @file # UiApp module is driver for BDS phase. # -# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -82,6 +82,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES [UserExtensions.TianoCore."ExtraFiles"] UiAppExtra.uni -- 2.7.4.windows.1