commit 26a40d9e37747a58e21e4c9ff3865c199d9d9c6f from: kettenis date: Tue Jul 02 08:27:04 2024 UTC Do not attach acpitz(4) if the _STA method indicates that a thermal zone isn't present. While it isn't clear whether _STA applies to thermal zones according to the ACPI standard, this prevents issues on the Asus Vivobook S15. ok miod@, patrick@, deraadt@ commit - fba61c05da5518ae35886775e121ceb49de39a8e commit + 26a40d9e37747a58e21e4c9ff3865c199d9d9c6f blob - b7b0fd59bdb6bebd4b405cc3acdea104f5171202 blob + 82098deebb385b2e7fb81d0a10f39c428c39c81d --- sys/dev/acpi/acpi.c +++ sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.432 2024/06/25 11:57:10 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.433 2024/07/02 08:27:04 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -2203,6 +2203,7 @@ acpi_add_device(struct aml_node *node, void *arg) CPU_INFO_ITERATOR cii; struct cpu_info *ci; int proc_id = -1; + int64_t sta; memset(&aaa, 0, sizeof(aaa)); aaa.aaa_node = node; @@ -2233,6 +2234,10 @@ acpi_add_device(struct aml_node *node, void *arg) aaa.aaa_name = "acpicpu"; break; case AML_OBJTYPE_THERMZONE: + sta = acpi_getsta(sc, node); + if ((sta & STA_PRESENT) == 0) + return 0; + aaa.aaa_name = "acpitz"; break; case AML_OBJTYPE_POWERRSRC: