summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorSunny Wang <sunnywang@hpe.com>2019-10-16 17:19:22 +0800
committerJian J Wang <jian.j.wang@intel.com>2019-10-30 13:34:07 +0800
commitb15646484eaffcf7cc464fdea0214498f26addc2 (patch)
tree65f6637a9c7fd035b1197ed4b5f194af5f348d41 /MdeModulePkg/Universal
parent9f4fbd56d43054cc73d722c1643659f9741c0fcf (diff)
downloadedk2-b15646484eaffcf7cc464fdea0214498f26addc2.tar.gz
edk2-b15646484eaffcf7cc464fdea0214498f26addc2.tar.bz2
edk2-b15646484eaffcf7cc464fdea0214498f26addc2.zip
MdeModulePkg/BdsDxe: Fix PlatformRecovery issue
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>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BdsEntry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index d6ec31118c..d387dbe7ac 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -6,7 +6,7 @@
to enter BDS phase.
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+(C) Copyright 2016-2019 Hewlett Packard Enterprise Development LP<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -1069,7 +1069,7 @@ BdsEntry (
}
if (!BootSuccess) {
- if (PlatformRecovery) {
+ if (PcdGetBool (PcdPlatformRecoverySupport)) {
LoadOptions = EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOptionTypePlatformRecovery);
ProcessLoadOptions (LoadOptions, LoadOptionCount);
EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount);