From 56d02c00c34befa82f36a0070f336a6b39010607 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 3 Feb 2024 10:37:25 +0000 Subject: [PATCH] Implement Multiple Message MSI support on arm64. As on amd64 this is experimental code to assis qwx(4) development. Currently this only works on systems that use agintcmsi(4) as the MSI controller combined with the dwpcie(4) Hots/PCIe bridge. ok patrick@ --- sys/arch/arm64/dev/acpipci.c | 5 ++- sys/arch/arm64/dev/agintc.c | 14 ++++-- sys/arch/arm64/dev/aplpcie.c | 4 +- sys/arch/arm64/dev/pci_machdep.c | 61 ++++++++++++++++++++++++-- sys/arch/arm64/include/pci_machdep.h | 10 ++++- sys/arch/riscv64/dev/pci_machdep.c | 9 +++- sys/arch/riscv64/include/pci_machdep.h | 6 ++- sys/dev/fdt/bcm2711_pcie.c | 3 +- sys/dev/fdt/dwpcie.c | 8 +++- sys/dev/fdt/mvkpcie.c | 5 ++- sys/dev/fdt/pciecam.c | 5 ++- sys/dev/fdt/rkpcie.c | 5 ++- sys/dev/pci/pcivar.h | 16 ++++--- 13 files changed, 124 insertions(+), 27 deletions(-) diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c index dc2cba60b4f..ff204aa22d5 100644 --- a/sys/arch/arm64/dev/acpipci.c +++ b/sys/arch/arm64/dev/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.41 2023/09/16 23:25:16 jmatthew Exp $ */ +/* $OpenBSD: acpipci.c,v 1.42 2024/02/03 10:37:25 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -207,6 +207,7 @@ acpipci_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc->pc_intr_v = sc; sc->sc_pc->pc_intr_map = acpipci_intr_map; sc->sc_pc->pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc->pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc->pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc->pc_intr_string = acpipci_intr_string; sc->sc_pc->pc_intr_establish = acpipci_intr_establish; @@ -629,7 +630,7 @@ acpipci_intr_establish(void *v, pci_intr_handle_t ih, int level, if (ih.ih_type != PCI_INTX) { struct interrupt_controller *ic = sc->sc_msi_ic; bus_dma_segment_t seg; - uint64_t addr, data; + uint64_t addr = 0, data; KASSERT(ic); diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 944e5472592..df9b70a9067 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.54 2023/09/22 01:10:43 jsg Exp $ */ +/* $OpenBSD: agintc.c,v 1.55 2024/02/03 10:37:25 kettenis Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn * Copyright (c) 2018 Mark Kettenis @@ -1540,7 +1540,7 @@ struct agintc_msi_device { LIST_ENTRY(agintc_msi_device) md_list; uint32_t md_deviceid; - uint32_t md_eventid; + uint32_t md_events; struct agintc_dmamem *md_itt; }; @@ -1949,7 +1949,15 @@ agintc_intr_establish_msi(void *self, uint64_t *addr, uint64_t *data, if (md == NULL) return NULL; - eventid = md->md_eventid++; + eventid = *addr; + if (eventid > 0 && (md->md_events & (1U << eventid))) + return NULL; + for (; eventid < 32; eventid++) { + if ((md->md_events & (1U << eventid)) == 0) { + md->md_events |= (1U << eventid); + break; + } + } if (eventid >= 32) return NULL; diff --git a/sys/arch/arm64/dev/aplpcie.c b/sys/arch/arm64/dev/aplpcie.c index fae016ee23f..133cba97e74 100644 --- a/sys/arch/arm64/dev/aplpcie.c +++ b/sys/arch/arm64/dev/aplpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplpcie.c,v 1.18 2023/12/28 13:32:56 kettenis Exp $ */ +/* $OpenBSD: aplpcie.c,v 1.19 2024/02/03 10:37:25 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -405,6 +405,7 @@ aplpcie_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = aplpcie_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = aplpcie_intr_string; sc->sc_pc.pc_intr_establish = aplpcie_intr_establish; @@ -939,6 +940,7 @@ aplpcie_intr_establish(void *v, pci_intr_handle_t ih, int level, if (ih.ih_type != PCI_INTX) { uint64_t addr, data; + addr = data = 0; cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr, &data, level, ci, func, arg, name); if (cookie == NULL) diff --git a/sys/arch/arm64/dev/pci_machdep.c b/sys/arch/arm64/dev/pci_machdep.c index efdf2a57002..86b8edd679f 100644 --- a/sys/arch/arm64/dev/pci_machdep.c +++ b/sys/arch/arm64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.5 2021/03/22 20:30:21 patrick Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.6 2024/02/03 10:37:25 kettenis Exp $ */ /* * Copyright (c) 2019 Mark Kettenis @@ -24,16 +24,45 @@ #include #include +int +pci_intr_enable_msivec(struct pci_attach_args *pa, int num_vec) +{ + pci_chipset_tag_t pc = pa->pa_pc; + pcitag_t tag = pa->pa_tag; + pcireg_t reg; + int mmc, mme, off; + + if ((pa->pa_flags & PCI_FLAGS_MSI_ENABLED) == 0 || + pci_get_capability(pc, tag, PCI_CAP_MSI, &off, ®) == 0) + return 1; + + mmc = ((reg & PCI_MSI_MC_MMC_MASK) >> PCI_MSI_MC_MMC_SHIFT); + if (num_vec > (1 << mmc)) + return 1; + + mme = ((reg & PCI_MSI_MC_MME_MASK) >> PCI_MSI_MC_MME_SHIFT); + while ((1 << mme) < num_vec) + mme++; + reg &= ~PCI_MSI_MC_MME_MASK; + reg |= (mme << PCI_MSI_MC_MME_SHIFT); + pci_conf_write(pc, tag, off, reg); + + return 0; +} + void pci_msi_enable(pci_chipset_tag_t pc, pcitag_t tag, bus_addr_t addr, uint32_t data) { pcireg_t reg; - int off; + int mme, off; if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, ®) == 0) panic("%s: no msi capability", __func__); + mme = ((reg & PCI_MSI_MC_MME_MASK) >> PCI_MSI_MC_MME_SHIFT); + data &= ~((1 << mme) - 1); + if (reg & PCI_MSI_MC_C64) { pci_conf_write(pc, tag, off + PCI_MSI_MA, addr); pci_conf_write(pc, tag, off + PCI_MSI_MAU32, addr >> 32); @@ -128,6 +157,33 @@ _pci_intr_map_msi(struct pci_attach_args *pa, pci_intr_handle_t *ihp) ihp->ih_pc = pa->pa_pc; ihp->ih_tag = pa->pa_tag; + ihp->ih_intrpin = 0; + ihp->ih_type = PCI_MSI; + ihp->ih_dmat = pa->pa_dmat; + + return 0; +} + +int +_pci_intr_map_msivec(struct pci_attach_args *pa, int vec, + pci_intr_handle_t *ihp) +{ + pci_chipset_tag_t pc = pa->pa_pc; + pcitag_t tag = pa->pa_tag; + pcireg_t reg; + int mme, off; + + if ((pa->pa_flags & PCI_FLAGS_MSIVEC_ENABLED) == 0 || + pci_get_capability(pc, tag, PCI_CAP_MSI, &off, ®) == 0) + return -1; + + mme = ((reg & PCI_MSI_MC_MME_MASK) >> PCI_MSI_MC_MME_SHIFT); + if (vec >= (1 << mme)) + return -1; + + ihp->ih_pc = pa->pa_pc; + ihp->ih_tag = pa->pa_tag; + ihp->ih_intrpin = vec; ihp->ih_type = PCI_MSI; ihp->ih_dmat = pa->pa_dmat; @@ -164,4 +220,3 @@ _pci_intr_map_msix(struct pci_attach_args *pa, int vec, return 0; } - diff --git a/sys/arch/arm64/include/pci_machdep.h b/sys/arch/arm64/include/pci_machdep.h index 3cb9be099ab..a2ccd3b0908 100644 --- a/sys/arch/arm64/include/pci_machdep.h +++ b/sys/arch/arm64/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.11 2021/06/11 12:23:52 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.12 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -70,6 +70,8 @@ struct machine_pci_chipset { pci_intr_handle_t *); int (*pc_intr_map_msi)(struct pci_attach_args *, pci_intr_handle_t *); + int (*pc_intr_map_msivec)(struct pci_attach_args *, + int, pci_intr_handle_t *); int (*pc_intr_map_msix)(struct pci_attach_args *, int, pci_intr_handle_t *); const char *(*pc_intr_string)(void *, pci_intr_handle_t); @@ -102,6 +104,8 @@ struct machine_pci_chipset { (*(c)->pa_pc->pc_intr_map)((c), (ihp)) #define pci_intr_map_msi(c, ihp) \ (*(c)->pa_pc->pc_intr_map_msi)((c), (ihp)) +#define pci_intr_map_msivec(c, vec, ihp) \ + (*(c)->pa_pc->pc_intr_map_msivec)((c), (vec), (ihp)) #define pci_intr_map_msix(c, vec, ihp) \ (*(c)->pa_pc->pc_intr_map_msix)((c), (vec), (ihp)) #define pci_intr_string(c, ih) \ @@ -123,10 +127,14 @@ struct machine_pci_chipset { void pci_mcfg_init(bus_space_tag_t, bus_addr_t, int, int, int); pci_chipset_tag_t pci_lookup_segment(int); +int pci_intr_enable_msivec(struct pci_attach_args *, int); + void pci_msi_enable(pci_chipset_tag_t, pcitag_t, bus_addr_t, uint32_t); void pci_msix_enable(pci_chipset_tag_t, pcitag_t, bus_space_tag_t, int, bus_addr_t, uint32_t); int _pci_intr_map_msi(struct pci_attach_args *, pci_intr_handle_t *); +int _pci_intr_map_msivec(struct pci_attach_args *, int, + pci_intr_handle_t *); int _pci_intr_map_msix(struct pci_attach_args *, int, pci_intr_handle_t *); #define __HAVE_PCI_MSIX diff --git a/sys/arch/riscv64/dev/pci_machdep.c b/sys/arch/riscv64/dev/pci_machdep.c index 59d08ad7171..2327d964c6c 100644 --- a/sys/arch/riscv64/dev/pci_machdep.c +++ b/sys/arch/riscv64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.1 2021/05/19 19:32:25 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.2 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2019 Mark Kettenis @@ -134,6 +134,13 @@ _pci_intr_map_msi(struct pci_attach_args *pa, pci_intr_handle_t *ihp) return 0; } +int +_pci_intr_map_msivec(struct pci_attach_args *pa, int vec, + pci_intr_handle_t *ihp) +{ + return -1; +} + int _pci_intr_map_msix(struct pci_attach_args *pa, int vec, pci_intr_handle_t *ihp) diff --git a/sys/arch/riscv64/include/pci_machdep.h b/sys/arch/riscv64/include/pci_machdep.h index c3cc801302a..066d78668f5 100644 --- a/sys/arch/riscv64/include/pci_machdep.h +++ b/sys/arch/riscv64/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.3 2021/06/14 08:19:39 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.4 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -70,6 +70,8 @@ struct machine_pci_chipset { pci_intr_handle_t *); int (*pc_intr_map_msi)(struct pci_attach_args *, pci_intr_handle_t *); + int (*pc_intr_map_msivec)(struct pci_attach_args *, + int, pci_intr_handle_t *); int (*pc_intr_map_msix)(struct pci_attach_args *, int, pci_intr_handle_t *); const char *(*pc_intr_string)(void *, pci_intr_handle_t); @@ -127,6 +129,8 @@ void pci_msi_enable(pci_chipset_tag_t, pcitag_t, bus_addr_t, uint32_t); void pci_msix_enable(pci_chipset_tag_t, pcitag_t, bus_space_tag_t, int, bus_addr_t, uint32_t); int _pci_intr_map_msi(struct pci_attach_args *, pci_intr_handle_t *); +int _pci_intr_map_msivec(struct pci_attach_args *, int, + pci_intr_handle_t *); int _pci_intr_map_msix(struct pci_attach_args *, int, pci_intr_handle_t *); #define __HAVE_PCI_MSIX diff --git a/sys/dev/fdt/bcm2711_pcie.c b/sys/dev/fdt/bcm2711_pcie.c index c8d9225d0b9..044cdf9d424 100644 --- a/sys/dev/fdt/bcm2711_pcie.c +++ b/sys/dev/fdt/bcm2711_pcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcm2711_pcie.c,v 1.11 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: bcm2711_pcie.c,v 1.12 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -299,6 +299,7 @@ bcmpcie_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = bcmpcie_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = bcmpcie_intr_string; sc->sc_pc.pc_intr_establish = bcmpcie_intr_establish; diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index 0c3a4a6aea8..df11a4c04c5 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.50 2023/09/21 19:39:41 patrick Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.51 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -711,6 +711,7 @@ dwpcie_attach_deferred(struct device *self) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = dwpcie_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = dwpcie_intr_string; sc->sc_pc.pc_intr_establish = dwpcie_intr_establish; @@ -729,6 +730,8 @@ dwpcie_attach_deferred(struct device *self) OF_getproplen(sc->sc_node, "msi-map") > 0 || sc->sc_msi_addr) pba.pba_flags |= PCI_FLAGS_MSI_ENABLED; + if (OF_getproplen(sc->sc_node, "msi-map") > 0) + pba.pba_flags |= PCI_FLAGS_MSIVEC_ENABLED; /* XXX No working MSI on RK3588 yet. */ if (OF_is_compatible(sc->sc_node, "rockchip,rk3588-pcie")) @@ -1835,6 +1838,8 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ih, int level, uint64_t addr, data; if (sc->sc_msi_addr) { + if (ih.ih_type == PCI_MSI && ih.ih_intrpin > 0) + return NULL; dm = dwpcie_msi_establish(sc, level, func, arg, name); if (dm == NULL) return NULL; @@ -1845,6 +1850,7 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ih, int level, * Assume hardware passes Requester ID as * sideband data. */ + addr = ih.ih_intrpin; data = pci_requester_id(ih.ih_pc, ih.ih_tag); cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr, &data, level, ci, func, arg, (void *)name); diff --git a/sys/dev/fdt/mvkpcie.c b/sys/dev/fdt/mvkpcie.c index 592adfa48f8..7620b87387e 100644 --- a/sys/dev/fdt/mvkpcie.c +++ b/sys/dev/fdt/mvkpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mvkpcie.c,v 1.13 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: mvkpcie.c,v 1.14 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * Copyright (c) 2020 Patrick Wildt @@ -528,6 +528,7 @@ mvkpcie_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = mvkpcie_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = mvkpcie_intr_string; sc->sc_pc.pc_intr_establish = mvkpcie_intr_establish; @@ -783,7 +784,7 @@ mvkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level, KASSERT(ih.ih_type != PCI_NONE); if (ih.ih_type != PCI_INTX) { - uint64_t addr, data; + uint64_t addr = 0, data; /* Assume hardware passes Requester ID as sideband data. */ data = pci_requester_id(ih.ih_pc, ih.ih_tag); diff --git a/sys/dev/fdt/pciecam.c b/sys/dev/fdt/pciecam.c index ffae96f0b0a..60b16e0ca3c 100644 --- a/sys/dev/fdt/pciecam.c +++ b/sys/dev/fdt/pciecam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciecam.c,v 1.4 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: pciecam.c,v 1.5 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2013,2017 Patrick Wildt * @@ -245,6 +245,7 @@ pciecam_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = pciecam_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = pciecam_intr_string; sc->sc_pc.pc_intr_establish = pciecam_intr_establish; @@ -391,7 +392,7 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ih, int level, KASSERT(ih.ih_type != PCI_NONE); if (ih.ih_type != PCI_INTX) { - uint64_t addr, data; + uint64_t addr = 0, data; /* Assume hardware passes Requester ID as sideband data. */ data = pci_requester_id(ih.ih_pc, ih.ih_tag); diff --git a/sys/dev/fdt/rkpcie.c b/sys/dev/fdt/rkpcie.c index 78fe0a4932b..38598e7340f 100644 --- a/sys/dev/fdt/rkpcie.c +++ b/sys/dev/fdt/rkpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkpcie.c,v 1.17 2023/04/11 00:45:08 jsg Exp $ */ +/* $OpenBSD: rkpcie.c,v 1.18 2024/02/03 10:37:26 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -372,6 +372,7 @@ rkpcie_attach(struct device *parent, struct device *self, void *aux) sc->sc_pc.pc_intr_v = sc; sc->sc_pc.pc_intr_map = rkpcie_intr_map; sc->sc_pc.pc_intr_map_msi = _pci_intr_map_msi; + sc->sc_pc.pc_intr_map_msivec = _pci_intr_map_msivec; sc->sc_pc.pc_intr_map_msix = _pci_intr_map_msix; sc->sc_pc.pc_intr_string = rkpcie_intr_string; sc->sc_pc.pc_intr_establish = rkpcie_intr_establish; @@ -605,7 +606,7 @@ rkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level, KASSERT(ih.ih_type != PCI_NONE); if (ih.ih_type != PCI_INTX) { - uint64_t addr, data; + uint64_t addr = 0, data; /* Assume hardware passes Requester ID as sideband data. */ data = pci_requester_id(ih.ih_pc, ih.ih_tag); diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index fa009f96b28..a595e919ebf 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.78 2023/04/13 15:07:43 miod Exp $ */ +/* $OpenBSD: pcivar.h,v 1.79 2024/02/03 10:37:26 kettenis Exp $ */ /* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -161,13 +161,15 @@ struct pci_attach_args { * * OpenBSD doesn't actually use them yet -- csapuntz@cvs.openbsd.org */ -#define PCI_FLAGS_IO_ENABLED 0x01 /* I/O space is enabled */ -#define PCI_FLAGS_MEM_ENABLED 0x02 /* memory space is enabled */ -#define PCI_FLAGS_MRL_OKAY 0x04 /* Memory Read Line okay */ -#define PCI_FLAGS_MRM_OKAY 0x08 /* Memory Read Multiple okay */ -#define PCI_FLAGS_MWI_OKAY 0x10 /* Memory Write and Invalidate +#define PCI_FLAGS_IO_ENABLED 0x01 /* I/O space is enabled */ +#define PCI_FLAGS_MEM_ENABLED 0x02 /* memory space is enabled */ +#define PCI_FLAGS_MRL_OKAY 0x04 /* Memory Read Line okay */ +#define PCI_FLAGS_MRM_OKAY 0x08 /* Memory Read Multiple okay */ +#define PCI_FLAGS_MWI_OKAY 0x10 /* Memory Write and Invalidate okay */ -#define PCI_FLAGS_MSI_ENABLED 0x20 /* Message Signaled Interrupt +#define PCI_FLAGS_MSI_ENABLED 0x20 /* Message Signaled Interrupt + enabled */ +#define PCI_FLAGS_MSIVEC_ENABLED 0x40 /* Multiple Message Capability enabled */ /* -- 2.20.1