]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/BdsDxe: Move display of test key usage into BDS module
authorKinney, Michael D <michael.d.kinney@intel.com>
Wed, 21 Mar 2018 02:34:55 +0000 (19:34 -0700)
committerKinney, Michael D <michael.d.kinney@intel.com>
Thu, 2 Aug 2018 22:01:36 +0000 (15:01 -0700)
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>
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
MdeModulePkg/Universal/BdsDxe/BdsEntry.c

index 7e644aa99595631e1a5e787f8a18113e6a0d07b5..7030d67907a5028daf1fa2d53b92c2805afdaad1 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision                  ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand              ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable              ## SOMETIMES_CONSUMES\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed                       ## CONSUMES\r
 \r
 [Depex]\r
   TRUE\r
index a25663ea43e39533908bfe2d454e8f51c5f0f898..8946d79ab2d9676c5ad858e3341467cefcf39248 100644 (file)
@@ -884,6 +884,18 @@ BdsEntry (
   PERF_INMODULE_BEGIN("PlatformBootManagerAfterConsole");\r
   PlatformBootManagerAfterConsole ();\r
   PERF_INMODULE_END("PlatformBootManagerAfterConsole");\r
+\r
+  //\r
+  // If any component set PcdTestKeyUsed to TRUE because use of a test key\r
+  // was detected, then display a warning message on the debug log and the console\r
+  //\r
+  if (PcdGetBool (PcdTestKeyUsed)) {\r
+    DEBUG ((DEBUG_ERROR, "**********************************\n"));\r
+    DEBUG ((DEBUG_ERROR, "**  WARNING: Test Key is used.  **\n"));\r
+    DEBUG ((DEBUG_ERROR, "**********************************\n"));\r
+    Print (L"**  WARNING: Test Key is used.  **\n");\r
+  }\r
+\r
   //\r
   // Boot to Boot Manager Menu when EFI_OS_INDICATIONS_BOOT_TO_FW_UI is set. Skip HotkeyBoot\r
   //\r