<div dir="auto"><div>Hi Nate,<div dir="auto">That makes sense. I had been concerned that UiApp might be used in some places, but I didn't expect significant disparity between the boards (and I didn't check all of them, my mistake).</div><div dir="auto"><br></div><div dir="auto">Maybe trying to align them on some differences, someday, might be a good idea? But not for now, in any case.</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu., Aug. 26, 2021, 7:41 p.m. Desimone, Nathaniel L, <<a href="mailto:nathaniel.l.desimone@intel.com">nathaniel.l.desimone@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Benjamin,<br>
<br>
In principle this is a good idea, unfortunately some platforms have been coded to do stuff like this:<br>
<a href="https://github.com/tianocore/edk2-platforms/blob/784f7739f5afd268042d4d9e8ef570131620c82c/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc#L323" rel="noreferrer noreferrer" target="_blank">https://github.com/tianocore/edk2-platforms/blob/784f7739f5afd268042d4d9e8ef570131620c82c/Platform/Intel/WhitleyOpenBoardPkg/PlatformPkg.dsc#L323</a><br>
<br>
And this:<br>
<a href="https://github.com/tianocore/edk2-platforms/blob/784f7739f5afd268042d4d9e8ef570131620c82c/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc#L210" rel="noreferrer noreferrer" target="_blank">https://github.com/tianocore/edk2-platforms/blob/784f7739f5afd268042d4d9e8ef570131620c82c/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc#L210</a><br>
<br>
So the only way we can maintain a consistent user experience is to explicitly call out the GUID for the boot device selection menu. For now, I'll just push the first patch in this series.<br>
<br>
Thanks,<br>
Nate<br>
<br>
-----Original Message-----<br>
From: Benjamin Doron <<a href="mailto:benjamin.doron00@gmail.com" target="_blank" rel="noreferrer">benjamin.doron00@gmail.com</a>> <br>
Sent: Friday, August 13, 2021 5:43 PM<br>
To: <a href="mailto:devel@edk2.groups.io" target="_blank" rel="noreferrer">devel@edk2.groups.io</a><br>
Cc: Dong, Eric <<a href="mailto:eric.dong@intel.com" target="_blank" rel="noreferrer">eric.dong@intel.com</a>>; Liming Gao <<a href="mailto:gaoliming@byosoft.com.cn" target="_blank" rel="noreferrer">gaoliming@byosoft.com.cn</a>>; Desimone, Nathaniel L <<a href="mailto:nathaniel.l.desimone@intel.com" target="_blank" rel="noreferrer">nathaniel.l.desimone@intel.com</a>><br>
Subject: [edk2-platforms][PATCH v2 2/2] BoardModulePkg/BoardBdsHookLib: Simplify hotkey registration<br>
<br>
Retrieve BootOption of BootManagerMenu for registering F7 hotkey, rather than creating an additional boot option.<br>
<br>
Tested, both F7 hotkey still opens the list of boot options.<br>
<br>
Cc: Eric Dong <<a href="mailto:eric.dong@intel.com" target="_blank" rel="noreferrer">eric.dong@intel.com</a>><br>
Cc: Liming Gao <<a href="mailto:gaoliming@byosoft.com.cn" target="_blank" rel="noreferrer">gaoliming@byosoft.com.cn</a>><br>
Cc: Nate DeSimone <<a href="mailto:nathaniel.l.desimone@intel.com" target="_blank" rel="noreferrer">nathaniel.l.desimone@intel.com</a>><br>
Signed-off-by: Benjamin Doron <<a href="mailto:benjamin.doron00@gmail.com" target="_blank" rel="noreferrer">benjamin.doron00@gmail.com</a>><br>
---<br>
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 19 ++++---------------<br>
 1 file changed, 4 insertions(+), 15 deletions(-)<br>
<br>
diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c<br>
index e734e3ad15c3..7ac6c150f2e7 100644<br>
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c<br>
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c<br>
@@ -14,7 +14,6 @@ BOOLEAN    mPxeBoot       = FALSE;<br>
 BOOLEAN    mHotKeypressed = FALSE;<br>
 EFI_EVENT  HotKeyEvent    = NULL;<br>
<br>
-UINTN      mBootMenuOptionNumber;<br>
 UINTN      mSetupOptionNumber;<br>
<br>
<br>
@@ -189,9 +188,6 @@ CreateFvBootOption (<br>
 EFI_GUID mUiFile = {<br>
   0x462CAA21, 0x7614, 0x4503, { 0x83, 0x6E, 0x8A, 0xB6, 0xF4, 0x66, 0x23, 0x31 }<br>
 };<br>
-EFI_GUID mBootMenuFile = {<br>
-  0xEEC25BDC, 0x67F2, 0x4D95, { 0xB1, 0xD5, 0xF8, 0x1B, 0x20, 0x39, 0xD1, 0x1D }<br>
-};<br>
<br>
<br>
 /**<br>
@@ -354,15 +350,6 @@ RegisterDefaultBootOption (<br>
     ShellDataSize = 0;<br>
     RegisterFvBootOption (&gUefiShellFileGuid,      INTERNAL_UEFI_SHELL_NAME, (UINTN) -1, LOAD_OPTION_ACTIVE, (UINT8 *)ShellData, ShellDataSize);<br>
<br>
-  //<br>
-  // Boot Menu<br>
-  //<br>
-  mBootMenuOptionNumber = RegisterFvBootOption (&mBootMenuFile, L"Boot Device List",   (UINTN) -1, LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN, NULL, 0);<br>
-<br>
-  if (mBootMenuOptionNumber == LoadOptionNumberUnassigned) {<br>
-    DEBUG ((DEBUG_INFO, "BootMenuOptionNumber (%d) should not be same to LoadOptionNumberUnassigned(%d).\n", mBootMenuOptionNumber, LoadOptionNumberUnassigned));<br>
-  }<br>
-<br>
   //<br>
   // Boot Manager Menu<br>
   //<br>
@@ -468,8 +455,10 @@ RegisterStaticHotkey (<br>
   F7.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;<br>
   F7.KeyState.KeyToggleState = 0;<br>
   mBootMenuBoot  = !EnterSetup;<br>
-  RegisterBootOptionHotkey ((UINT16) mBootMenuOptionNumber, &F7.Key, mBootMenuBoot);<br>
-<br>
+  Status = EfiBootManagerGetBootManagerMenu (&BootOption);<br>
+  ASSERT_EFI_ERROR (Status);<br>
+  RegisterBootOptionHotkey ((UINT16) BootOption.OptionNumber, &F7.Key, mBootMenuBoot);<br>
+  EfiBootManagerFreeLoadOption (&BootOption);<br>
 }<br>
<br>
<br>
-- <br>
2.31.1<br>
<br>
</blockquote></div></div></div>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/79873">View/Reply Online (#79873)</a> |    |  <a target="_blank" href="https://groups.io/mt/84876596/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>