From: kettenis Date: Fri, 23 Feb 2024 21:52:12 +0000 (+0000) Subject: There is a 21BY x13s model. Handle it like 21BX. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d6abfaa72527d02029bfbd24839325afe4a8bc7e;p=openbsd There is a 21BY x13s model. Handle it like 21BX. ok beck@, deraadt@ --- 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 @@ -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 @@ -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;