Barrelfish
Functions
pci.h File Reference

PCI configuration library. More...

Functions

errval_t pci_register_legacy_driver_irq (legacy_driver_init_fn init_func, uint16_t iomin, uint16_t iomax, int irq, interrupt_handler_fn handler, void *handler_arg)
 
errval_t pci_register_legacy_driver_irq_cap (legacy_driver_init_fn init_func, uint16_t iomin, uint16_t iomax, int irq_idx, interrupt_handler_fn handler, void *handler_arg)
 
errval_t pci_msix_enable (uint16_t *count)
 
errval_t pci_msix_enable_addr (struct pci_address *addr, uint16_t *count)
 enables MSI-X interupts for a given device More...
 
errval_t pci_msix_vector_init (uint16_t index, uint8_t destination, uint8_t vector)
 
errval_t pci_msix_vector_init_addr (struct pci_address *addr, uint16_t index, uint8_t destination, uint8_t vector)
 

Detailed Description

PCI configuration library.

Function Documentation

errval_t pci_msix_enable ( uint16_t *  count)

Enable MSI-X for the PCI device

Parameters
countMemory location where the number of supported vectors is written
errval_t pci_msix_enable_addr ( struct pci_address *  addr,
uint16_t *  count 
)

enables MSI-X interupts for a given device

Parameters
addrPCI address of the device to activate or NULL if don't care
countreturns the number of supported MSI-X interrupts
Returns
SYS_ERR_OK on success errval on FAILURE
errval_t pci_msix_vector_init ( uint16_t  index,
uint8_t  destination,
uint8_t  vector 
)

Configure an MSI-X vector

Parameters
indexMSI-X Vector index
destinationDestination APIC where the interrupt should be sent
vectorInterrupt vector to send
errval_t pci_msix_vector_init_addr ( struct pci_address *  addr,
uint16_t  index,
uint8_t  destination,
uint8_t  vector 
)

Configure an MSI-X vector

Parameters
addrPCI address of the device to activate or NULL if don't care
indexMSI-X Vector index
destinationDestination APIC where the interrupt should be sent
vectorInterrupt vector to send
errval_t pci_register_legacy_driver_irq ( legacy_driver_init_fn  init_func,
uint16_t  iomin,
uint16_t  iomax,
int  irq,
interrupt_handler_fn  handler,
void *  handler_arg 
)

Deprecated. Use pci_register_legacy_driver_irq_cap.

errval_t pci_register_legacy_driver_irq_cap ( legacy_driver_init_fn  init_func,
uint16_t  iomin,
uint16_t  iomax,
int  irq_idx,
interrupt_handler_fn  handler,
void *  handler_arg 
)

Register a legacy device driver. The driver can specify a range of IO ports that he wants to access.

Parameters
init_funcCallback function that will be called once pci_client is initialized.
iominI/O range minimum
iomaxI/O range maximum
irq_idxInterrupt cap index
interrupt_handlerThe handler function when a interrupt is triggered.
handler_argArgument for interrupt_handler