]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/BdsDxe/BdsEntry.c
MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586)
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / BdsEntry.c
index 7968a58f3454dd6a19c9dac049ea4cbc7e7a08e8..d387dbe7ac12566049d0834e51fd1fd5e190aff8 100644 (file)
@@ -6,7 +6,7 @@
   to enter BDS phase.\r
 \r
 Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>\r
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
+(C) Copyright 2016-2019 Hewlett Packard Enterprise Development LP<BR>\r
 (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -341,7 +341,17 @@ BdsWait (
       TimeoutRemain--;\r
     }\r
   }\r
-  PlatformBootManagerWaitCallback (0);\r
+\r
+  //\r
+  // If the platform configured a nonzero and finite time-out, and we have\r
+  // actually reached that, report 100% completion to the platform.\r
+  //\r
+  // Note that the (TimeoutRemain == 0) condition excludes\r
+  // PcdPlatformBootTimeOut=0xFFFF, and that's deliberate.\r
+  //\r
+  if (PcdGet16 (PcdPlatformBootTimeOut) != 0 && TimeoutRemain == 0) {\r
+    PlatformBootManagerWaitCallback (0);\r
+  }\r
   DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n"));\r
 }\r
 \r
@@ -1059,7 +1069,7 @@ BdsEntry (
   }\r
 \r
   if (!BootSuccess) {\r
-    if (PlatformRecovery) {\r
+    if (PcdGetBool (PcdPlatformRecoverySupport)) {\r
       LoadOptions = EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOptionTypePlatformRecovery);\r
       ProcessLoadOptions (LoadOptions, LoadOptionCount);\r
       EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount);\r