There is a 21BY x13s model. Handle it like 21BX.
authorkettenis <kettenis@openbsd.org>
Fri, 23 Feb 2024 21:52:12 +0000 (21:52 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 23 Feb 2024 21:52:12 +0000 (21:52 +0000)
ok beck@, deraadt@

sys/arch/arm64/arm64/cpu.c
sys/arch/arm64/stand/efiboot/efiboot.c

index c53fb46..5e8f48a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.104 2024/02/21 21:50:17 jsg Exp $   */
+/*     $OpenBSD: cpu.c,v 1.105 2024/02/23 21:52:12 kettenis Exp $      */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -938,10 +938,12 @@ cpu_attach(struct device *parent, struct device *dev, void *aux)
                 * Lenovo X13s ships with broken EL2 firmware that
                 * hangs the machine if we enable PAuth.
                 */
-               if (hw_vendor && strcmp(hw_vendor, "LENOVO") == 0 &&
-                   hw_prod && strncmp(hw_prod, "21BX", 4) == 0) {
-                       cpu_id_aa64isar1 &= ~ID_AA64ISAR1_APA_MASK;
-                       cpu_id_aa64isar1 &= ~ID_AA64ISAR1_GPA_MASK;
+               if (hw_vendor && hw_prod && strcmp(hw_vendor, "LENOVO") == 0) {
+                       if (strncmp(hw_prod, "21BX", 4) == 0 ||
+                           strncmp(hw_prod, "21BY", 4) == 0) {
+                               cpu_id_aa64isar1 &= ~ID_AA64ISAR1_APA_MASK;
+                               cpu_id_aa64isar1 &= ~ID_AA64ISAR1_GPA_MASK;
+                       }
                }
 
                cpu_identify(ci);
index ca2cd23..7d1c1b7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: efiboot.c,v 1.49 2024/02/04 18:44:23 kettenis Exp $   */
+/*     $OpenBSD: efiboot.c,v 1.50 2024/02/23 21:52:12 kettenis Exp $   */
 
 /*
  * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -1121,12 +1121,14 @@ efi_fdt(void)
        if (hw_vendor == NULL || hw_prod == NULL)
                return fdt_sys;
 
-       if (strcmp(hw_vendor, "LENOVO") == 0 &&
-           strncmp(hw_prod, "21BX", 4) == 0) {
-               fdt_load_override(FW_PATH
-                   "qcom/sc8280xp-lenovo-thinkpad-x13s.dtb");
-               /* TODO: find a better mechanism */
-               cnset(ttydev("fb0"));
+       if (strcmp(hw_vendor, "LENOVO") == 0) {
+               if (strncmp(hw_prod, "21BX", 4) == 0 ||
+                   strncmp(hw_prod, "21BY", 4) == 0) {
+                       fdt_load_override(FW_PATH
+                           "qcom/sc8280xp-lenovo-thinkpad-x13s.dtb");
+                       /* TODO: find a better mechanism */
+                       cnset(ttydev("fb0"));
+               }
        }
 
        return fdt_override ? fdt_override : fdt_sys;