From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.2640.1571211672920526609 for ; Wed, 16 Oct 2019 00:41:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0192f9752e=sunnywang@hpe.com) Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9G7fBDj021166; Wed, 16 Oct 2019 07:41:11 GMT Received: from g2t2354.austin.hpe.com (g2t2354.austin.hpe.com [15.233.44.27]) by mx0a-002e3701.pphosted.com with ESMTP id 2vnwfn1h0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Oct 2019 07:41:11 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2354.austin.hpe.com (Postfix) with ESMTP id DC758A2; Wed, 16 Oct 2019 07:40:44 +0000 (UTC) Received: from HAC31CEDWY.asiapacific.hpqcorp.net (hac31cedwy.asiapacific.hpqcorp.net [10.76.8.171]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 331A439; Wed, 16 Oct 2019 07:40:42 +0000 (UTC) From: "Wang, Sunny (HPS SW)" To: devel@edk2.groups.io Cc: Sunny Wang , Ray Ni , Zhichao Gao , Walon Li Subject: [PATCH] MdeModulePkg/BdsDxe: Make PlatformRecovery work regardless of OsIndications Date: Wed, 16 Oct 2019 15:40:07 +0800 Message-Id: <20191016074007.17572-1-sunnywang@hpe.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-16_03:2019-10-15,2019-10-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 priorityscore=1501 mlxscore=0 suspectscore=1 mlxlogscore=356 impostorscore=0 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910160071 Content-Transfer-Encoding: 8bit According to the UEFI specification section 3.4.1 and 3.4.2, the OsRecovery and PlatformRecovery options should still be processed regardless of the value of OsIndications variable if processing of BootOrder does not result in success. Therefore, update the code to check PcdPlatformRecoverySupport instead of the value of OsIndications variable (PlatformRecovery). Cc: Ray Ni Cc: Zhichao Gao Cc: Walon Li Signed-off-by: Sunny 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); -- 2.21.0.windows.1