From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.129]) by mx.groups.io with SMTP id smtpd.web10.33504.1681897784228216153 for ; Wed, 19 Apr 2023 02:49:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=vVJxRq70; spf=pass (domain: os.amperecomputing.com, ip: 40.107.237.129, mailfrom: tinhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Leu/rzXPhJe5MJtKaz5lgDRD2DqX138vDqIBdNKhDmkYNkzl+zDbrtAQ85AErCI7kQjseXFU51CFtftIHD4CLGTRu2z3XXKN/IDLTZddvqC1H96d7bfoydGCbDnPKXN7Shuc8aMn4ziHIOC+ikZI/6eszyTjH4W948N+I9RSqzQJgj3c/xlyKakp2ddnY4uWyBmLvRe5dQHBWcf++BsuMsPn1Hx/uIS0GtUzUPbYX5ypw0aIMZvd9Y1/ZrDPTPRiGZH/WuqEYCvzqu6ry4Q9XDhdHbFRHr7FmcOspW7Urwn5SrjJ7mc4E4JGd1RaSFr6EdENYx6fcdz8Hb9QSk+D0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aQHX8OAxftJouHEgUTCgFUfetgqFysLjaNOkV1r/CN4=; b=WTUIP2L0TXpQXgxxeEx8qO8M5PQ0CsPJquhREwIVd+WEyPKrIHQBm26RzINuwwooQVCXsd03SPgTFKNveceDTHSBUk0Qo+Za1ynIsKlA6MbjmTXgDiyBRqOyyaHUNm4kZV5lAAta8CSPAH8Z8QuQGR65qYsikWxMVhoL2xh4xAqSH/Si9SJQ44PDZKC2i7zdwPOLAO3/kB9ScLwmF1FwfWzHieqiROwK/zc7H0wX429W+wPp/dh1jlIJFdfk/T11D6Oa5O7PCUDyy8Oer3QuU22cH+vyEql9KlcuBi3Kjxp7eC3QtVKsVYa2Xe4Q81UkOjLFk/tCFHnyl+ANmHMe+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aQHX8OAxftJouHEgUTCgFUfetgqFysLjaNOkV1r/CN4=; b=vVJxRq70CqDWgLcauP30l5j+UaOToemJ19a02aTT76FzIfC2fgR8SA3riCE5QkDrLaHHDMawwwzfQdijJQh2pvnNmrtbQTJhOLhd2PqqQRmFAFqeXb2RSYt37vLL/tXBkqXsDqnfvNfL0Xl2HAyEnqu1fesoHYBtleDdpVt0KWo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from DM5PR0102MB3336.prod.exchangelabs.com (2603:10b6:4:9f::11) by DM6PR01MB4491.prod.exchangelabs.com (2603:10b6:5:32::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20; Wed, 19 Apr 2023 09:49:40 +0000 Received: from DM5PR0102MB3336.prod.exchangelabs.com ([fe80::bb9e:46d1:ae4b:caf2]) by DM5PR0102MB3336.prod.exchangelabs.com ([fe80::bb9e:46d1:ae4b:caf2%6]) with mapi id 15.20.6319.020; Wed, 19 Apr 2023 09:49:40 +0000 Message-ID: Date: Wed, 19 Apr 2023 16:49:30 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 From: "Tinh Nguyen" Subject: =?UTF-8?B?UmU6IOWbnuWkjTogWyAqKiBTUEFNTUFJTCAqKiBdUmU6IFtlZGsyLWRldmVsXSBbZWRrMl1bUEFUQ0ggdjIgMS8xXSBNZGVNb2R1bGVQa2c6IEFkZCBFREtJSSBQbGF0Zm9ybSBCb290IE1hbmFnZXIgUHJvdG9jb2wgdjI=?= To: gaoliming , devel@edk2.groups.io, tinhnguyen@os.amperecomputing.com, "'Ni, Ray'" , rebecca@bsdio.com, quic_llindhol@quicinc.com CC: patches@amperecomputing.com, nhi@os.amperecomputing.com, chuong@os.amperecomputing.com, minhnguyen@os.amperecomputing.com, "'Wang, Jian J'" , "'Gao, Zhichao'" , rebecca@bsdio.com References: <17534AB488BFDAF9.3977@groups.io> <016701d9726e$a2bd8a40$e8389ec0$@byosoft.com.cn> In-Reply-To: <016701d9726e$a2bd8a40$e8389ec0$@byosoft.com.cn> X-ClientProxiedBy: SI2P153CA0025.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::12) To DM5PR0102MB3336.prod.exchangelabs.com (2603:10b6:4:9f::11) Return-Path: tinhnguyen@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR0102MB3336:EE_|DM6PR01MB4491:EE_ X-MS-Office365-Filtering-Correlation-Id: b4a5925b-fd4e-4c12-c10d-08db40bb64c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jQLYNpl+4FCyS4tC19rE5aePMPpBq0fA4+VrtngWiq5EnI6qHY5n6elb1mMVLnjfZf9UyAajfRzgyPxUQ6+5bO2aSwqJwcjnoF/81cJqA4/VNjbrsciuu5xQ7Orx12PvGMoJyvjfEaUQCVRStfjGFdRoJ7+c99dv3AWV9ZLLhepNiAnGNmpaUnDUY4XQN4NB+usXe+iX/WGH3Qi/I+Qhx31QxtuFuFiYGogjtfZLevJSKSZLoUMZTjBt82FqxwJ0yx+6zPsTvxlb7d6rARAAftMQi89Zs3ekDntJrJ7VFMqmAAs87ppTFsAS6udb3HjfATNEHb9XDcSxElxMlzb2mBUh+9Ni7uJG7PGhWCNTmEgb4QcQcfk2UCIew+UXssFQVwK86g5/K+0m8S4txiqv0B7vWi2LQienQpxQDiJajsyMxDNWfBfxM4UFHjyMMS88poAGRl3KdGxkLWuZ14NsWgrAMqykEt3qCLeYj8nsIGfVUgYN+7KQjp8X/Wk6NSTdVErG301sA7Rl0NoBMPfgRHdID4jC61cOqYgJUjAb/lP9bbZmXHEQUa3WrV4kQ7OvjS9Vuv0aaeItyn/W2xnEuOXXnXgK5Zqf/PXhJF0hJETKSgni2XVedP90HacBT8uCkEtDjV7blTT/B2ptKT2UBA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3336.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(39850400004)(136003)(376002)(366004)(451199021)(66899021)(2616005)(186003)(224303003)(478600001)(2906002)(6486002)(6666004)(52116002)(110136005)(4326008)(83170400001)(66946007)(66556008)(66476007)(38350700002)(8936002)(38100700002)(316002)(5660300002)(83380400001)(54906003)(41300700001)(31686004)(6512007)(6506007)(26005)(53546011)(42882007)(966005)(31696002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rNsgG+JqrgXJBNEsx1E8rKBNZqUctkPkFwfnwKMaua++SaOihI3F0tOE9dEO?= =?us-ascii?Q?Fmot+kWi+0ShwWqSAa3wiCyyF6EcnBGPTK5ct8EcTYuaDigvJQL6MVqtIsWQ?= =?us-ascii?Q?3NAwjDiL6d7TCZt5zlYpuAb/Ogs8CC/1b/PYpHVtXaUn4lFM7VLK4cq0+A1Z?= =?us-ascii?Q?UdXivmEX1Dlj8Z4r0qAAIaUMjs25HUvMKOktpYEZB9KHlw2YKWba9MvZWd1J?= =?us-ascii?Q?PyoDqNu9VgXCGc4wxjwD6DGjiWNIMWOCCou5TBPnZ1B9S6LnB57hcJfEP3G/?= =?us-ascii?Q?pedUB1iCFiIPdIgCmSkpzozR2i00Y3K5ENqBMKBQzJcj6rPmLSjYRNDBHW02?= =?us-ascii?Q?3/+JR75BQ6VOoJ042lU0sOL/oDVGXGJsV7cPJA4gDSrmXRtyUFfiCkYm8HGM?= =?us-ascii?Q?dZ8bWr6A/lmEkT7nxvP7SlJ68hdsmfoPHIMXMK66ib7Th+khICUu4E/vjTHF?= =?us-ascii?Q?UF/J/0y+eYAYReVUNgB7FUPTa3AMFfNoqTRZ3ONo74B5sN8966tEDQqjHNdv?= =?us-ascii?Q?Z0Fug+brInSB+34PCSX+pBXdb2/L1HMIGljyMfZxc9S0kMjp0ABaSqMs7Dhv?= =?us-ascii?Q?d5+ivtI38+L37b7+fTGW7ddhQcaEALJ12h1LtLh+CdexDRwAncHBjxkRe8qk?= =?us-ascii?Q?XxfZ/CebLwG1WrUoL80pG+EZZbdke/k1FrevdobGPFvjiIwjd+GnDCs+Q2JX?= =?us-ascii?Q?5uwuKhyRbD2SxBgIM2wFxwDWXJL8ojtgDhX4JnEjoIJLx1tiGv427uPG6kLT?= =?us-ascii?Q?a/XcbnYdVL+mVM0GvNUaTnVnEO9J0W2sO9w577YnStl6fmiJUMR9Zr+xiSkj?= =?us-ascii?Q?/+x4ACI3F50YE4oEguLG8qDymft+5rcN+7Xxy0ng7SpyWFSo9lONqrSKuo52?= =?us-ascii?Q?dadtFnQ5kMIWgD1gT4N9DAdvGxTVUTGSsfnZQBXUgFpiuneKtUCgBoxSo2iR?= =?us-ascii?Q?v99vYw2ryn8PvX6SMZoAXQWrYsCOKFXG/lbfbIgXdEU77npLKb1a4NgOkGIw?= =?us-ascii?Q?w7GjNQbekdXWL/cc9onjeusC3WYWXQEEN0SES6KlQidgDDeAQ4eocFCxqDTx?= =?us-ascii?Q?qubvuVsfrWxHbniaUMhqaXgqzzq6vdiF3XBfFBFZv3KkGjS20kjSeXgWFNfH?= =?us-ascii?Q?bBycRtQgeDMCAJ/tAnzYF0WZPk5r2LgDVDkhX01TkkkbUIOLhsc9shGWYSEh?= =?us-ascii?Q?1w6K/8HXVPRKrnGGwkE/lmZO25Ll7bUUUJzuhQeZVkIDzOarsxdRjPY0PlgY?= =?us-ascii?Q?8tBz5Nn5gYBIqWRRzcXQm968sLhMWgP/JIDYhBt08pYNBtQIx9KB8bENbp46?= =?us-ascii?Q?yJvcU5p86x7hdLUnGFGsdF+0zM6k+4XB2c6G+WPt9ZE9gYw/9NkaiKAIzG8T?= =?us-ascii?Q?C5bufruw08OniXek2teUXcIt4Epwp0fyFwVASBpFs/VHXeirstybOylzlMb0?= =?us-ascii?Q?KxcF4jonqupsg6rcEafrO5SHQ/V8iZutvXlaAcgEtgIWaNeYzfiGbt1/Jmfo?= =?us-ascii?Q?SUfuffVF2SJTcNt7Dr8YicCsjdiwykSlL8PrWaPJRQUX2e329yan063bcffU?= =?us-ascii?Q?wrYIZXsPNZqHbshlJruRrA2Q7QTx61V/be0OgjV8+4c8FvfZWyaIDQnpwKQb?= =?us-ascii?Q?rimDOxSOasIgz+iFuNkiZJQ=3D?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4a5925b-fd4e-4c12-c10d-08db40bb64c6 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3336.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2023 09:49:40.0986 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6r1Z4VREPbqwoT05Q1SBSD+koO3OchOGmUby05dwglUCSB9713KCIzDjHuk3daBoBsml/KqT+9QCRDv6D+Krn4fTtwdU1idETKUiWFTAq3nYflyvWyOlNGxfl/k+3+Th X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB4491 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable + Leif, as the maintainer of ARM Platforms Hi Liming, I think about it, too. But like I said with Ray (in private mail) "I did=20 not put it in PlatformBootManagerLib because this library is being=20 generalized by Arm and not every Arm platform needs to change the BootOrder. By modifying this=20 protocol, we can avoid affecting existing platforms and ensure that the=20 boot order is sorted every time we call RefreshBootOption." Let's check the code, to use EfiBootManagerSortLoadOptionVariable(),=20 platform must provide the CompareFunction(). How does=20 https://github.com/tianocore/edk2/blob/master/ArmPkg/Library/PlatformBootMa= nagerLib/PlatformBm.c=20 provide a hook "CompareFunction" for platforms? 1. Library: all Arm-platforms that are currently use=20 PlatformBootManagerLib need modify 2. Protocol: I don't think it is a good idea for Arm introducing new=20 protocol for BDS phase, which is very specific for Arm. Liming, I think this change is just a minor change. That provides=20 another way to help platforms modify DriverOrder/BootOrder, doesn=E2=80=99t= =20 break the old design or break the old platforms Leif, would you mind sharing your idea about it. Can we introduce a new=20 library in ArmPkg to modify DriverOrder/BootOrder? Regards, Tinh Nguyen On 19/04/2023 10:25, gaoliming wrote: > Tinh: > By design, EfiBootManagerRefreshAllBootOption() is used to find the ava= ilable boot options; EfiBootManagerSortLoadOptionVariable() is used to sort= the boot option order. They are both called in PlatformBootManagerLib. So,= I think you should handle this issue in PlatformBootManagerLib. > > Thanks > Liming >> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- >> =E5=8F=91=E4=BB=B6=E4=BA=BA:devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Tinh Nguyen >> via groups.io >> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B44=E6=9C=8818=E6=97=A5= 12:25 >> =E6=94=B6=E4=BB=B6=E4=BA=BA: Ni, Ray;devel@edk2.groups= .io; >> tinhnguyen@os.amperecomputing.com >> =E6=8A=84=E9=80=81:patches@amperecomputing.com;nhi@os.amperecomputing.co= m; >> chuong@os.amperecomputing.com;minhnguyen@os.amperecomputing.com; >> Wang, Jian J; Gao, Liming >> ; Gao, Zhichao; >> rebecca@bsdio.com >> =E4=B8=BB=E9=A2=98: [ ** SPAMMAIL ** ]Re: [edk2-devel] [edk2][PATCH v2 1= /1] >> MdeModulePkg: Add EDKII Platform Boot Manager Protocol v2 >> >> Hi Ray, >> >> Many thanks for your feedback. >> >> Yes, but it is just for Boot Options that are automatically created by >> BDS. If users/OS input 2, 3, 4 =E2=80=A6 boot options without option dat= a >> (mBmAutoCreateBootOptionGuid), the RefreshAllBootOptions() API should >> not modify/delete them, right? Users will be confused when their Boot >> Options change. And I also cannot sort them. >> >> And the RefreshAllBootOptions() API just provides a Boot Options List; >> it doesn=E2=80=99t directly write those to NVRAM. BDS has its rules and = then >> selects a Boot option from that list to write into NVRAM. >> After BDS has done its work, we can confirm what exact boot options we >> have. This is a suitable time to sort the Boot Options and write this >> sorting to the BootOrder. >> >> Another aspect is that trying to put everything into the >> RefreshAllBootOptions() API makes this function very complex and hard to >> maintain. >> >> Please, let me know your idea. >> >> Thanks >> >> -Tinh >> >> >> On 4/18/2023 8:24 AM, Ni, Ray wrote: >>> RefreshAllBootOptions() API internally can keep an ordering rule so tha= t >> platform-level-higher-priority boot options are before >>> those platform-level-lower-priority options. >>> >>> So, that means, you could only change RefreshAllOptions() implementatio= n >> to control the order without adding a new API. >>> Thanks, >>> ray >>> >>>> -----Original Message----- >>>> From:devel@edk2.groups.io On Behalf Of Tinh >>>> Nguyen via groups.io >>>> Sent: Tuesday, April 11, 2023 1:35 AM >>>> To:devel@edk2.groups.io;tinhnguyen@os.amperecomputing.com >>>> Cc:patches@amperecomputing.com;nhi@os.amperecomputing.com; >>>> chuong@os.amperecomputing.com; >>>> minhnguyen@os.amperecomputing.com; Wang, Jian J >>>> ; Gao, Liming; Gao, >>>> Zhichao; Ni, Ray; >>>> rebecca@bsdio.com >>>> Subject: Re: [edk2-devel] [edk2][PATCH v2 1/1] MdeModulePkg: Add EDKII >>>> Platform Boot Manager Protocol v2 >>>> >>>> Gentle ping, I=E2=80=99m looking for some feedback on this patch. Coul= d someone >>>> please help me to review it? >>>> >>>> On 4/6/2023 3:19 PM, Tinh Nguyen via groups.io wrote: >>>>> This introduces the >>>> EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION2, >>>>> which adds a new UpdateBootOrder() function to support customizing >>>>> the boot options order according to the platform-specific policy. >>>>> >>>>> Signed-off-by: Tinh Nguyen >>>>> --- >>>>> >>>>> Changes since v1: Correct the format of the email. >>>>> >>>>> MdeModulePkg/Include/Protocol/PlatformBootManager.h | 24 >>>> +++++++++++++++++++- >>>>> MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 9 >> ++++++++ >>>>> 2 files changed, 32 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/MdeModulePkg/Include/Protocol/PlatformBootManager.h >>>> b/MdeModulePkg/Include/Protocol/PlatformBootManager.h >>>>> index e527b0ee0eaf..758bc2deb774 100644 >>>>> --- a/MdeModulePkg/Include/Protocol/PlatformBootManager.h >>>>> +++ b/MdeModulePkg/Include/Protocol/PlatformBootManager.h >>>>> @@ -1,6 +1,7 @@ >>>>> /** @file >>>>> >>>>> Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. >>>>> + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>>>>> >>>>> SPDX-License-Identifier: BSD-2-Clause-Patent >>>>> >>>>> @@ -29,7 +30,8 @@ typedef struct >>>> _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL >>>> EDKII_PLATFORM_BOOT_MANAGER >>>>> // All future revisions must be backwards compatible. >>>>> // If a future version is not back wards compatible it i= s >> not the same >>>> GUID. >>>>> // >>>>> -#define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION >>>> 0x00000001 >>>>> +#define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION >>>> 0x00000001 >>>>> +#define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION2 >>>> 0x00000002 >>>>> // >>>>> // Function Prototypes >>>>> @@ -72,9 +74,29 @@ EFI_STATUS >>>>> OUT UINTN >> *UpdatedBootOptionsCount >>>>> ); >>>>> >>>>> +/** >>>>> + This function allows platform to update the DriverOrder/BootOrder >>>> variables. >>>>> + And it is available from version 2 of the EDKII Platform Boot Mana= ger >>>> protocol. >>>>> + >>>>> + @retval EFI_SUCCESS Platform successfully modifies >>>>> + the DriverOrder/BootOrder variables as >> wanted. >>>>> + @retval Others There are some errors that happen. Check >> the status >>>> code >>>>> + for details. >>>>> + >>>>> +**/ >>>>> +typedef >>>>> +EFI_STATUS >>>>> +(EFIAPI *PLATFORM_BOOT_MANAGER_UPDATE_BOOT_ORDER)( >>>>> + IN VOID >>>>> + ); >>>>> + >>>>> struct _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL { >>>>> UINT64 >> Revision; >>>>> PLATFORM_BOOT_MANAGER_REFRESH_ALL_BOOT_OPTIONS >>>> RefreshAllBootOptions; >>>>> + // >>>>> + // EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION2 >>>>> + // >>>>> + PLATFORM_BOOT_MANAGER_UPDATE_BOOT_ORDER >>>> UpdateBootOrder; >>>>> }; >>>>> >>>>> extern EFI_GUID gEdkiiPlatformBootManagerProtocolGuid; >>>>> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >>>> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >>>>> index bde22fa6590e..67d1d54b3c24 100644 >>>>> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >>>>> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >>>>> @@ -4,6 +4,7 @@ >>>>> Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. >>>>> Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved= .
>>>>> (C) Copyright 2015-2021 Hewlett Packard Enterprise Development >> LP
>>>>> +Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>>>>> SPDX-License-Identifier: BSD-2-Clause-Patent >>>>> >>>>> **/ >>>>> @@ -2412,6 +2413,8 @@ EfiBootManagerRefreshAllBootOption ( >>>>> BootOptions =3D UpdatedBootOptions; >>>>> BootOptionCount =3D UpdatedBootOptionCount; >>>>> } >>>>> + } else { >>>>> + PlatformBootManager =3D NULL; >>>>> } >>>>> >>>>> NvBootOptions =3D EfiBootManagerGetLoadOptions >>>> (&NvBootOptionCount, LoadOptionTypeBoot); >>>>> @@ -2453,6 +2456,12 @@ EfiBootManagerRefreshAllBootOption ( >>>>> >>>>> EfiBootManagerFreeLoadOptions (BootOptions, >> BootOptionCount); >>>>> EfiBootManagerFreeLoadOptions (NvBootOptions, >> NvBootOptionCount); >>>>> + >>>>> + if ((PlatformBootManager !=3D NULL) && >>>>> + (PlatformBootManager->Revision >=3D >>>> EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION2)) >>>>> + { >>>>> + PlatformBootManager->UpdateBootOrder (); >>>>> + } >>>>> } >>>>> >>>>> /** >>>>> -- >>>>> 2.40.0 >>>>> >>>>> >>>>> >>>>> >>>>> >>=20 >>