[edk2-devel] [edk2-platforms][PATCH v2] BoardModulePkg/BoardBdsHookLib: Register UiApp as boot option

Benjamin Doron benjamin.doron00 at gmail.com
Wed Jul 28 19:46:16 UTC 2021


BootManagerMenuApp is the default PcdBootManagerMenuFile. It allows
choosing a boot device, but system configuration is performed in UiApp.
Therefore, un-comment and fix UiApp boot option registration.

Tested, UiApp can be entered through the new boot option.

Cc: Eric Dong <eric.dong at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Signed-off-by: Benjamin Doron <benjamin.doron00 at gmail.com>
---
 Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
index 87138bdd79ff..2dd0b250d44e 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
@@ -361,20 +361,11 @@ RegisterDefaultBootOption (
   if (mBootMenuOptionNumber == LoadOptionNumberUnassigned) {
     DEBUG ((DEBUG_INFO, "BootMenuOptionNumber (%d) should not be same to LoadOptionNumberUnassigned(%d).\n", mBootMenuOptionNumber, LoadOptionNumberUnassigned));
   }
-#if 0
+
   //
   // Boot Manager Menu
   //
-  EfiInitializeFwVolDevicepathNode (&FileNode, &mUiFile);
-
-  gBS->HandleProtocol (
-         gImageHandle,
-         &gEfiLoadedImageProtocolGuid,
-         (VOID **) &LoadedImage
-         );
-  DevicePath = AppendDevicePathNode (DevicePathFromHandle (LoadedImage->DeviceHandle), (EFI_DEVICE_PATH_PROTOCOL *) &FileNode);
-#endif
-
+  RegisterFvBootOption (&mUiFile, L"Platform Configuration", (UINTN) -1, LOAD_OPTION_ACTIVE, NULL, 0);
 }
 
 /**
-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78309): https://edk2.groups.io/g/devel/message/78309
Mute This Topic: https://groups.io/mt/84469836/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list