diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-17 07:54:58 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-17 07:54:58 +0000 |
commit | cbf243bc659d552c00ea5c07bf2a73acb073d47e (patch) | |
tree | 78a0afa784eafaae8f52a2ca0d5837e59885add3 | |
parent | 2aaffcb77f8537f9873ee3e49b7c946f9855573e (diff) |
have a go at documenting pci_intr_map_msix.
i feel like ive used the word vector too much, but hopefully someone
who is good with english will check this and fix it.
-rw-r--r-- | share/man/man9/pci_intr_map.9 | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/share/man/man9/pci_intr_map.9 b/share/man/man9/pci_intr_map.9 index e8e7ccdf323..fc824155ae1 100644 --- a/share/man/man9/pci_intr_map.9 +++ b/share/man/man9/pci_intr_map.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pci_intr_map.9,v 1.14 2020/06/17 07:45:04 dlg Exp $ +.\" $OpenBSD: pci_intr_map.9,v 1.15 2020/06/17 07:54:57 dlg Exp $ .\" .\" Copyright (c) 2005 Michael Shalayeff .\" All rights reserved. @@ -21,6 +21,7 @@ .Sh NAME .Nm pci_intr_map , .Nm pci_intr_map_msi , +.Nm pci_intr_map_msix , .Nm pci_intr_line , .Nm pci_intr_string , .Nm pci_intr_establish , @@ -37,6 +38,12 @@ .Ft int .Fn pci_intr_map_msi "struct pci_attach_args *paa" "pci_intr_handle_t *ih" .Ft int +.Fo pci_intr_map_msix +.Fa "struct pci_attach_args *paa" +.Fa "int vector" +.Fa "pci_intr_handle_t *ih" +.Fc +.Ft int .Fn pci_intr_line "pci_intr_handle_t ih" .Ft const char * .Fn pci_intr_string "pci_chipset_tag_t pc" "pci_intr_handle_t ih" @@ -59,9 +66,10 @@ An architect type is provided by the machine-dependent code .Va pci_intr_handle_t , to be initialised by -.Fn pci_intr_map +.Fn pci_intr_map , +.Fn pci_intr_map_msi , or -.Fn pci_intr_map_msi . +.Fn pci_intr_map_msix . .Pp The .Fn pci_intr_map @@ -69,6 +77,7 @@ function should be called first to establish a mapping between a PCI pin and the interrupt controller's interrupt vector. This process may include resolving the mapping through firmware-provided information. +.Pp For devices that support Message Signaled Interrupts (MSI) the .Fn pci_intr_map_msi function should be called instead. @@ -78,6 +87,23 @@ In that case .Fn pci_intr_map should be called to fall back on classic PCI interrupts. .Pp +For devices that support Extended Message Signaled Interrupts (MSI-X) the +.Fn pci_intr_map_msix +function can be called instead. +This function can fail if the system does not support MSI-X. +In that case +.Fn pci_intr_map_msi +or +.Fn pci_intr_map +can be called to fall back on Message Signalled Interrupts or classic +PCI interrupts respectively. +MSI-X can provide multiple interrupt vectors per device. +For each vector, a separate call to +.Fn pci_intr_map_msix +is made with the +.Fa vector +argument specifying which interrupt vector to map. +.Pp Having initialised the .Va pci_intr_handle_t in the previous step, an interrupt handler can be established using |