From nobody Fri May 3 00:48:08 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+84644+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+84644+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1639155253; cv=none; d=zohomail.com; s=zohoarc; b=SXXuFsudm4e565Rc6gFf+Ajwyy6Oe0FDKPCdVf3dd+Y1O3VqdDjOA7rpReSfV8g8qvHJXdbf4Ln9OJQgEKPXdW3U4u058iP0v7y2zZEYX7Dh0PYgJEgy98miFHcTGtN1lhKVKOnxctt4tRe0ngaoEVqvOf1plxa+nT/XPO7nRxw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639155253; 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=Jn/TxU7MXFldmW29wE25SApr+KNg3STsK3TtF0TaM58=; b=SKdNZdIGnONrcAh1YdjacxRd1q/ry5DbSoN1omjV06j4/6HJNiaZZ219b8Tu48vTKFma4OoxA16ocCasA30KsczOw7YKQCWQdGk+dNUcdJpCuPnkHQcNbI+2JbaI2ZrqYnEU07eLRso/lh5YdvZRZGJdtdnHI0JaSH1/e1XlKHw= 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+84644+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 1639155253184109.50618559998816; Fri, 10 Dec 2021 08:54:13 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id qEmgYY1788612xFMhJgtqNGY; Fri, 10 Dec 2021 08:54:12 -0800 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web08.4335.1639121798384919249 for ; Thu, 09 Dec 2021 23:36:39 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10193"; a="237031538" X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="237031538" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 23:36:37 -0800 X-IronPort-AV: E=Sophos;i="5.88,194,1635231600"; d="scan'208";a="463578512" X-Received: from bkex-mobl.gar.corp.intel.com ([10.215.244.78]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 23:36:35 -0800 From: "Bo Chang Ke" To: devel@edk2.groups.io Cc: Sai Chaganty , Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH] [PATCH v2][Edk2 Platform] UserAuthFeaturePkg: Add boot menu return status code to trigger function. Date: Fri, 10 Dec 2021 15:34:26 +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: 7hu1FKLYPwsOCjVcVDYnJKwtx1787277AA= 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=ahUvUwPO73lNCnNsnxpmbT5kdor2+oasyZJQBCZxTCI=; h=Cc:Date:From:Reply-To:Subject:To; b=ESQtWne111vQnbUuK3/+avkXH0e9iyFo8PUFTTsP5TMcF6zgbnm7rM5ofGo6dO1uQTq nfwu8QJuP0HdYq3UzwXKMmIKFTmavYRBEUh6GockulR4WFD7i2I8hrqNfVvZ5+4JemZJ3 QWb94Px9IskWi5txk21Uq+bXSuFa9MpExD0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639155254121100002 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: Bo Chang Ke --- .../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 (#84644): https://edk2.groups.io/g/devel/message/84644 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-