summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/BdsDxe
diff options
context:
space:
mode:
authorKinney, Michael D <michael.d.kinney@intel.com>2018-03-20 19:34:55 -0700
committerKinney, Michael D <michael.d.kinney@intel.com>2018-08-02 15:01:36 -0700
commit6fb8b96d9bab1281f02081a1871379f771edc0f1 (patch)
tree059e0417c3a4562994dea49746971ea37e3554d9 /MdeModulePkg/Universal/BdsDxe
parent4d0f2dce76703ddf75fc5b3e58724f504140b624 (diff)
downloadedk2-6fb8b96d9bab1281f02081a1871379f771edc0f1.tar.gz
edk2-6fb8b96d9bab1281f02081a1871379f771edc0f1.tar.bz2
edk2-6fb8b96d9bab1281f02081a1871379f771edc0f1.zip
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>
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe')
-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 7e644aa995..7030d67907 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 a25663ea43..8946d79ab2 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)) {
+ 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
//