REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3764
BIOS password is not required when overriding boot device via F7 hotkey. Add boot menu return status code in callback function for ReportStatusCode() notification. Signed-off-by: Bo Chang Ke <bo-changx...@intel.com> Cc: Sai Chaganty <rangasai.v.chaga...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Dandan Bi <dandan...@intel.com> Cc: Bo Chang Ke <bo-changx...@intel.com> --- .../UserAuthenticationDxe.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c index bba2057a96..382d891711 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c @@ -13,6 +13,7 @@ EFI_EVENT mExitBootServicesEvent = NULL; EFI_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol = NULL; USER_AUTHENTICATION_PRIVATE_DATA *mUserAuthenticationData = NULL; EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication = NULL; +BOOLEAN mHotKeyF7pressed = FALSE; EFI_GUID mUserAuthenticationVendorGuid = USER_AUTHENTICATION_FORMSET_GUID; HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { @@ -352,10 +353,19 @@ CheckForPassword ( IN EFI_STATUS_CODE_DATA *Data OPTIONAL ) { - BOOLEAN PasswordSet; + BOOLEAN PasswordSet; + EFI_INPUT_KEY Key; + EFI_STATUS Status = EFI_SUCCESS; + Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); + + if (Key.ScanCode == SCAN_F7 && IsPasswordInstalled()) { + mHotKeyF7pressed = TRUE; + } if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) && - (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP))) { + (((Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)) && mHotKeyF7pressed) || + (Value == (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP)))) { + mHotKeyF7pressed = FALSE; // // Check whether enter setup page. // -- 2.32.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84644): https://edk2.groups.io/g/devel/message/84644 Mute This Topic: https://groups.io/mt/87640146/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-