Acquiring MSI vector physical address from kernel driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.
I'm currently developing a driver for a new PCIe device.
The specific PCIe device includes an embedded DMA engine that can be accessed by the host through the PCI configuration space on specific offset.
The DMA engine can trigger a MSI on DMA complete if the physical address of the actual vector is written to it.

I did some reading, and if I'm not mistaken, it appears that the kernel writes the physical address to the PCI device configuration space when enabling MSI.
I didn't find any API or an easy way of getting that address from the kernel given only the MSI number (ID).
I can read it (the PA) back from the PCI configuration space, but it seems wrong, as:
1. The kernel has written this value before, it should know this already. 
2. Nobody else has done it (grepped the kernel for that)

Am I right in my observations ? Is there a better way to achieve that ?

Thanks,
Ramon
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux