public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Benjamin Doron" <benjamin.doron00@gmail.com>
To: devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Liming Gao <gaoliming@byosoft.com.cn>
Subject: [edk2-platforms][PATCH v2] BoardModulePkg/BoardBdsHookLib: Register UiApp as boot option
Date: Mon, 26 Jul 2021 18:07:32 -0400	[thread overview]
Message-ID: <20210726220732.300631-1-benjamin.doron00@gmail.com> (raw)

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@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Benjamin Doron <benjamin.doron00@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..5d680a78092d 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"Boot Manager Menu", (UINTN) -1, LOAD_OPTION_ACTIVE, NULL, 0);
 }
 
 /**
-- 
2.31.1


             reply	other threads:[~2021-07-26 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 22:07 Benjamin Doron [this message]
2021-07-26 22:09 ` [edk2-devel] [edk2-platforms][PATCH v2] BoardModulePkg/BoardBdsHookLib: Register UiApp as boot option Benjamin Doron
  -- strict thread matches above, loose matches on Subject: below --
2021-07-28 19:46 Benjamin Doron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210726220732.300631-1-benjamin.doron00@gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox