From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx.groups.io with SMTP id smtpd.web11.145675.1680735909738973043 for ; Wed, 05 Apr 2023 16:05:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=fm3 header.b=aJWSQqrk; spf=pass (domain: bsdio.com, ip: 66.111.4.25, mailfrom: rebecca@bsdio.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 09EAD5C0170; Wed, 5 Apr 2023 19:05:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 05 Apr 2023 19:05:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1680735909; x=1680822309; bh=xcK44iqgAexULmw7yer8tDxyoKhnGkCiG++ qj5UQ2+c=; b=aJWSQqrkUPJ6fuGe0Bhb97BUwOAOTUIZ5Me1CXMo6VhT9gnb/hi eURKL/iaYNK8cORX0V9cXZGqHDh5cdY4yKVqEh7rAwN09pG2HuwJjB3aplhEoBUW EKRPUIVTvImdyDcqcgzY6ovoToKQ8v58Rgh2gTslWrqrriu4sQXMst5K72sK1RaW QLsN7dktolvhEBaammUjmoV06mUOpm5x5G0CiONt2OSQTLrBpr1B+2x80cZhRehr EA8Bese8TjKalYOdXsPS+jsopedSznSuG+SjySEugqEclNstgZzvOm/L0wdDSJFP ZG75J8gZmQLug9OoSUOj2d6r2lL1G059RfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680735909; x=1680822309; bh=xcK44iqgAexULmw7yer8tDxyoKhnGkCiG++ qj5UQ2+c=; b=XOuL6lhzAs8KJxb1Ceycv7nhgHcbg0F/z/Y2ZQ/SFpAabqiNtZI TRTqHxnmBuT50zSKR61fEY8Vtk32jzgihKtbcjv4ZRuQGLG/hEeMEvB17kTLXzJe oqN5+XYMRhTfHazxMAIc+DgVsJvt1tMubDP0huy6pHS97Ac2zX+dSmQwGikIid+c eQMPjMDujIgVhbFuTQQvZcVIz6bdcZ/5NfnmTXbNOtwbe6xrun1CoJ7HW9kdlqg3 /tnY1uF5LIZyIPUS6jf5BulUoxSYwb7SWxW/Viow8cjvStYVTQlUp2exoVIhrHIi MIA/4ZuSZfq38j9sMxRMleY3xNJfZmuzGpw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejvddgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomheptfgvsggvtggtrgcuvehrrghnuceorhgvsggvtggtrges sghsughiohdrtghomheqnecuggftrfgrthhtvghrnhepteegjefgfeffleeftdelheefue fhuedtffeuudfhjeetuddvkeevkeetfedvleeknecuffhomhgrihhnpehgrhhouhhpshdr ihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Apr 2023 19:05:07 -0400 (EDT) Message-ID: <9edc0d2e-a980-4e54-975e-ad0134182668@bsdio.com> Date: Wed, 5 Apr 2023 17:05:06 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [edk2-devel] [edk2][PATCH 1/1] MdeModulePkg: Add EDKII Platform Boot Manager Protocol v2 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, jian.j.wang@intel.com, gaoliming@byosoft.com.cn, zhichao.gao@intel.com, ray.ni@intel.com References: <20230405061133.307462-1-tinhnguyen@os.amperecomputing.com> From: "Rebecca Cran" In-Reply-To: <20230405061133.307462-1-tinhnguyen@os.amperecomputing.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Tinh, You appear to be sending emails in quoted-printable format, while we prefer them in 8bit encoding: quoted-printable causes issues such as equals signs being replaced with "=3D" in the plain text for example. Could you make sure you've run "python3 BaseTools/Scripts/SetupGit.py" for the repo please? It makes several additions to .git/config, including: [format]         coverLetter = True         numbered = True         signoff = False [sendemail]         chainreplyto = False         thread = True         transferEncoding = 8bit         to = devel@edk2.groups.io -- Rebecca Cran On 4/5/23 12:11 AM, 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 > --- > 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 is 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 Manager 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 = UpdatedBootOptions; > > BootOptionCount = UpdatedBootOptionCount; > > } > > + } else { > > + PlatformBootManager = NULL; > > } > > > > NvBootOptions = EfiBootManagerGetLoadOptions (&NvBootOptionCount, LoadOptionTypeBoot); > > @@ -2453,6 +2456,12 @@ EfiBootManagerRefreshAllBootOption ( > > > EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); > > EfiBootManagerFreeLoadOptions (NvBootOptions, NvBootOptionCount); > > + > > + if ((PlatformBootManager != NULL) && > > + (PlatformBootManager->Revision >= EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION2)) > > + { > > + PlatformBootManager->UpdateBootOrder (); > > + } > > } > > > > /** > > -- > 2.39.2 > > > > >