tech-misc archive

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

Re: Regarding PCIe peek/poke in NetBSD



On Wed, Dec 22, 2010 at 01:37:46PM +0530, Gnanasekar Loganathan wrote:
> Hi Greg,
> 
> Thanks for the link, there i can found some useful information.
> 
> As we know that the 'pcictl' command will list all the pci devices
> present in the system with corresponding device/vendor id.
> The same way, is that possible to get/map the IO/Mem/prefetchable
> region of any PCI device by using bus_space_map for Peek/Poke?

I'm not sure what you want to do. Do you want to access the device
from kernel or userland ?
From kernel, you need to map the regions via bus_space(9), and then
you can bus_space_read/bus_space_write the regions. There are multiple
examples of this is sys/dev/pci/

from userland, there's no general way of doing it; it's hard to give
advices without more details about what you want to do.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index