From 12199e7c6c1482a1e3086dfaf4f53f88e5a9b24c Mon Sep 17 00:00:00 2001 From: jmatthew Date: Sat, 16 Sep 2023 23:25:16 +0000 Subject: [PATCH] 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@ --- sys/arch/arm64/dev/acpipci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.20.1