Re: Regarding PCIe peek/poke in NetBSD
Manuel Bouyer <[email protected]> Mon, 3 Jan 2011 18:31:06 +0100
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --