|
iPXE
|
PCI MSI-X interrupts. More...
#include <ipxe/pci.h>Go to the source code of this file.
Data Structures | |
| struct | pci_msix |
| PCI MSI-X capability. More... | |
Macros | |
| #define | PCI_MSIX_LEN 0x1000 |
| MSI-X BAR mapped length. More... | |
| #define | PCI_MSIX_VECTOR(n) ( (n) * 0x10 ) |
| MSI-X vector offset. More... | |
| #define | PCI_MSIX_ADDRESS_LO 0x0 |
| MSI-X vector address low 32 bits. More... | |
| #define | PCI_MSIX_ADDRESS_HI 0x4 |
| MSI-X vector address high 32 bits. More... | |
| #define | PCI_MSIX_DATA 0x8 |
| MSI-X vector data. More... | |
| #define | PCI_MSIX_CONTROL 0xc |
| MSI-X vector control. More... | |
| #define | PCI_MSIX_CONTROL_MASK 0x00000001 |
| Vector is masked. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| 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... | |
| static void | pci_msix_mask (struct pci_msix *msix, unsigned int vector) |
| Mask MSI-X interrupt vector. More... | |
| static void | pci_msix_unmask (struct pci_msix *msix, unsigned int vector) |
| Unmask MSI-X interrupt vector. More... | |
PCI MSI-X interrupts.
Definition in file pcimsix.h.
| #define PCI_MSIX_VECTOR | ( | n | ) | ( (n) * 0x10 ) |
| #define PCI_MSIX_ADDRESS_LO 0x0 |
| #define PCI_MSIX_ADDRESS_HI 0x4 |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| 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 136 of file pcimsix.c.
References pci_msix::cap, pci_msix::count, ctrl, DBGC, pci_device::dma, dma(), dma_alloc(), dma_free(), ENOENT, ENOMEM, iounmap(), pci_msix::map, pci_msix::msg, msg(), 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_msix_map(), pci_read_config_word(), pci_write_config_word(), rc, and pci_msix::table.
Referenced by gve_probe(), and 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 207 of file pcimsix.c.
References pci_msix::cap, ctrl, dma_free(), iounmap(), pci_msix::map, pci_msix::msg, pci_msix::pba, PCI_MSIX_CTRL, PCI_MSIX_CTRL_ENABLE, pci_read_config_word(), pci_write_config_word(), and pci_msix::table.
Referenced by gve_probe(), gve_remove(), 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 233 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 pci_msix_enable().
Control MSI-X interrupt vector.
| msix | MSI-X capability |
| vector | MSI-X vector |
| mask | Control mask |
Definition at line 259 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 278 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.
|
inlinestatic |
Mask MSI-X interrupt vector.
| msix | MSI-X capability |
| vector | MSI-X vector |
Definition at line 64 of file pcimsix.h.
References pci_msix_control(), PCI_MSIX_CONTROL_MASK, and vector.
Referenced by gve_destroy_queue(), and intelxl_msix_disable().
|
inlinestatic |
Unmask MSI-X interrupt vector.
| msix | MSI-X capability |
| vector | MSI-X vector |
Definition at line 76 of file pcimsix.h.
References pci_msix_control(), and vector.
Referenced by gve_create_queue(), and intelxl_msix_enable().
1.8.15