From nobody Sat Sep 09 17:14:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rjfj24tK9z4sBWT; Sat, 9 Sep 2023 17:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rjfj24GD1z3ShR; Sat, 9 Sep 2023 17:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694279654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78+i9tMpq5Wl2YGGtgMK0KPtTrTRHLed2+i8c5fHBzE=; b=GOrPSazTObnh4dO8xa4IIBnih9mELhQ7ntqVofypq3j3HoLUZbYxl1bCHmB04mfANFU4PM xufmfmFS8ItgmGnClIDE8RSmk+N3WiN1MRyN/YfpbbIV7+Ji6SMToU6cMiid2jbINI1/c7 F/Sr6YID0oOcA/VcYPHcePFLRYztHJdmaHUu2+UnimNHax9AihScgTrKHSxNOj1VVuyIxl 6kOr8889wHzICzJF9pjBJyIPBwgTSemu0MuuM4BPDSkilHcB0wdI/z3j70Zxa/hiypDZSl auPgB2rBkdVnq33W4jkBNXGOBzUUSRViWNZebWUnkiloH6S+i9MiiF44e3a23A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694279654; a=rsa-sha256; cv=none; b=p44BtGBNyR4JqN5njH0yUdFAZJWZRJPE5/+pY0x4KWSBM3rHx7vzyNTxaZtZwiZR2kKPTR EmgInq++3BFsywwEBNxPLx+uge9KHgW2gOqia8ZwsuQw/H161Fu3v2+iic9wJotW5T9o49 mDdgLcftYvGPj3jm9MSJ9USWN2YdEvoHxprxIhHkUY/NfhFaG7DWW2p4FwdN+K4X/q+qRc WgFjZdcFE0+6XZbsXOylZTTDjjKGkLzHf0ZKL34UXlpKQiHaprzbrvroByetVowFtcizDN zL1O30WZuWfJcGVXtSL+YgC1zT8V7/vO4tZtE5gBZhXUAoS963xNK7qWIVQcew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694279654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78+i9tMpq5Wl2YGGtgMK0KPtTrTRHLed2+i8c5fHBzE=; b=iT1juIRvhEkuQbGse2yc02pfDV6BjZMYdpyXfngHRX8PzuaOdQBvuXi8uEeHquXJrBEby6 Dg7KDAQKfYw4FqXyIgRV9dOxWEfDn0JPXwFWzoKysITlcCztlMqVURJq+pPwUUvgB+BKaC eW+jb2ljahqS4s+grWZ3ZzEf3LIDEMNsN7n3v0xk8pcaQ6Qr7xtcOZTw0cw4cQLswcTPuw sC/+T0Z6fGpZeR8Tbm/GB1chuv/IaPPNK2FTtmgv3VAffUFz4AQq77IKgHcR91KnkkfBM2 aQqWOFj9S9PIc43h12FgyZag+LBxqqXDo4ItTs2/iuxRe+yjWnqJ2GhWumsBtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rjfj23HXczYpH; Sat, 9 Sep 2023 17:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 389HEENL034015; Sat, 9 Sep 2023 17:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 389HEE5u034012; Sat, 9 Sep 2023 17:14:14 GMT (envelope-from git) Date: Sat, 9 Sep 2023 17:14:14 GMT Message-Id: <202309091714.389HEE5u034012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4cd94c8afb31 - main - atkbdc: Add additional heurstic for Chromebook keyboards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cd94c8afb31965c7f18471eaa0b2d5e661c24fb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4cd94c8afb31965c7f18471eaa0b2d5e661c24fb commit 4cd94c8afb31965c7f18471eaa0b2d5e661c24fb Author: Warner Losh AuthorDate: 2023-09-09 02:18:33 +0000 Commit: Warner Losh CommitDate: 2023-09-09 17:13:25 +0000 atkbdc: Add additional heurstic for Chromebook keyboards It turns out that that heurstic used to determine if we have a Google coreboot, and thus have the i8042 emulation bugs, is incorrect. At least one Acer "Peppy" Chromebook has an issue because Acer space'd out the smbios.bios.version string we're using as part of the heuristic. So, if the version starts with a space, then enable the workarounds if the smbios.bios.reldate is 2018 or earlier. While not perfect, it should be a reasonable dividing line and still allow newer core boot-based machines that aren't Chromebooks to not have the workaround. Tested by: Matthias Apitz Sponsored by: Netflix MFC After: 3 days (14.0 candiate) --- sys/dev/atkbdc/atkbdc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index 6168b389841b..c23afe3323cf 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -147,6 +147,7 @@ atkbdc_getquirks(void) char *maker = kern_getenv("smbios.system.maker"); char *product = kern_getenv("smbios.system.product"); char *version = kern_getenv("smbios.bios.version"); + char *reldate = kern_getenv("smbios.bios.reldate"); for (i = 0; i < nitems(quirks); i++) if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) && @@ -154,6 +155,16 @@ atkbdc_getquirks(void) QUIRK_STR_EQUAL(quirks[i].product, product) && QUIRK_STR_MATCH(quirks[i].version, version)) return (quirks[i].quirk); + /* + * Some Chromebooks don't conform to the google comment above so do the + * Chromebook workaround for all <= 2018 coreboot systems that have a + * 'blank' version. At least one Acer "Peppy" chromebook has this issue, + * with a reldate of 08/13/2014. + */ + if (QUIRK_STR_EQUAL("coreboot", bios_vendor) && + (version != NULL && *version == ' ') && + (reldate != NULL && strlen(reldate) >= 10 && strcmp(reldate + 6, "2018") <= 0)) + return (CHROMEBOOK_WORKAROUND); return (0); }