Index: sys/arm64/arm64/gicv3_its.c =================================================================== --- sys/arm64/arm64/gicv3_its.c +++ sys/arm64/arm64/gicv3_its.c @@ -1411,10 +1411,13 @@ struct gicv3_its_irqsrc *girq; sc = device_get_softc(dev); - girq = (struct gicv3_its_irqsrc *)isrc; *addr = vtophys(rman_get_virtual(sc->sc_its_res)) + GITS_TRANSLATER; - *data = girq->gi_id; + + if (isrc != NULL && data != NULL) { + girq = (struct gicv3_its_irqsrc *)isrc; + *data = girq->gi_id; + } return (0); } Index: sys/kern/subr_intr.c =================================================================== --- sys/kern/subr_intr.c +++ sys/kern/subr_intr.c @@ -1441,9 +1441,12 @@ ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); - isrc = intr_map_get_isrc(irq); - if (isrc == NULL) - return (EINVAL); + if (irq >= 0) { + isrc = intr_map_get_isrc(irq); + if (isrc == NULL) + return (EINVAL); + } else + isrc = NULL; err = MSI_MAP_MSI(pic->pic_dev, child, isrc, addr, data); return (err);