FreeBSD/sys/dev/pci/pci.c
/*
 * Support for MSI-X message interrupts.
 */
Support for MSI-X message interrupts.
Support for MSI - X message interrupts .
void
pci_enable_msix_method(device_t dev, device_t child, u_int index,
    uint64_t address, uint32_t data)
{
	struct pci_devinfo *dinfo = device_get_ivars(child);
	struct pcicfg_msix *msix = &dinfo->cfg.msix;
	uint32_t offset;
	KASSERT(msix->msix_table_len > index, ("bogus index"));
	offset = msix->msix_table_offset + index * 16;
	bus_write_4(msix->msix_table_res, offset, address & 0xffffffff);
	bus_write_4(msix->msix_table_res, offset + 4, address >> 32);
	bus_write_4(msix->msix_table_res, offset + 8, data);
	pci_ht_map_msi(child, address);
}
void pci_enable_msix_method ( device_t dev , device_t child , u_int index , uint64_t address , uint32_t data ) { struct pci_devinfo * dinfo = device_get_ivars ( child ) ; struct pcicfg_msix * msix = & dinfo -> cfg . msix ; uint32_t offset ; KASSERT ( msix -> msix_table_len > index , ( " " ) ) ; offset = msix -> msix_table_offset + index * 16 ; bus_write_4 ( msix -> msix_table_res , offset , address & 0xffffffff ) ; bus_write_4 ( msix -> msix_table_res , offset + 4 , address >> 32 ) ; bus_write_4 ( msix -> msix_table_res , offset + 8 , data ) ; pci_ht_map_msi ( child , address ) ; }
Support for MSI-X message interrupts.
Support for MSI - X message interrupts .
/* Enable MSI -> HT mapping. */