From nobody Wed Apr 24 01:53:47 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1584351547; cv=none; d=zohomail.com; s=zohoarc; b=Arv/TgIbN7gVThF3GjH8llq9WE1QLBij3+JN3dJuJDmoMDJN/dsk3QjBaO4UXsj8adKROTNcYl4bqes+SCedWSj2tStARP0nqrY8HSJOAIErk2KdfSyhwAgL5uB9Y1XJ98PcDMi9p/h7mS3uR2kan/q9qHEIDv0ufkD2WH/hDlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584351547; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:To; bh=UVMrR5mooYzHXh0SMURn7H5VpuNsCGjlm0y8GOgwd8A=; b=XBmI9D28dwVZXUo1s0ncVWlH8oeEbxnBkJmN6CN8M8aecbStkWGWROBIrldquEFkE8XT9djw3AhgqNMqbgNKyXAhhy6uHR4SVtjqA2mX2Ng9U0VRWp1XGl13GS0ZJqdFnMz2/QISVzaMdrpBQujoCgKD4kHcj+MaNDdBP97xVp8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1584351546618158.9200034167269; Mon, 16 Mar 2020 02:39:06 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id D1736B01A4F; Mon, 16 Mar 2020 09:39:02 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 37B51B01A3E for ; Mon, 16 Mar 2020 09:38:26 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id BADF92064608E; Mon, 16 Mar 2020 10:38:25 +0100 (CET) To: seabios@seabios.org From: Paul Menzel Message-ID: <248435f9-c169-e1db-fc3e-62185b74899c@molgen.mpg.de> Date: Mon, 16 Mar 2020 10:38:25 +0100 MIME-Version: 1.0 Content-Language: en-US Message-ID-Hash: BOUUVFHAN3J6TF4O4O5DXXJS5VMMFGXX X-Message-ID-Hash: BOUUVFHAN3J6TF4O4O5DXXJS5VMMFGXX X-MailFrom: pmenzel@molgen.mpg.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.3.1 Precedence: list Subject: [SeaBIOS] [PATCH] ps2port: adjust init routine to fix PS/2 keyboard issues List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: +++ X-Spam-Level: *** Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org Content-Type: text/plain; charset="utf-8"; format="flowed" From: Matt DeVillier Date: Fri, 12 Aug 2016 14:21:58 -0500 PS/2 keyboards on Chromebooks with upstream coreboot + SeaBIOS often fail to init properly / register keystrokes. Modify ps2port init to match that of TianoCore, which doesn't have said issues. Signed-off-by: Matt DeVillier Signed-off-by: Paul Menzel --- Upstream from https://github.com/MrChromebox/SeaBIOS/ src/hw/ps2port.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/hw/ps2port.c b/src/hw/ps2port.c index 88b1059..2c334c0 100644 --- a/src/hw/ps2port.c +++ b/src/hw/ps2port.c @@ -465,6 +465,14 @@ ps2_keyboard_setup(void *data) if (ret) return; + // Disable KB/mouse interfaces + ret =3D i8042_command(I8042_CMD_KBD_DISABLE, NULL); + if (ret) + return; + ret =3D i8042_command(I8042_CMD_AUX_DISABLE, NULL); + if (ret) + return; + // Controller self-test. u8 param[2]; ret =3D i8042_command(I8042_CMD_CTL_TEST, param); @@ -475,6 +483,11 @@ ps2_keyboard_setup(void *data) return; } + // KB write CMD + ret =3D i8042_command(I8042_CMD_CTL_WCTR, NULL); + if (ret) + return; + // Controller keyboard test. ret =3D i8042_command(I8042_CMD_KBD_TEST, param); if (ret) @@ -505,11 +518,6 @@ ps2_keyboard_setup(void *data) return; } - /* Disable keyboard */ - ret =3D ps2_kbd_command(ATKBD_CMD_RESET_DIS, NULL); - if (ret) - return; - // Set scancode command (mode 2) param[0] =3D 0x02; ret =3D ps2_kbd_command(ATKBD_CMD_SSCANSET, param); --=20 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org