From nobody Thu May 2 10:16:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84645+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84645+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1639155252; cv=none; d=zohomail.com; s=zohoarc; b=PBSqF7dUu8Yb/kHudB+h3M3f+7aTB3QxNNe1xMhG9iOuRuq4QTSUjW+3OxOQ4859m+0SvAkbtciRVq7w7+OoEpXrkmOAcawTtZCfS7F+p/lJNPU3rvNL3bEvxCdkrcqqTSFS68VK3ZEORhN22BAHQk3lLyCs0khiSp4hwZwwkak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639155252; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=KAcdv0OGhQwmaj2ziK6HjwWI5b+2Er6ciCqEPhzNL/8=; b=kf2Q5BMSrtfbnPTAc2wBvZASyCBt6s0MOcECD4+p6DkI11k/lmVCnT/4j76+wFBCFNuMhVBBbSbYf+7bFxLYU0fsvolOH/OZmsSyLd57YO0lmxOGN5TQ4W+EyKrwJ5Z6sJrekRXiIGkrhuL5YtYLJmWI5TOiN+etfjIu57mTy54= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84645+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639155252710776.9432446938973; Fri, 10 Dec 2021 08:54:12 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id zfrzYY1788612x8GPfZqIOMr; Fri, 10 Dec 2021 08:54:12 -0800 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web08.4739.1639125958125970774 for ; Fri, 10 Dec 2021 00:45:58 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10193"; a="238109682" X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="238109682" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2021 00:45:54 -0800 X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="680675416" X-Received: from bkex-mobl.gar.corp.intel.com ([10.215.244.78]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2021 00:45:51 -0800 From: "Bo Chang Ke" To: devel@edk2.groups.io Cc: Sai Chaganty , Liming Gao , Dandan Bi , Dong, Eric , Ke, Bo-ChangX Subject: [edk2-devel] [PATCH] [PATCH v2][Edk2 Platform] UserAuthFeaturePkg: Add boot menu return status code to trigger function. Date: Fri, 10 Dec 2021 16:45:04 +0800 Message-Id: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bo-changx.ke@intel.com X-Gm-Message-State: 8qSmxdakl5D4ibEqGNeGXvKRx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639155252; bh=e+Dnl0gQdYhHr1Sb2g/+XUXpL3eTrsOr+cXhGNGQCGo=; h=Cc:Date:From:Reply-To:Subject:To; b=QEO7Uw80OiyI4acnSNKo3fQFz/x7w14Oxnkzh5bUi0lp0cb3pHGmjhA0lsZRJjUEATq AXbJuxAncNCTMGmW8HwPtfRFJj/uYL6gr4FwN1OoTdoD06fXDpg943E4XZEem+Ahknf1H FHqlxs/MNsDJydt5gyLRMuH2WLHyITD2FZU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639155254047100001 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3764 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 Cc: Sai Chaganty Cc: Liming Gao Cc: Dandan Bi Cc: Dong, Eric Cc: Ke, Bo-ChangX --- .../UserAuthenticationDxe.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthentica= tionDxeSmm/UserAuthenticationDxe.c b/Features/Intel/UserInterface/UserAuthF= eaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.c index bba2057a96..382d891711 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxe= Smm/UserAuthenticationDxe.c +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthenticationDxe= Smm/UserAuthenticationDxe.c @@ -13,6 +13,7 @@ EFI_EVENT mExitBootServicesEven= t =3D NULL; EFI_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol =3D NULL; USER_AUTHENTICATION_PRIVATE_DATA *mUserAuthenticationData =3D NULL; EFI_SMM_COMMUNICATION_PROTOCOL *mSmmCommunication =3D NULL; +BOOLEAN mHotKeyF7pressed =3D FALSE; =20 EFI_GUID mUserAuthenticationVendorGuid =3D USER_AUTHENTICATION_FORMSET_GUI= D; HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath =3D { @@ -352,10 +353,19 @@ CheckForPassword ( IN EFI_STATUS_CODE_DATA *Data OPTIONAL ) { - BOOLEAN PasswordSet; + BOOLEAN PasswordSet; + EFI_INPUT_KEY Key; + EFI_STATUS Status =3D EFI_SUCCESS; =20 + Status =3D gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); + + if (Key.ScanCode =3D=3D SCAN_F7 && IsPasswordInstalled()) { + mHotKeyF7pressed =3D TRUE; + } if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) =3D=3D EFI_PROGRESS_CODE) && - (Value =3D=3D (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP))) { + (((Value =3D=3D (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_= TO_BOOT_EVENT)) && mHotKeyF7pressed) || + (Value =3D=3D (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_USER_SETUP)))) { + mHotKeyF7pressed =3D FALSE; // // Check whether enter setup page. // --=20 2.32.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84645): https://edk2.groups.io/g/devel/message/84645 Mute This Topic: https://groups.io/mt/87640146/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-