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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux