iPXE
|
PCI MSI-X interrupts. More...
#include <stdint.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/pci.h>
#include <ipxe/pcimsix.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static const char * | pci_msix_name (unsigned int cfg) |
Get MSI-X descriptor name (for debugging) More... | |
static void * | pci_msix_ioremap (struct pci_device *pci, struct pci_msix *msix, unsigned int cfg) |
Map MSI-X BAR portion. More... | |
int | pci_msix_enable (struct pci_device *pci, struct pci_msix *msix) |
Enable MSI-X interrupts. More... | |
void | pci_msix_disable (struct pci_device *pci, struct pci_msix *msix) |
Disable MSI-X interrupts. More... | |
void | pci_msix_map (struct pci_msix *msix, unsigned int vector, physaddr_t address, uint32_t data) |
Map MSI-X interrupt vector. More... | |
void | pci_msix_control (struct pci_msix *msix, unsigned int vector, uint32_t mask) |
Control MSI-X interrupt vector. More... | |
void | pci_msix_dump (struct pci_msix *msix, unsigned int vector) |
Dump MSI-X interrupt state (for debugging) More... | |
PCI MSI-X interrupts.
Definition in file pcimsix.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Get MSI-X descriptor name (for debugging)
cfg | Configuration space offset |
name | Descriptor name |
Definition at line 44 of file pcimsix.c.
References cfg, PCI_MSIX_DESC_PBA, and PCI_MSIX_DESC_TABLE.
Referenced by pci_msix_ioremap().
|
static |
Map MSI-X BAR portion.
pci | PCI device |
msix | MSI-X capability |
cfg | Configuration space offset |
io | I/O address |
Definition at line 61 of file pcimsix.c.
References base, pci_msix::cap, cfg, DBGC, desc, NULL, offset, pci_bar_start(), PCI_BASE_ADDRESS, pci_ioremap(), PCI_MSIX_DESC_BIR, PCI_MSIX_DESC_OFFSET, PCI_MSIX_LEN, pci_msix_name(), pci_read_config_dword(), and start.
Referenced by pci_msix_enable().
int pci_msix_enable | ( | struct pci_device * | pci, |
struct pci_msix * | msix | ||
) |
Enable MSI-X interrupts.
pci | PCI device |
msix | MSI-X capability |
rc | Return status code |
Definition at line 104 of file pcimsix.c.
References pci_msix::cap, pci_msix::count, ctrl, DBGC, ENOENT, iounmap(), pci_msix::pba, PCI_ARGS, PCI_CAP_ID_MSIX, pci_find_capability(), PCI_FMT, PCI_MSIX_CTRL, PCI_MSIX_CTRL_ENABLE, PCI_MSIX_CTRL_MASK, PCI_MSIX_CTRL_SIZE, PCI_MSIX_DESC_PBA, PCI_MSIX_DESC_TABLE, pci_msix_ioremap(), pci_read_config_word(), pci_write_config_word(), rc, and pci_msix::table.
Referenced by intelxl_msix_enable().
void pci_msix_disable | ( | struct pci_device * | pci, |
struct pci_msix * | msix | ||
) |
Disable MSI-X interrupts.
pci | PCI device |
msix | MSI-X capability |
Definition at line 158 of file pcimsix.c.
References pci_msix::cap, ctrl, iounmap(), pci_msix::pba, PCI_MSIX_CTRL, PCI_MSIX_CTRL_ENABLE, pci_read_config_word(), pci_write_config_word(), and pci_msix::table.
Referenced by intelxl_msix_disable(), and intelxl_msix_enable().
void pci_msix_map | ( | struct pci_msix * | msix, |
unsigned int | vector, | ||
physaddr_t | address, | ||
uint32_t | data | ||
) |
Map MSI-X interrupt vector.
msix | MSI-X capability |
vector | MSI-X vector |
address | Message address |
data | Message data |
Definition at line 181 of file pcimsix.c.
References address, assert(), base, count, data, PCI_MSIX_ADDRESS_HI, PCI_MSIX_ADDRESS_LO, PCI_MSIX_DATA, PCI_MSIX_VECTOR, pci_msix::table, vector, and writel().
Referenced by intelxl_msix_enable().
Control MSI-X interrupt vector.
msix | MSI-X capability |
vector | MSI-X vector |
mask | Control mask |
Definition at line 207 of file pcimsix.c.
References base, ctrl, PCI_MSIX_CONTROL, PCI_MSIX_CONTROL_MASK, PCI_MSIX_VECTOR, readl(), pci_msix::table, vector, and writel().
Referenced by pci_msix_mask(), and pci_msix_unmask().
void pci_msix_dump | ( | struct pci_msix * | msix, |
unsigned int | vector | ||
) |
Dump MSI-X interrupt state (for debugging)
msix | MSI-X capability |
vector | MSI-X vector |
Definition at line 226 of file pcimsix.c.
References address, base, ctrl, data, DBG_LOG, DBGC, pci_msix::pba, PCI_MSIX_ADDRESS_HI, PCI_MSIX_ADDRESS_LO, PCI_MSIX_CONTROL, PCI_MSIX_CONTROL_MASK, PCI_MSIX_DATA, PCI_MSIX_VECTOR, readl(), pci_msix::table, and vector.