* [PATCH 0/2] Add a new structure for BootManagerMenu HOB and consume it
@ 2021-06-21 8:46 dun.tan
2021-06-21 8:46 ` [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB duntan
2021-06-21 8:46 ` [PATCH 2/2] UefiPayloadPkg: consume the " duntan
0 siblings, 2 replies; 6+ messages in thread
From: dun.tan @ 2021-06-21 8:46 UTC (permalink / raw)
To: devel
Add a new structure for BootManagerMenu HOB in UefiPayloadPkg
Then consume the BootManagerMenuFile HOB
duntan (2):
UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB
UefiPayloadPkg: consume the BootManagerMenuFile HOB
UefiPayloadPkg/Include/Guid/BootManagerMenu.h | 27 +++++++++++++++++++++++++++
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 5 ++++-
UefiPayloadPkg/UefiPayloadPkg.dec | 3 +++
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
5 files changed, 86 insertions(+), 2 deletions(-)
create mode 100644 UefiPayloadPkg/Include/Guid/BootManagerMenu.h
--
2.31.1.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB
2021-06-21 8:46 [PATCH 0/2] Add a new structure for BootManagerMenu HOB and consume it dun.tan
@ 2021-06-21 8:46 ` duntan
2021-06-22 22:57 ` Guo Dong
2021-06-21 8:46 ` [PATCH 2/2] UefiPayloadPkg: consume the " duntan
1 sibling, 1 reply; 6+ messages in thread
From: duntan @ 2021-06-21 8:46 UTC (permalink / raw)
To: devel; +Cc: Maurice Ma, Guo Dong, Benjamin You, DunTan
Add new structure for BootManagerMenuFile HOB in UefiPayloadPkg
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: DunTan <dun.tan@intel.com>
---
| 27 +++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 3 +++
2 files changed, 30 insertions(+)
--git a/UefiPayloadPkg/Include/Guid/BootManagerMenu.h b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
new file mode 100644
index 0000000000..10fb874640
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
@@ -0,0 +1,27 @@
+/** @file
+ Define the structure for the Boot Manager Menu File.
+
+Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
+#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ GUID FileName;
+} UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION 1
+
+extern GUID gUniversalPayloadBootManagerMenuFileGuid;
+#endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 105e1f5a1c..850592976d 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -29,6 +29,9 @@
#
gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
+ ##include/Guid/BootManagerMenu.h
+ gUniversalPayloadBootManagerMenuFileGuid = { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}
+
gUefiSystemTableInfoGuid = {0x16c8a6d0, 0xfe8a, 0x4082, {0xa2, 0x8, 0xcf, 0x89, 0xc4, 0x29, 0x4, 0x33}}
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] UefiPayloadPkg: consume the BootManagerMenuFile HOB
2021-06-21 8:46 [PATCH 0/2] Add a new structure for BootManagerMenu HOB and consume it dun.tan
2021-06-21 8:46 ` [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB duntan
@ 2021-06-21 8:46 ` duntan
2021-06-22 23:11 ` Guo Dong
1 sibling, 1 reply; 6+ messages in thread
From: duntan @ 2021-06-21 8:46 UTC (permalink / raw)
To: devel; +Cc: Maurice Ma, Guo Dong, Benjamin You, DunTan
Consume the BootManagerMenuFile HOB in PlatformBootManagerLib
This Lib is in UefiPayloadPkg
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: DunTan <dun.tan@intel.com>
---
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 5 ++++-
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
3 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index fce48d26a1..afd9664959 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -10,6 +10,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "PlatformBootManager.h"
#include "PlatformConsole.h"
#include <Protocol/PlatformBootManagerOverride.h>
+#include <Guid/BootManagerMenu.h>
+#include <Library/HobLib.h>
UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL *mUniversalPayloadPlatformBootManagerOverrideInstance = NULL;
@@ -286,3 +288,52 @@ PlatformBootManagerUnableToBoot (
return;
}
+/**
+ Get/update PcdBootManagerMenuFile from GUID HOB which will be assigned in bootloader.
+
+ @retval EFI_SUCCESS The entry point is executed successfully.
+ @retval other Some error occurs.
+
+**/
+EFI_STATUS
+EFIAPI
+PlatformBootManagerLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ EFI_STATUS Status;
+ UINTN Size;
+ VOID *GuidHob;
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader;
+ UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile;
+ Status = EFI_SUCCESS;
+ GuidHob = GetFirstGuidHob (&gUniversalPayloadBootManagerMenuFileGuid);
+ //
+ // Find the buffer information and update PCDs
+ //
+ if (GuidHob == NULL) {
+ //
+ // If the HOB is not create, the default value of PcdBootManagerMenuFile will be used.
+ //
+ return EFI_SUCCESS;
+ }
+
+ GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *) GET_GUID_HOB_DATA (GuidHob);
+ if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) {
+ return EFI_NOT_FOUND;
+ }
+ if (GenericHeader->Revision == UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION) {
+ BootManagerMenuFile = (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *) GET_GUID_HOB_DATA (GuidHob);
+ if (BootManagerMenuFile->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) {
+ return EFI_NOT_FOUND;
+ }
+ Size = sizeof (BootManagerMenuFile->FileName);
+ Status = PcdSetPtrS (PcdBootManagerMenuFile, &Size, &BootManagerMenuFile->FileName);
+ } else {
+ return EFI_NOT_FOUND;
+ }
+
+ ASSERT_EFI_ERROR (Status);
+ return EFI_SUCCESS;
+}
diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 600a535282..9c4943a0e0 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -13,7 +13,7 @@
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
-
+ CONSTRUCTOR = PlatformBootManagerLibConstructor
#
# The following information is for reference only and not required by the build tools.
@@ -46,9 +46,11 @@
HiiLib
PrintLib
PlatformHookLib
+ HobLib
[Guids]
gEfiEndOfDxeEventGroupGuid
+ gUniversalPayloadBootManagerMenuFileGuid
[Protocols]
gEfiGenericMemTestProtocolGuid ## CONSUMES
@@ -70,3 +72,4 @@
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 21b360256b..e46b867d30 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -289,7 +289,6 @@
!endif
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
!if $(SOURCE_DEBUG_ENABLE)
@@ -297,6 +296,7 @@
!endif
[PcdsPatchableInModule.common]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
!if $(SOURCE_DEBUG_ENABLE)
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB
2021-06-21 8:46 ` [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB duntan
@ 2021-06-22 22:57 ` Guo Dong
2021-06-23 2:15 ` [edk2-devel] " Ni, Ray
0 siblings, 1 reply; 6+ messages in thread
From: Guo Dong @ 2021-06-22 22:57 UTC (permalink / raw)
To: Tan, Dun, devel@edk2.groups.io; +Cc: Ma, Maurice, You, Benjamin
+ gUniversalPayloadBootManagerMenuFileGuid
Had better rename this guid to remove "UniversalPayload" from the name since this guid is not defined in universal payload specification.
Thanks,
Guo
> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Monday, June 21, 2021 1:47 AM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Tan,
> Dun <dun.tan@intel.com>
> Subject: [PATCH 1/2] UefiPayloadPkg: Add new structure for
> BootManagerMenuFile HOB
>
> Add new structure for BootManagerMenuFile HOB in UefiPayloadPkg
>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
>
> Signed-off-by: DunTan <dun.tan@intel.com>
> ---
> UefiPayloadPkg/Include/Guid/BootManagerMenu.h | 27
> +++++++++++++++++++++++++++
> UefiPayloadPkg/UefiPayloadPkg.dec | 3 +++
> 2 files changed, 30 insertions(+)
>
> diff --git a/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> new file mode 100644
> index 0000000000..10fb874640
> --- /dev/null
> +++ b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> @@ -0,0 +1,27 @@
> +/** @file
> + Define the structure for the Boot Manager Menu File.
> +
> +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
> +#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
> +
> +#include <Uefi.h>
> +#include <UniversalPayload/UniversalPayload.h>
> +
> +#pragma pack (1)
> +
> +typedef struct {
> + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
> + GUID FileName;
> +} UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU;
> +
> +#pragma pack()
> +
> +#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION 1
> +
> +extern GUID gUniversalPayloadBootManagerMenuFileGuid;
> +#endif
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec
> b/UefiPayloadPkg/UefiPayloadPkg.dec
> index 105e1f5a1c..850592976d 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dec
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dec
> @@ -29,6 +29,9 @@
> #
> gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63,
> 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
>
> + ##include/Guid/BootManagerMenu.h
> + gUniversalPayloadBootManagerMenuFileGuid = { 0xdf939333, 0x42fc,
> 0x4b2a, { 0xa5, 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}
> +
> gUefiSystemTableInfoGuid = {0x16c8a6d0, 0xfe8a, 0x4082, {0xa2, 0x8, 0xcf,
> 0x89, 0xc4, 0x29, 0x4, 0x33}}
> gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e,
> 0xf1, 0x10, 0x6, 0xd9, 0xf}}
> gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95,
> 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] UefiPayloadPkg: consume the BootManagerMenuFile HOB
2021-06-21 8:46 ` [PATCH 2/2] UefiPayloadPkg: consume the " duntan
@ 2021-06-22 23:11 ` Guo Dong
0 siblings, 0 replies; 6+ messages in thread
From: Guo Dong @ 2021-06-22 23:11 UTC (permalink / raw)
To: Tan, Dun, devel@edk2.groups.io; +Cc: Ma, Maurice, You, Benjamin
Please check the comments below.
> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Monday, June 21, 2021 1:47 AM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Tan,
> Dun <dun.tan@intel.com>
> Subject: [PATCH 2/2] UefiPayloadPkg: consume the BootManagerMenuFile
> HOB
>
> Consume the BootManagerMenuFile HOB in PlatformBootManagerLib
> This Lib is in UefiPayloadPkg
>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
>
> Signed-off-by: DunTan <dun.tan@intel.com>
> ---
> UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>
> UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.i
> nf | 5 ++++-
> UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
> 3 files changed, 56 insertions(+), 2 deletions(-)
>
> diff --git
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> index fce48d26a1..afd9664959 100644
> ---
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> +++
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
> @@ -10,6 +10,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> #include "PlatformBootManager.h"
> #include "PlatformConsole.h"
> #include <Protocol/PlatformBootManagerOverride.h>
> +#include <Guid/BootManagerMenu.h>
> +#include <Library/HobLib.h>
>
>
> UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCO
> L *mUniversalPayloadPlatformBootManagerOverrideInstance = NULL;
>
> @@ -286,3 +288,52 @@ PlatformBootManagerUnableToBoot (
> return;
> }
>
> +/**
> + Get/update PcdBootManagerMenuFile from GUID HOB which will be
> assigned in bootloader.
> +
> + @retval EFI_SUCCESS The entry point is executed successfully.
> + @retval other Some error occurs.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +PlatformBootManagerLibConstructor (
> + IN EFI_HANDLE ImageHandle,
> + IN EFI_SYSTEM_TABLE *SystemTable
> +)
> +{
> + EFI_STATUS Status;
> + UINTN Size;
> + VOID *GuidHob;
> + UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader;
> + UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU
> *BootManagerMenuFile;
> + Status = EFI_SUCCESS;
It looks the Status initialization was not necessary, please double check and remove it.
And please add function parameter description in function comments.
> + GuidHob = GetFirstGuidHob
> (&gUniversalPayloadBootManagerMenuFileGuid);
> + //
> + // Find the buffer information and update PCDs
> + //
> + if (GuidHob == NULL) {
> + //
> + // If the HOB is not create, the default value of PcdBootManagerMenuFile
> will be used.
> + //
> + return EFI_SUCCESS;
> + }
> +
It is more clear if moving the comment message " Find the buffer information and update PCDs" to here.
> + GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)
> GET_GUID_HOB_DATA (GuidHob);
> + if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) >
> GET_GUID_HOB_DATA_SIZE (GuidHob)) || (GenericHeader->Length >
> GET_GUID_HOB_DATA_SIZE (GuidHob))) {
> + return EFI_NOT_FOUND;
> + }
> + if (GenericHeader->Revision ==
> UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION) {
> + BootManagerMenuFile =
> (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *) GET_GUID_HOB_DATA
> (GuidHob);
> + if (BootManagerMenuFile->Header.Length <
> UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD
> (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) {
> + return EFI_NOT_FOUND;
> + }
> + Size = sizeof (BootManagerMenuFile->FileName);
> + Status = PcdSetPtrS (PcdBootManagerMenuFile, &Size,
> &BootManagerMenuFile->FileName);
> + } else {
> + return EFI_NOT_FOUND;
> + }
> +
> + ASSERT_EFI_ERROR (Status);
> + return EFI_SUCCESS;
> +}
> diff --git
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLi
> b.inf
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLi
> b.inf
> index 600a535282..9c4943a0e0 100644
> ---
> a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLi
> b.inf
> +++
> b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLi
> b.inf
> @@ -13,7 +13,7 @@
> MODULE_TYPE = DXE_DRIVER
> VERSION_STRING = 1.0
> LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
> -
> + CONSTRUCTOR = PlatformBootManagerLibConstructor
>
> #
> # The following information is for reference only and not required by the
> build tools.
> @@ -46,9 +46,11 @@
> HiiLib
> PrintLib
> PlatformHookLib
> + HobLib
>
> [Guids]
> gEfiEndOfDxeEventGroupGuid
> + gUniversalPayloadBootManagerMenuFileGuid
>
> [Protocols]
> gEfiGenericMemTestProtocolGuid ## CONSUMES
> @@ -70,3 +72,4 @@
> gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
> + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 21b360256b..e46b867d30 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -289,7 +289,6 @@
> !endif
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
> - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21,
> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66,
> 0x23, 0x31 }
>
>
> !if $(SOURCE_DEBUG_ENABLE)
> @@ -297,6 +296,7 @@
> !endif
>
> [PcdsPatchableInModule.common]
> + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21,
> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66,
> 0x23, 0x31 }
> gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
> !if $(SOURCE_DEBUG_ENABLE)
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB
2021-06-22 22:57 ` Guo Dong
@ 2021-06-23 2:15 ` Ni, Ray
0 siblings, 0 replies; 6+ messages in thread
From: Ni, Ray @ 2021-06-23 2:15 UTC (permalink / raw)
To: devel@edk2.groups.io, Dong, Guo, Tan, Dun; +Cc: Ma, Maurice, You, Benjamin
I agree. We can use gEdkiiBootManagerMenuFileGuid.
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo Dong
Sent: Wednesday, June 23, 2021 6:58 AM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB
+ gUniversalPayloadBootManagerMenuFileGuid
Had better rename this guid to remove "UniversalPayload" from the name since this guid is not defined in universal payload specification.
Thanks,
Guo
> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Monday, June 21, 2021 1:47 AM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Tan, Dun
> <dun.tan@intel.com>
> Subject: [PATCH 1/2] UefiPayloadPkg: Add new structure for
> BootManagerMenuFile HOB
>
> Add new structure for BootManagerMenuFile HOB in UefiPayloadPkg
>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
>
> Signed-off-by: DunTan <dun.tan@intel.com>
> ---
> UefiPayloadPkg/Include/Guid/BootManagerMenu.h | 27
> +++++++++++++++++++++++++++
> UefiPayloadPkg/UefiPayloadPkg.dec | 3 +++
> 2 files changed, 30 insertions(+)
>
> diff --git a/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> new file mode 100644
> index 0000000000..10fb874640
> --- /dev/null
> +++ b/UefiPayloadPkg/Include/Guid/BootManagerMenu.h
> @@ -0,0 +1,27 @@
> +/** @file
> + Define the structure for the Boot Manager Menu File.
> +
> +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
> +#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_H_
> +
> +#include <Uefi.h>
> +#include <UniversalPayload/UniversalPayload.h>
> +
> +#pragma pack (1)
> +
> +typedef struct {
> + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
> + GUID FileName;
> +} UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU;
> +
> +#pragma pack()
> +
> +#define UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION 1
> +
> +extern GUID gUniversalPayloadBootManagerMenuFileGuid;
> +#endif
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec
> b/UefiPayloadPkg/UefiPayloadPkg.dec
> index 105e1f5a1c..850592976d 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dec
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dec
> @@ -29,6 +29,9 @@
> #
> gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63,
> 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
>
> + ##include/Guid/BootManagerMenu.h
> + gUniversalPayloadBootManagerMenuFileGuid = { 0xdf939333, 0x42fc,
> 0x4b2a, { 0xa5, 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}
> +
> gUefiSystemTableInfoGuid = {0x16c8a6d0, 0xfe8a, 0x4082, {0xa2, 0x8,
> 0xcf, 0x89, 0xc4, 0x29, 0x4, 0x33}}
> gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e,
> 0xf1, 0x10, 0x6, 0xd9, 0xf}}
> gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb,
> 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-23 2:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-21 8:46 [PATCH 0/2] Add a new structure for BootManagerMenu HOB and consume it dun.tan
2021-06-21 8:46 ` [PATCH 1/2] UefiPayloadPkg: Add new structure for BootManagerMenuFile HOB duntan
2021-06-22 22:57 ` Guo Dong
2021-06-23 2:15 ` [edk2-devel] " Ni, Ray
2021-06-21 8:46 ` [PATCH 2/2] UefiPayloadPkg: consume the " duntan
2021-06-22 23:11 ` Guo Dong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox