From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.41]) by mx.groups.io with SMTP id smtpd.web12.7556.1649343059029292850 for ; Thu, 07 Apr 2022 07:51:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=lsU2dv9Z; spf=pass (domain: arm.com, ip: 40.107.0.41, mailfrom: sunny.wang@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vjS7JRUl/7mto6R1zcSXDIOEVW+XkvKBLri0mhjyS60=; b=lsU2dv9ZiyaoKrCOhN2PWDP8lBrr3lael+o4MSyhnUeqbt4W+fI34gjSHm/xdBaPTt9Fbz8w62AnHuOnzk3gVRZp7laM9WO7FRAC2ZN0lW7KmWc6LmDocKf6nPij9Mz1M4ctwprPdWVRMm1BBhCNfDoosHWjKwBP/VbZHazdfvM= Received: from AM6PR0202CA0066.eurprd02.prod.outlook.com (2603:10a6:20b:3a::43) by VI1PR0801MB2109.eurprd08.prod.outlook.com (2603:10a6:800:8a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Thu, 7 Apr 2022 14:50:48 +0000 Received: from AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:3a:cafe::cc) by AM6PR0202CA0066.outlook.office365.com (2603:10a6:20b:3a::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22 via Frontend Transport; Thu, 7 Apr 2022 14:50:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT022.mail.protection.outlook.com (10.152.16.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.21 via Frontend Transport; Thu, 7 Apr 2022 14:50:48 +0000 Received: ("Tessian outbound ab7864ef57f2:v118"); Thu, 07 Apr 2022 14:50:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e2efdfd6a50a33aa X-CR-MTA-TID: 64aa7808 Received: from b3ee4cfe258f.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 59F05B98-382A-4ECA-99E0-98A32BBBF940.1; Thu, 07 Apr 2022 14:50:36 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b3ee4cfe258f.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 07 Apr 2022 14:50:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QMaIB++lMWANWg0+34y83PFAL9AlwbiM9sk/IwK5BFD71Kk09RJFEUS8S2cfYAMgxhJS/rzEApJKRxK2ytcahkJgmaqpLoeGD3gWqg2otZoTnTEyeob5ygKjAiRosh8bz0CbCxR0lIdKopNBVxRtu6UZIJFcyt0+qS37YiFyQq1wUN8xMggAogWYmtfNMmtVGc0iyvw1dY8rdU6H9ODrZNOiAVSkR/RkjVpcQMv6Xt93OkWKj5ahsf6x7MfJU1z2fAj0KnRsY75chBAQM06AKyqjY+5vcGt8Om905v34QBDYZAbayNqTqLLZmmiRBQkiQJtSOOHfYe8dRjw8ZdNqHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vjS7JRUl/7mto6R1zcSXDIOEVW+XkvKBLri0mhjyS60=; b=hYFbkK9EHpOx9S2OKrKGoTwTnvIY2WzZVJL/bYsFKEh0VgvPcweLqSDe47vzpA2lfIwUPt1lSzqXgt3U+IOVcuweVBHWsdcvbV3rfejTTYj1mwizSi5HLXMO/EqTdhDv25XVJpvKWAVtYNzFf04XZd91ZrFvtqLtdRV2bpshyM+LzRrnzUUNX+xzCdP2WiMzdHTs1YGYvQPiYlUXwl9ewGf6qPksuTAr7ehJ4bTxxCKGj7BgtSP1198Txf6n+k5EhgoYaturw7sT/frWAgz0Q4eo3FDQ7Qhif1GIg7dtkmpGw4+01KltGg2EDssvsAg/LxzKbQh4NGhhq3rxuvt9nQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vjS7JRUl/7mto6R1zcSXDIOEVW+XkvKBLri0mhjyS60=; b=lsU2dv9ZiyaoKrCOhN2PWDP8lBrr3lael+o4MSyhnUeqbt4W+fI34gjSHm/xdBaPTt9Fbz8w62AnHuOnzk3gVRZp7laM9WO7FRAC2ZN0lW7KmWc6LmDocKf6nPij9Mz1M4ctwprPdWVRMm1BBhCNfDoosHWjKwBP/VbZHazdfvM= Received: from DB8PR08MB3993.eurprd08.prod.outlook.com (2603:10a6:10:ad::26) by PA4PR08MB6304.eurprd08.prod.outlook.com (2603:10a6:102:e1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Thu, 7 Apr 2022 14:50:34 +0000 Received: from DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::9533:5d64:74c2:5db3]) by DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::9533:5d64:74c2:5db3%3]) with mapi id 15.20.5123.031; Thu, 7 Apr 2022 14:50:33 +0000 From: "Sunny Wang" To: "devel@edk2.groups.io" , Sunny Wang , "gaojie@byosoft.com.cn" CC: G Edhaya Chandran , "Carolyn.Gjertsen@amd.com" , Samer El-Haj-Mahmoud , "eric.jin@intel.com" , "arvinx.chen@intel.com" , "Supreeth.Venkatesh@amd.com" , Ruiyu Ni , Sunny Wang Subject: Re: [edk2-devel] [PATCH] uefi-sct/SctPkg:Enhance BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1() Thread-Topic: [edk2-devel] [PATCH] uefi-sct/SctPkg:Enhance BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1() Thread-Index: AQHX4OHcp0OloRQbvUeEd7mMv5PLYKyugFMQgDbXEyA= Date: Thu, 7 Apr 2022 14:50:32 +0000 Message-ID: References: <40f426fe26ce900c75da32412d51d858fa051b04.1637723578.git.gaojie@byosoft.com.cn> <16D8EF12A218664D.30809@groups.io> In-Reply-To: <16D8EF12A218664D.30809@groups.io> Accept-Language: en-US X-Mentions: ruiyu.ni@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 6e4e2798-a063-4274-3c98-08da18a600bc x-ms-traffictypediagnostic: PA4PR08MB6304:EE_|AM5EUR03FT022:EE_|VI1PR0801MB2109:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: m2O6MIf+q+X3BfQREtgUzeYIApVr8eyxstoLfyJRaGYhjwO+qgs8bfmrRNol3QF1R0lURp5iwOGlp32BgdNbEqzkNjPlVT6hryhaybnndmUVPv9jyUAvRAXrTyXDQXlwtNakbnksfAf7BP90Opr3Uf3QzbhvJub7EjXhP05EOyks45Zs13Y1DbpQL/Mh/TptEukQipFN/xBLkKLLttybapmTm9K9bfN8LvPqbCEiUvc0/x6qujWUexrcEBui4v6t6Oj1fesXVQLwxWPo1VSkguR3xzoiv+pNQB4D2dc8/cHMtRkm4UDQKuW58X67G61dSBtiXZUgPpXz4MLISZB1sOIQbF8wvRTFK7Yl+24sg6+RQ3fpZ1gNFZoEjNOkRr1INIKkGksqWyjhiIzwtmwTYNT4F3Fy5s2rlcXptyTPZaOPa5OUGVtNfXQtn4OI8QEkCk7Sa0vLCiez3VupfNjkqBTD2v54EGBYAMSWfYEJxzMNWIeMw6NeCBURZ71E8jbAL613vHu79kd5G7EAXaYbF5uzbyfHM6+Rp8i3F6SYo2q2WiR/B0d+OjGTLAYifO/1tfgqJY+cJFcCL2MFrTyaBUnAZ/sJ1HwnCSIqP76TqPxIahVd1h2+tF5JspbV3yUG+cQM+pN1sWPuHjAD8qP2OeWm+AmwEsuIwZjYDOa0OE3f83iiSQVFwJNVFA7lDJbJNvyu+M5Q0Tb3wJ8X8uRN9pCN781UNENU0KcmI4icuyfyF2vQWwoXHxAlN7hkBceN2YsFhU9HtbK4vb+VNCMBz+qWxrUAzP6P76Jkvr+sLlYLCyfSYUpR6UGVfGOYEv2GJNzB2wbiGY4JrT0LwkXswQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB3993.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(6029001)(4636009)(366004)(110136005)(9686003)(966005)(186003)(64756008)(66446008)(66476007)(66556008)(26005)(19627235002)(86362001)(122000001)(54906003)(7696005)(33656002)(4326008)(8676002)(6506007)(2906002)(38070700005)(76116006)(53546011)(66946007)(55016003)(508600001)(8936002)(71200400001)(5660300002)(316002)(38100700002)(83380400001)(52536014);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6304 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sunny.Wang@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4e12bbab-6ace-463c-718a-08da18a5f7ca X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Amb5gxfyKTroBl8l64hratexzgKRQ7jC6jmHxeq/vc2rm2aMoNtBJMdOjoNCP9Fe4kYLQ3MMyszUM9ITNcgktYrpBVKpXzPqqrxBmDiCX3WjnUS45EIJozMbbrPxQZgCsa60ple16WrxMUdbSkHaNY0OTlvD5n+gMThqMn1KEC7rv4x2UhlFGKtKC9SVw0HoqfaU8Y5Im6Prhxq0TKORfeTU4QxN9rRVgUnsqYQmNCPEm0X2+vx75vHylg2cPagmJJoZHDddf34QRkwJnsCrGt1IPPTRH1N+09z9NEEbqobfM7YLgeSnw7xMj5cJIMe/0K5nria3xO3hmf7nFf20a51t6EeHHZc+m8d9IB0KnVHVDd5Hk/wSI7Tdj+qPiWmG5DrwVXKDpndRUz6B3iTieCNXr4e6ft4MxqdlDnc48ZXJ13fP+sSOxfrvZzAV0xPB8oyWn9mz9UTGzViZM+beLmQzNmeCWqXrQ4wIIgVkTLIGBNQ9P6HeUhmEx0BcIp/qu2L8MkJvC70+qMPCBPLOXhL/kXZlzE/m/gUlx+jEXok2QdDg0Krr7ihAjWPESFVuy2f578I20E0B/BWGgZp/H+wrDItTSm01jVIcwbEtub3D2B/7S3K6ochWw8XdcRFBbL2E4+lOQZekqsQs6qXEGD52qYPGM1yJTzHE94kq9ehd/2kSkLK2+m2s8w8eZ3kWheOSO5lZfcaBBWqUPYYtL8g3AkyvUxGQMiCfrFWUW9a+JrrXEaA870IM2jOPwJlqSdmFbVLuAsD7DxmGGL+Nj9Mcy/ljHDZFNqRywB9qNBuW27EMvSItKufAcNEmF55Z X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230001)(6029001)(4636009)(36840700001)(46966006)(40470700004)(54906003)(110136005)(336012)(26005)(186003)(8936002)(52536014)(33656002)(40460700003)(966005)(55016003)(9686003)(508600001)(19627235002)(316002)(82310400005)(7696005)(83380400001)(53546011)(70206006)(6506007)(70586007)(356005)(81166007)(47076005)(2906002)(8676002)(4326008)(36860700001)(86362001)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2022 14:50:48.1695 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e4e2798-a063-4274-3c98-08da18a600bc X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2109 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Barton, As our discussion in today's edk2-test bug triage meeting, my second point = " UEFI spec implies that the ReadKeyStrokeEx should clear KeyState (set the= value to zero) if there is no key data" is not clear enough. Sorry about t= hat. To be clear, UEFI spec says the following: - UEFI drivers which implement the EFI_SIMPLE_TEXT_INPUT_EX protocol are= required to return KeyData.Key and KeyData.KeyState values. These driver= s must always return the most current state of KeyData.KeyState.KeyShiftSta= te and KeyData.KeyState.KeyToggleState. However, when user doesn't press any key, there will be no most current sta= te to return. For solving thie problems, @Ruiyu Ni (In Cc) has patch series= https://edk2.groups.io/g/devel/message/20311 and commit message below: - Today's implementation only return key state when there is a key.But whe= n user doesn't press any key, the key state cannot be returned.The patch ch= anges the ReadKeyStrokeEx() to always return the key state even there is no= key pressed. Therefore, this is just preferred implementation rather than a requirement = in spec. Best Regards, Sunny -----Original Message----- From: devel@edk2.groups.io On Behalf Of Sunny Wang v= ia groups.io Sent: 03 March 2022 17:28 To: devel@edk2.groups.io; gaojie@byosoft.com.cn Cc: G Edhaya Chandran ; Carolyn.Gjertsen@amd.com; = Samer El-Haj-Mahmoud ; eric.jin@intel.com; ar= vinx.chen@intel.com; Supreeth.Venkatesh@amd.com; Sunny Wang Subject: Re: [edk2-devel] [PATCH] uefi-sct/SctPkg:Enhance BBTestReadKeyStro= keExFunctionAutoTestCheckpoint1() Sorry for the late review. The change looks fine. However, I'm confused about the comment " Log the er= ror here and return key states are not supported when high order bit of Key= ToggleState is 0 or KeyState not touched". It looks like returning EFI_UNSU= PPORTED won't log any error/failure in the result log. Did I overlook anyth= ing here? Furthermore, it looks like UEFI spec implies that the ReadKeyStrokeEx shoul= d clear KeyState (set the value to zero) if there is no key data. There is = also a code change for doing this in edk2. https://edk2.groups.io/g/devel/m= essage/20311 Therefore, if I didn't overlook anything here, we should separately deal wi= th the "(Key.KeyState.KeyShiftState =3D=3D 0xFFFFFFFF) || (Key.KeyState.Key= ToggleState =3D=3D 0xFF)" as a failure rather than directly returning EFI_U= NSUPPORTED. Barton and Edhaya, what do you guys think? Best Regards, Sunny -----Original Message----- From: devel@edk2.groups.io On Behalf Of Gao Jie via = groups.io Sent: 24 November 2021 03:16 To: devel@edk2.groups.io Cc: G Edhaya Chandran ; Carolyn.Gjertsen@amd.com; = Samer El-Haj-Mahmoud ; eric.jin@intel.com; ar= vinx.chen@intel.com; Supreeth.Venkatesh@amd.com Subject: [edk2-devel] [PATCH] uefi-sct/SctPkg:Enhance BBTestReadKeyStrokeEx= FunctionAutoTestCheckpoint1() REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2386 Enhance BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1() to handle ReadKeyStrokeEx implementation which returns EFI_NOT_READY but without touching KeyToggleState. Signed-off-by: Barton Gao --- .../BlackBoxTest/SimpleTextInputExBBTestFunction.c | 11 ++++++++++- .../BlackBoxTest/SimpleTextInputExBBTestFunction.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/B= lackBoxTest/SimpleTextInputExBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UE= FI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestFunct= ion.c index 0398bc26..c1669959 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBox= Test/SimpleTextInputExBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBox= Test/SimpleTextInputExBBTestFunction.c @@ -1160,6 +1160,12 @@ BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1 ( ValidState[5] =3D EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED | EFI_N= UM_LOCK_ACTIVE | EFI_CAPS_LOCK_ACTIVE; ValidState[6] =3D EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED | EFI_S= CROLL_LOCK_ACTIVE |EFI_NUM_LOCK_ACTIVE | EFI_CAPS_LOCK_ACTIVE; + // + // Set all bits to one (invalid values) for both KeyShiftState and KeyTo= ggleState + // + Key.KeyState.KeyShiftState =3D 0xFFFFFFFF; + Key.KeyState.KeyToggleState =3D 0xFF; + // //Read next keystroke from the input device // @@ -1171,7 +1177,10 @@ BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1 ( return Status; } - if ((Key.KeyState.KeyToggleState & EFI_TOGGLE_STATE_VALID) =3D=3D 0) { + if (((Key.KeyState.KeyToggleState & EFI_TOGGLE_STATE_VALID) =3D=3D 0) ||= (Key.KeyState.KeyShiftState =3D=3D 0xFFFFFFFF) || (Key.KeyState.KeyToggleS= tate =3D=3D 0xFF)) { + // + // Log the error here and return key states are not supported when hig= h order bit of KeyToggleState is 0 or KeyState not touched + // return EFI_UNSUPPORTED; } diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextInputEx/B= lackBoxTest/SimpleTextInputExBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UE= FI/IHV/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestFunct= ion.c index adbf3dcf..e20ed345 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextInputEx/BlackBox= Test/SimpleTextInputExBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleTextInputEx/BlackBox= Test/SimpleTextInputExBBTestFunction.c @@ -1160,6 +1160,12 @@ BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1 ( ValidState[5] =3D EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED | EFI_N= UM_LOCK_ACTIVE | EFI_CAPS_LOCK_ACTIVE; ValidState[6] =3D EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED | EFI_S= CROLL_LOCK_ACTIVE |EFI_NUM_LOCK_ACTIVE | EFI_CAPS_LOCK_ACTIVE; + // + // Set all bits to one (invalid values) for both KeyShiftState and KeyTo= ggleState + // + Key.KeyState.KeyShiftState =3D 0xFFFFFFFF; + Key.KeyState.KeyToggleState =3D 0xFF; + // //Read next keystroke from the input device // @@ -1171,7 +1177,10 @@ BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1 ( return Status; } - if ((Key.KeyState.KeyToggleState & EFI_TOGGLE_STATE_VALID) =3D=3D 0) { + if (((Key.KeyState.KeyToggleState & EFI_TOGGLE_STATE_VALID) =3D=3D 0) ||= (Key.KeyState.KeyShiftState =3D=3D 0xFFFFFFFF) || (Key.KeyState.KeyToggleS= tate =3D=3D 0xFF)) { + // + // Log the error here and return key states are not supported when hig= h order bit of KeyToggleState is 0 or KeyState not touched + // return EFI_UNSUPPORTED; } -- 2.31.0.windows.1 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.