From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.6055.1645150610103815020 for ; Thu, 17 Feb 2022 18:16:50 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=HRrDHFCV; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645150610; x=1676686610; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rNJdPQUg9FSXCurO6m7l9/Wq9vTMIv1/Atnpjv8V0JM=; b=HRrDHFCVEXkrwGhkXrPFriNxdEMl7JSM+YrADKnLUEr1tH1VQw1c8MWP IQD3ZoMVNmbkMfc1WpUlT1NAlK3DJgnnzRctX9gnnMg7flclIxFO6xeYZ lOn5WsmidSE0FUXnDaYtJr5ZHJb1tgb/J2rOBn8LfSQOq+p7Jal+7eXFJ N9UH2cH87g7JePN0pyhWHn0JMIM2owz+Uw1h6cOw7BNbUmemAFR8qM4oq 4mudP66WqqB7696rQJEa0Vhg8tLRrr9lcZe+KuEpMpRm6XxQKGOK3iirS ou9xGP3z5rC8s4HhROlYic5yXPLclpkbU+8NYUVolx74skXwZqBkFJ419 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="249865721" X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="249865721" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 18:16:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="605373286" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga004.fm.intel.com with ESMTP; 17 Feb 2022 18:16:48 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 17 Feb 2022 18:16:48 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 17 Feb 2022 18:16:48 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 17 Feb 2022 18:16:48 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 17 Feb 2022 18:16:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OHKN6j7NfK2gKbDDoLkYHAALQPCvhgknrZBxuuqwjXsFS+0pigGt+1jB4p+rhhMtTJbHVo69BBRT33B1BloVxltw2HwDdG90zzx2wtsZsdh+0zUbz1VZUQtqKS1OCh3sjZreNWk7DhK7ug+g6+YxrIHlNO/CxsAuwe8pjTZH5HMAeOEq6pvO6aQf4X1y6A5k3hkrrtr7PNqaCCPfSMzkGTz+ESaZFo9HY3/W/iu/9YvZtSbXmeDQfbsM45cdyKDyhpZumlzPTdC5bG4ybhgXakAdEjeD7W3pS12WL1uQ5C4Pb+3xGaDHmv7bnIp1C+G/5y/L9+AYle+laJ73AEzwyw== 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=MMdGgdRlKZyfbFGAUW/nTylQ+oWuxG3L5uc9zkJ5sGY=; b=DXSlEe9SEYVlbh3bWSW1SwW0xhARkKEBu6pP/fcgG7lACDNGj3MUE3h+KDz9RqZRCNWrhOdRBmRFsZKkEnsALx0oXPt8/UJJ/Y5FgcE0PHEddZ9qESisSgWTtXR+5lOEYyscJH/eks1KhdpyU9QYgz1RSNQ17wPySQ6CZDuy+co26MuD766eJGLbhUdi9B1vId0Xx/fg6+orYAcu1dwpuhJISXJIIM/Lrc5AwQOTsbeS3xhAn9rX8KSj/H50OPR8xCcRi1cES+BoVZZO7UZJMa1DIoUrvBsMZmwubx+kuukeHQ4Fc/IP7XWgzN2oAQz5jkbHVAxUCc4udJlV4Ds1eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by SJ0PR11MB5088.namprd11.prod.outlook.com (2603:10b6:a03:2df::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Fri, 18 Feb 2022 02:16:46 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::707a:603c:30eb:bcdd]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::707a:603c:30eb:bcdd%3]) with mapi id 15.20.4975.019; Fri, 18 Feb 2022 02:16:46 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Rhodes, Sean" , "Ni, Ray" CC: "Dong, Guo" , Matt DeVillier Subject: Re: [edk2-devel] [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Topic: [edk2-devel] [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after BAT non-fatal Thread-Index: AQHYHx4m9/4AIhaxoEOTXiTYqxsPa6yUIgWw Date: Fri, 18 Feb 2022 02:16:46 +0000 Message-ID: References: <793abb11501c3fe8d4b8c82267cb9a30bcfa9c3a.1644566720.git.sean@starlabs.systems> In-Reply-To: <793abb11501c3fe8d4b8c82267cb9a30bcfa9c3a.1644566720.git.sean@starlabs.systems> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d6ac18ee-2455-4e59-ac00-08d9f284b697 x-ms-traffictypediagnostic: SJ0PR11MB5088:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WvK0wR0wzqtMpv695UcEJSwMTk1owG8HD/bJl3xWooJJCi/gPoLbfXnr0eduvwXEWeheYvUHHNXAEsVGInTsgSqXtRf4HxggtUqQat2GG6Fo/RxzcV4jU4E5XS4B1yhvHanYoZGsur28VuwgUZc7niKzDHH8PGTIlKFdZz5FwwT6o9D058t8g/SWC9uN1Jr45fCs6n4DdFIffErEBk4AiQVfU61IJlzcAtKgxYQfNoDziWCyvfpk6DZccxLSaXA05ZDPacpJYokROlMYkvtgoT4S7uBP25MadhUnDQIlOwbCEen+0t7eOuml5rzGX1FJH14MuDmhKLrlRh738WO2lcU0+3QwV29R315OZ4YL00SAkTpedlLMRovTUfM4pJFf0yHQXohUieUuoqJod/A2QzOVCBJcS18118upa99FqdiKgjTsKY5aAzzTITfoJAE6unug8965gm9iXmFssMbVIKyu1MhaW+NTRFBkwN1Z61kwMcDGmkp5piOeAxiNZOYsPOXTp6oiKLesRnrNVKx3WHt8dn8qbhESksXlf5lws4gTNXOB/ipQ0U2EkDGX1uNLIcq5h0NW9D8bDA/rgxDOOYYQe6Ssm6jTdW6azfXZZPKsbmjxDKRMv19wLInTYa/2qlbY242PQUEQOAw9WIRTduxUycri4EraHxukQnGt+vsafWs5EGn0M+bXdbp6hehWUYFjNBk0pvz/BS5DMXfziv/Uhs8/zI33YZgVUghWRZNQS6pjEkjgDZQ0mwbn7ZO/bRCOd7dSxIUz6CDUPJa6x4kD/LfZ4b/grsN/yxHeqWahoeulq2immCoMvTwP3sC1aP8nvb4H9Wgvd7ekRgk3Zw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(122000001)(83380400001)(26005)(38100700002)(38070700005)(82960400001)(33656002)(186003)(4326008)(52536014)(8936002)(66446008)(8676002)(64756008)(5660300002)(66476007)(66556008)(71200400001)(55016003)(66946007)(76116006)(2906002)(53546011)(6506007)(7696005)(508600001)(9686003)(6636002)(54906003)(19627235002)(316002)(110136005)(86362001)(966005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?q1PdH+eRPC7qSJb+OSJm2kCRHzWlPxazrzOhaUxmCfbGMz8quMAe4UayiU18?= =?us-ascii?Q?2vgfQBbeSWtMmYe7+G74uaOMzfpz/KUGpDnEzej0IU5Vr797eJ/QUKc3fVkK?= =?us-ascii?Q?+1n+0tukeLbSZvyy6JFkUnsjOj4h3ARsuvBiV9GjQlzvOIVClPmYfgMTTVmA?= =?us-ascii?Q?Ceqa/joQQWfRRJC+wOy2RWTD7L9MAjcTyx8C6Yld+WJBvmhep/aD8xTMMQf0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lP2nbYkaiVDPXh8j/zaAMD6pEqsbiSZ6tV?= =?us-ascii?Q?FLb7Drf0Vx6ipxy79RitFTLTz0oV0KNNrYicyyZzjYWRgVacz/q7OPeyKRzC?= =?us-ascii?Q?cEKKE7BsQaTAvKaU0J8X9DCavsLrJpPPMcTBOQZKiLmnWF0cWgrci3nHXL/T?= =?us-ascii?Q?84/8ajVOyW9D7X3DZMsJZ6ntO3bUmmiTw8z0Rz7a1omEJpuF8NFJt37b/bx9?= =?us-ascii?Q?BWqVKhRJoF7zYdzUagyrAZ6UqRIoDDlGKn+buePdI493HsjD/oPhP4a+iAYw?= =?us-ascii?Q?VzkhV0fOGzQ9p4PqGZFOH01SFGGvwuOfjVcXEcxBLQdk9eqKHiThQ3a1tytT?= =?us-ascii?Q?vvxg6qaxSbYeu9aHnDirJwVy0Se5LuIcdW0aRtfwrCz6Bo6YlG+s37///Ydc?= =?us-ascii?Q?qywm5/Cb75abVK80IrkQFJvB8b0XdlmTL4XwVjL+VkD5xO0dRpgddcgn5iB7?= =?us-ascii?Q?poXzYhDjah1G8Wtqblp3fok0uANZve+mc/lP15/2FAT7gU0Naaw+xjuluTmJ?= =?us-ascii?Q?nObzv8NaKRUtessLalkdHQ0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6ac18ee-2455-4e59-ac00-08d9f284b697 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2022 02:16:46.1540 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4F6ckB8FRgpO0modaQhwPnRUO+Q+e5WasbktDB566nWjGLDEjrep/po0kZeKU5+Q5q0g5Jp6zwN3RbFMaXb/2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5088 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Acked-by: Hao A Wu I recommend to get Ray's input for this patch before merging. Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sean > Rhodes > Sent: Friday, February 11, 2022 4:05 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Matt DeVillier > ; Wu, Hao A ; Ni, Ray > ; Rhodes, Sean > Subject: [edk2-devel] [PATCH] Ps2KbdCtrller: Make wait for SUCCESS after > BAT non-fatal >=20 > From: Matt DeVillier >=20 > Recent model Chromebooks only return ACK, but not > BAT_SUCCESS, which causes hanging and failed ps2k init. > To mitigate this, make the absence of BAT_SUCCESS reply > non-fatal, and reduce the no-reply timeout from 4s to 1s. >=20 > Tested on google/dracia and purism/librem_14 >=20 > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Matt DeVillier > Signed-off-by: Sean Rhodes > --- > MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c | 6 +----- > MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h | 2 +- > 2 files changed, 2 insertions(+), 6 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > index 77dc226222..6c71355edd 100644 > --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c > @@ -1733,11 +1733,7 @@ InitKeyboard ( > // >=20 > mWaitForValueTimeOut =3D KEYBOARD_BAT_TIMEOUT; >=20 >=20 >=20 > - Status =3D KeyboardWaitForValue (ConsoleIn, > KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); >=20 > - if (EFI_ERROR (Status)) { >=20 > - KeyboardError (ConsoleIn, L"Keyboard self test failed!\n\r"); >=20 > - goto Done; >=20 > - } >=20 > + KeyboardWaitForValue (ConsoleIn, > KEYBOARD_8048_RETURN_8042_BAT_SUCCESS); >=20 >=20 >=20 > mWaitForValueTimeOut =3D KEYBOARD_WAITFORVALUE_TIMEOUT; >=20 >=20 >=20 > diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > index ca1dd9b2c2..38df3e092d 100644 > --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h > @@ -157,7 +157,7 @@ InstallPs2KeyboardDriver ( > #define KEYBOARD_MAX_TRY 256 // 256 >=20 > #define KEYBOARD_TIMEOUT 65536 // 0.07s >=20 > #define KEYBOARD_WAITFORVALUE_TIMEOUT 1000000 // 1s >=20 > -#define KEYBOARD_BAT_TIMEOUT 4000000 // 4s >=20 > +#define KEYBOARD_BAT_TIMEOUT 1000000 // 1s >=20 > #define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s >=20 > #define SCANCODE_EXTENDED0 0xE0 >=20 > #define SCANCODE_EXTENDED1 0xE1 >=20 > -- > 2.32.0 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#86611): https://edk2.groups.io/g/devel/message/86611 > Mute This Topic: https://groups.io/mt/89066601/1768737 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20