Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151948044
D40789.id123984.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D40789.id123984.diff
View Options
diff --git a/UPDATING b/UPDATING
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,12 @@
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20230629:
+ The heuristic for detecting old chromebooks with an EC bug that requires
+ atkbdc driver workarounds has changed. There should be no functional
+ change, but if your old chromebook's keyboard stops working, please
+ file a PR and assign it to imp.
+
20230623:
OpenSSL has been updated to version 3.0, including changes throughout
the base system. It is important to rebuild third-party software
diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c
--- a/sys/dev/atkbdc/atkbdc.c
+++ b/sys/dev/atkbdc/atkbdc.c
@@ -109,21 +109,37 @@
const char *bios_vendor;
const char *maker;
const char *product;
+ const char *version;
int quirk;
};
+/* Old chromebooks running coreboot with i8042 emulation quirks */
+#define CHROMEBOOK_WORKAROUND \
+ (KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | \
+ KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT)
+
static struct atkbdc_quirks quirks[] = {
- {"coreboot", "System76", NULL, 0},
- {"coreboot", "Purism", NULL, 0},
- {"coreboot", NULL, NULL,
- KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT |
- KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT},
+ /*
+ * Older chromebooks running coreboot have an EC that imperfectly emulates
+ * i8042 w/o fixes to its firmware. Since we can't probe for the problem,
+ * include all chromebooks by matching 'Google_' in the bios version string
+ * or a maker of either 'Google' or 'GOOGLE'. This is imperfect, but catches
+ * all chromebooks while omitting non-Google systems from System76 and
+ * Purism.
+ */
+ {"coreboot", NULL, NULL, "Google_", CHROMEBOOK_WORKAROUND},
+ {"coreboot", "GOOGLE", NULL, NULL, CHROMEBOOK_WORKAROUND},
+ {"coreboot", "Google", NULL, NULL, CHROMEBOOK_WORKAROUND},
/* KBDC hangs on Lenovo X120e and X121e after disabling AUX MUX */
- {NULL, "LENOVO", NULL, KBDC_QUIRK_DISABLE_MUX_PROBE},
+ {NULL, "LENOVO", NULL, NULL, KBDC_QUIRK_DISABLE_MUX_PROBE},
};
-#define QUIRK_STR_MATCH(s1, s2) (s1 == NULL || \
- (s2 != NULL && !strcmp(s1, s2)))
+#define QUIRK_STR_EQUAL(s1, s2) \
+ (s1 == NULL || \
+ (s2 != NULL && strcmp(s1, s2) == 0))
+#define QUIRK_STR_MATCH(s1, s2) \
+ (s1 == NULL || \
+ (s2 != NULL && strncmp(s1, s2, strlen(s1)) == 0))
static int
atkbdc_getquirks(void)
@@ -132,11 +148,13 @@
char *bios_vendor = kern_getenv("smbios.bios.vendor");
char *maker = kern_getenv("smbios.system.maker");
char *product = kern_getenv("smbios.system.product");
+ char *version = kern_getenv("smbios.bios.version");
for (i = 0; i < nitems(quirks); i++)
- if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) &&
- QUIRK_STR_MATCH(quirks[i].maker, maker) &&
- QUIRK_STR_MATCH(quirks[i].product, product))
+ if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) &&
+ QUIRK_STR_EQUAL(quirks[i].maker, maker) &&
+ QUIRK_STR_EQUAL(quirks[i].product, product) &&
+ QUIRK_STR_MATCH(quirks[i].version, version))
return (quirks[i].quirk);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 5:04 PM (5 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31328496
Default Alt Text
D40789.id123984.diff (3 KB)
Attached To
Mode
D40789: atkbc: Better test for old chromebooks
Attached
Detach File
Event Timeline
Log In to Comment