From b15646484eaffcf7cc464fdea0214498f26addc2 Mon Sep 17 00:00:00 2001 From: Sunny Wang Date: Wed, 16 Oct 2019 17:19:22 +0800 Subject: [PATCH] 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 Cc: Hao Wu Cc: Ray Ni Cc: Zhichao Gao Cc: Walon Li Signed-off-by: Sunny Wang Reviewed-by: Ray Ni Reviewed-by: Zhichao Gao Acked-by: Jian J Wang --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 4 ++-- 1 file 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.
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP
+(C) Copyright 2016-2019 Hewlett Packard Enterprise Development LP
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
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);