Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

PCI device not Enumerated

RameshRamesh Member Posts: 3

Hi,
‏‏‎ ‎
I am new to windows driver develpoment.
‏‏‎ ‎
My understandingfor PCI Enumeration in windows is that pci.sys will enumerate PCI devices and produce hardware Ids like PCI/VEN_xxxx&DEV_yyyy
and the os calls the add device funtion of driver having same hardware Id in .inf file and gives device context to this drivers Add Device funtion.

but i can't find a particular PCI device.
i am not sure if problem is because of the PCI cards Vendor id being 0000.(It has valid device ID) or because it is connected through PCIe-PCI bridge
or my understanding of PCI enumeration in Windows is wrong.
‏‏‎ ‎
‏‏‎ ‎
i have tried to search for the device using different tools like Device manager, devcon, pci-z, etc. but couldn't find the device.

i know that i could find the device by enumerating on bus no and slot no and comaparing Vendor ID and Device ID. (with HalGetBusData)
‏‏‎ ‎
‏‏‎ ‎
what other tools can i use to search for a PCI device with vendor ID of 0000?

is there other ways of enumerating the PCI device with just Bus No and Slot No.

I would appreciate any help.
‏‏‎ ‎
‏‏‎ ‎
Thank you,
Ramesh

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,676
    edited January 18

    I dunno. But I know vendor ID 0x0000 isn’t valid. So why not fix that first, and worry about everything else later.

    Try sticking the device in multiple different systems. Dump the bus with “rweverything”...

    But fix your device first. What’s the point of writing a driver for such a broken device?

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Shane_CorbinShane_Corbin Member Posts: 255

    Using CHIPSEC from the EFI Shell can be a pretty useful device debugging toolchain.
    You can follow these instructions to get up and running:
    https://github.com/chipsec/chipsec/wiki/Creating-a-Bootable-USB-drive-with-UEFI-Shell

  • RameshRamesh Member Posts: 3
    edited February 3

    This is a legacy PCI device, so cannot change id anymore.

    The client has newer device models with correct configs, but has to support this device till some time they were using halgetbus to get the device resource now it not working.

    I thought for PCI vendor and device 0xffff is the only invaild as its used by system to determine if device exists or not.

  • I do not think PCI vendor == valid and device id = 0xffff is used as the way to detect if the device is present or not. Upstream bridges (PCI to PCI or root ports or PCIe switches) are responsible for indicating the logic to the root complex which tells the host if the device is present or not. In the older WinNT model, you could write a driver which enumerates HalGetBusData and detects it that way. I am not sure WDM and KMDF driver models support your kind of device. Linux of course is easy to support. If you can see it in EFI shell using pci command, it means the device is responding to PCI configuration cycles. It does not mean WDM/KMDF pci.sys supports it necessarily.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,676

    I said:

    Try sticking the device in multiple different systems. Dump the bus with “rweverything”...

    Did you do this?

    You know... I feel like I'm wasting my time when somebody posts a question/problem, and I give them advice, and then they don't even bother to acknowledge it.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • RameshRamesh Member Posts: 3
    edited March 17

    Hi Peter,
     
    Thanks for Your advice and sorry for delayed response.
     
    yes, with "rweverything" utility, I am getting my device in a PCI Bus and able to see its config space.
     
    Also, I was able to dump the config space of device with """!PCI in Windbg""".
     
    I was able to build the driver with Standard PCI Config Access method(CPU legacy PCI Config access) and complete the driver.
     
    I thought i had acknowledged your posts question

    But fix your device first. What’s the point of writing a driver for such a broken device?

    with

    the device is legacy device and this driver is for device support. the newer devices don't have the problem.

     
    Sorry for making you feel like wasting your time. 
     
    Thanks for your advice.
    Ramesh

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 20 Apr 2020 LIVE ONLINE
Writing WDF Drivers 11 May 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA