diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-02-23 21:52:13 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-02-23 21:52:13 +0000 |
commit | c72d8c6fa284a49d39127f7455ad73ae47ef1e06 (patch) | |
tree | c210b03bc84c639a10faad88f4565043d5ecaec3 /sys | |
parent | 0363d5143155ca6878a43a708d407f21bde9f46c (diff) |
There is a 21BY x13s model. Handle it like 21BX.
ok beck@, deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm64/arm64/cpu.c | 12 | ||||
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efiboot.c | 16 |
2 files changed, 16 insertions, 12 deletions
diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index c53fb461d72..5e8f48ab75d 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -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); diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index ca2cd2358ab..7d1c1b7ca4e 100644 --- a/sys/arch/arm64/stand/efiboot/efiboot.c +++ b/sys/arch/arm64/stand/efiboot/efiboot.c @@ -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; |