CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2019/06/10 18:45:31

Modified files:
        sys/arch/sparc64/dev: pci_machdep.c pyro.c vpci.c 
        sys/arch/sparc64/include: pci_machdep.h 

Log message:
implement msi-x support on sparc64.

this is mostly based on the stuff kettenis did on arm64 recently.
msix support is basically the same as msi support from the host
side, you just have to tell the actual device about the msi vectors
differently.

the most complicated part of this is storing the requested msix
vector between the call to pci_intr_map_msix and pci_intr_establish.
the pci_intr_handle_t for storing state between those is a scalar
type, so we reassign some bits in that int for use storing the type
of int (intx, msi, or msix) and the vector.

i took the low 8 bits for storing the vector, which gives us a max
of 256 values. technically msix supports up to 2048 vectors, but
pyro only supports 256 in total, so i don't think we're going to
miss out on much. vpci may support more, but we'll cross that bridge
when we get to it.

i tested pyro(4) with mcx(4).
vpci was tested by kettenis@

ok kettenis@

Reply via email to