From nobody Tue Jan 13 16:27:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4drF5q3mp9z6NMtt for ; Tue, 13 Jan 2026 16:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4drF5q14Yrz3L4s for ; Tue, 13 Jan 2026 16:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768321663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8Yqv/+/sA7iN5gtRAqc2nDZf8Q2odZU428TbVMqkyM=; b=HE7lbOEkkGuxaynZOkOuIEJe0chBf/XTAVHZvcdtl8B+M5u3U0tucvp2Xir5NgElV6+Hhz hDb0t+vzTUFYZTCKlm1IFTvoMT4NTQpfD8vhTOU7qC5dODUGqdVFkGQt4kx5CyAGpMGF69 Y47WtAK3HjvA6zyJ8mq0aFVYoAMEVi0RSSD8V7QOJtun5YdTXEhRdj+OLSJOBdnD2z4plG ZJQqI7zwngaMH7+WIg2G2FyIkxALR8J4kmkdAf7xwZRvq4zvGi5OB7JSIubPq8IthDb+HN WWtcn+qZQw6m3SkJH9uUnSRxCfcXZMnR6dlyZMLw9QH5JEKVUFrqurkI46wLZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768321663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8Yqv/+/sA7iN5gtRAqc2nDZf8Q2odZU428TbVMqkyM=; b=o8N/NtuzgGFZbTSuFL+RFGpqmnlt7AHgCfpSEn5ekuKX3WjZaZLA/5tHM6yLjc1jFw7EI2 Dlfkd3h6NWGvTOpsGsnyinK8XHhvCuvyUJmYkTW2GchYbmW24z5zt5rcpvZa9UGY7sl8lK /6juiDL8ph2abUClhUAMLFMMy1v6sG083fe9aIbHo1zYhRcPbKVM++2mwe0L1AD+HzTbGT josJ5107bDyFMWZONTCDsVFWaBqv0C6FV6ZAjS4LaJjqhNlvFyTTPcxU5UsUTlZtHv45He EdeSUCdOkLppdp3+l0J5KbqwjWtxuXcZXioNe7SfayxKOHqZUzBNV9bxG3fARg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768321663; a=rsa-sha256; cv=none; b=KoEacLQ0LiYqR4yxNot632PS7XbpHqCLiDZLiRF+wyzLvnEwQLolUFBPHYTyWFzSUwSVrP /DN/jV30djujOsYsIG5xFsdOQgR1iTzPP0szvOuy/o8jrVlbPvjIXPUGLKtrAbem8eycTp Q8UvwdSXZm2OfztC+HOqgHTScPCAol2vZ/HKXNKyJkC0dQ+XFYIdgFBqmR9KiDWnTMxw5S JZzmkDLGj5rT7SLmuWh6EcClXNXbzH39o7QEYQ6lX0UpjGYV50IL9BIB0MSd/+5gz5Qa2j 1qy4JLqA+vKm6BgSCv4ODWPIHSds4HlqYZ1Nf2Km8ZlMuY0IL6UbDAuFnkz5ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4drF5q0VT2z4pB for ; Tue, 13 Jan 2026 16:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30515 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 13 Jan 2026 16:27:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4f3be1e456e3 - stable/15 - arm64: Add non-PCI MSI support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4f3be1e456e3cba17b764f1807f886aea7ce0444 Auto-Submitted: auto-generated Date: Tue, 13 Jan 2026 16:27:43 +0000 Message-Id: <6966727f.30515.6e25961@gitrepo.freebsd.org> The branch stable/15 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4f3be1e456e3cba17b764f1807f886aea7ce0444 commit 4f3be1e456e3cba17b764f1807f886aea7ce0444 Author: Andrew Turner AuthorDate: 2025-11-18 18:00:30 +0000 Commit: Andrew Turner CommitDate: 2026-01-13 14:06:20 +0000 arm64: Add non-PCI MSI support Add the arm64 parts to support for non-PCI MSI and MSI-X interrupts. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D53331 (cherry picked from commit 4713f54013176fc73ada29cf094016fd3b328c80) --- sys/arm64/arm64/nexus.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 26b3389db172..012bf859eb3c 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -72,6 +72,8 @@ #include "acpi_bus_if.h" #endif +#include "pcib_if.h" + extern struct bus_space memmap_bus; static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); @@ -123,6 +125,15 @@ static bus_get_bus_tag_t nexus_get_bus_tag; #ifdef FDT static ofw_bus_map_intr_t nexus_ofw_map_intr; +/* + * PCIB interface + */ +static pcib_alloc_msi_t nexus_fdt_pcib_alloc_msi; +static pcib_release_msi_t nexus_fdt_pcib_release_msi; +static pcib_alloc_msix_t nexus_fdt_pcib_alloc_msix; +static pcib_release_msix_t nexus_fdt_pcib_release_msix; +static pcib_map_msi_t nexus_fdt_pcib_map_msi; + #endif static device_method_t nexus_methods[] = { @@ -441,6 +452,13 @@ static device_method_t nexus_fdt_methods[] = { /* OFW interface */ DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), + /* PCIB interface */ + DEVMETHOD(pcib_alloc_msi, nexus_fdt_pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, nexus_fdt_pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, nexus_fdt_pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, nexus_fdt_pcib_release_msix), + DEVMETHOD(pcib_map_msi, nexus_fdt_pcib_map_msi), + DEVMETHOD_END, }; @@ -518,6 +536,73 @@ nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, irq = intr_map_irq(NULL, iparent, (struct intr_map_data *)fdt_data); return (irq); } + +static int +nexus_fdt_pcib_alloc_msi(device_t dev, device_t child, int count, int maxcount, + int *irqs) +{ + phandle_t msi_parent; + int error; + + error = ofw_bus_msimap(ofw_bus_get_node(child), 0, &msi_parent, NULL); + if (error != 0) + return (error); + + return (intr_alloc_msi(dev, child, msi_parent, count, maxcount, irqs)); +} + +static int +nexus_fdt_pcib_release_msi(device_t dev, device_t child, int count, int *irqs) +{ + phandle_t msi_parent; + int error; + + error = ofw_bus_msimap(ofw_bus_get_node(child), 0, &msi_parent, NULL); + if (error != 0) + return (error); + + return (intr_release_msi(dev, child, msi_parent, count, irqs)); +} + +static int +nexus_fdt_pcib_alloc_msix(device_t dev, device_t child, int *irq) +{ + phandle_t msi_parent; + int error; + + error = ofw_bus_msimap(ofw_bus_get_node(child), 0, &msi_parent, NULL); + if (error != 0) + return (error); + + return (intr_alloc_msix(dev, child, msi_parent, irq)); +} + +static int +nexus_fdt_pcib_release_msix(device_t dev, device_t child, int irq) +{ + phandle_t msi_parent; + int error; + + error = ofw_bus_msimap(ofw_bus_get_node(child), 0, &msi_parent, NULL); + if (error != 0) + return (error); + + return (intr_release_msix(dev, child, msi_parent, irq)); +} + +static int +nexus_fdt_pcib_map_msi(device_t dev, device_t child, int irq, uint64_t *addr, + uint32_t *data) +{ + phandle_t msi_parent; + int error; + + error = ofw_bus_msimap(ofw_bus_get_node(child), 0, &msi_parent, NULL); + if (error != 0) + return (error); + + return (intr_map_msi(dev, child, msi_parent, irq, addr, data)); +} #endif #ifdef DEV_ACPI