]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/BdsDxe: Fix PlatformRecovery issue
authorSunny Wang <sunnywang@hpe.com>
Wed, 16 Oct 2019 09:19:22 +0000 (17:19 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Wed, 30 Oct 2019 05:34:07 +0000 (13:34 +0800)
For now, PlatformRecovery doesn't work if OsIndications variable
doesn't exist, which is wrong.
According to the UEFI specification section 3.4.1 and 3.4.2, if
processing of BootOrder does not result in success, the OsRecovery
and PlatformRecovery options should still be processed regardless of
the existence of the OsIndications variable.
Therefore, update the code to check PcdPlatformRecoverySupport instead
of the value of OsIndications variable (PlatformRecovery) to fix
this issue.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Walon Li <walon.li@hpe.com>
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Acked-by: Jian J Wang <jian.j.wang@intel.com>
MdeModulePkg/Universal/BdsDxe/BdsEntry.c

index d6ec31118c1ffd87e37fb0a6430a98b97ddbd1c4..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
@@ -1069,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