Gnanasekar Loganathan | 29 Nov 2010 11:34
Picon

How do i find all the pci devices in the system?

Hi,

I'm new to NetBSD kernel.

I'm planning to list all the PCI devices in the users space.

Modifying the pciconf.c downloaded from FreeBSD to the NetBSD.
In the sys/dev/pci/pci_usrreq.c file i can found the options for
Read/Write on conf buf.
But could not find the option to list all the pci devices found in the system.

Is there any way to search manually all the pci devices and access them?

Please advice.

Thanks,
Gnana

Juergen Hannken-Illjes | 29 Nov 2010 11:42
Picon
Picon
Favicon

Re: How do i find all the pci devices in the system?

On Mon, Nov 29, 2010 at 04:04:55PM +0530, Gnanasekar Loganathan wrote:
> Hi,
> 
> I'm new to NetBSD kernel.
> 
> I'm planning to list all the PCI devices in the users space.
> 
> Modifying the pciconf.c downloaded from FreeBSD to the NetBSD.
> In the sys/dev/pci/pci_usrreq.c file i can found the options for
> Read/Write on conf buf.
> But could not find the option to list all the pci devices found in the system.
> 
> Is there any way to search manually all the pci devices and access them?
> 
> Please advice.
> 
> Thanks,
> Gnana

Man pcictl. Try

	/bin/sh -c 'for BUS in /dev/pci*; do pcictl ${BUS} list; done'

--

-- 
Juergen Hannken-Illjes - hannken <at> eis.cs.tu-bs.de - TU Braunschweig (Germany)

Gnanasekar Loganathan | 29 Nov 2010 13:31
Picon

Re: How do i find all the pci devices in the system?

Thanks Juergen!

How do i write/changes in the conf space using this command?
Is there any possibility available?

Thanks,
Gnana

On Mon, Nov 29, 2010 at 4:12 PM, Juergen Hannken-Illjes
<hannken <at> eis.cs.tu-bs.de> wrote:
> On Mon, Nov 29, 2010 at 04:04:55PM +0530, Gnanasekar Loganathan wrote:
>> Hi,
>>
>> I'm new to NetBSD kernel.
>>
>> I'm planning to list all the PCI devices in the users space.
>>
>> Modifying the pciconf.c downloaded from FreeBSD to the NetBSD.
>> In the sys/dev/pci/pci_usrreq.c file i can found the options for
>> Read/Write on conf buf.
>> But could not find the option to list all the pci devices found in the system.
>>
>> Is there any way to search manually all the pci devices and access them?
>>
>> Please advice.
>>
>> Thanks,
>> Gnana
>
> Man pcictl. Try
(Continue reading)


Gmane