From: jmatthew Date: Sat, 16 Sep 2023 23:25:16 +0000 (+0000) Subject: Skip non-MSI interrupt controllers when looking for one matching the ITS id X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=12199e7c6c1482a1e3086dfaf4f53f88e5a9b24c;p=openbsd Skip non-MSI interrupt controllers when looking for one matching the ITS id given in the IORT node. Using a non-MSI interrupt controller here will crash as ic->ic_establish_msi will be NULL. tested by phessler@ ok phessler@ patrick@ --- diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index 937b2c53e0a..dc2cba60b4f 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.40 2023/09/12 08:32:58 jmatthew Exp $ */ +/* $OpenBSD: acpipci.c,v 1.41 2023/09/16 23:25:16 jmatthew Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -844,7 +844,8 @@ acpipci_iort_map(struct acpi_iort *iort, uint32_t offset, uint32_t id, itsn = (struct acpi_iort_its_node *)&node[1]; LIST_FOREACH(icl, &interrupt_controllers, ic_list) { for (i = 0; i < itsn->number_of_itss; i++) { - if (icl->ic_gic_its_id == itsn->its_ids[i]) { + if (icl->ic_establish_msi != NULL && + icl->ic_gic_its_id == itsn->its_ids[i]) { *ic = icl; break; }