summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinney, Michael D <michael.d.kinney@intel.com>2018-03-20 19:34:55 -0700
committerStar Zeng <star.zeng@intel.com>2018-08-03 08:10:21 +0800
commit83131575bef5d18e7c1acd7b8f8ee9095cbb4bb4 (patch)
treee00b3c31195236707e83d2e1e959fe36363794be
parent8baa5fb44a4fc3525e82977d4c7cd51ac3b80ab2 (diff)
downloadedk2-83131575bef5d18e7c1acd7b8f8ee9095cbb4bb4.tar.gz
MdeModulePkg/BdsDxe: Move display of test key usage into BDS module
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit 6fb8b96d9bab1281f02081a1871379f771edc0f1) # Conflicts: # MdeModulePkg/Universal/BdsDxe/BdsEntry.c
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsDxe.inf1
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsEntry.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
index b8c5aa9795..5981b86a38 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -100,6 +100,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES
[Depex]
TRUE
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 3191a98630..91b8acba11 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -933,6 +933,18 @@ BdsEntry (
PERF_START (NULL, "PlatformBootManagerAfterConsole", "BDS", 0);
PlatformBootManagerAfterConsole ();
PERF_END (NULL, "PlatformBootManagerAfterConsole", "BDS", 0);
+
+ //
+ // 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)) {
+ 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 set. Skip HotkeyBoot
//