How to get the pci configuration of the PCI device

Discussion in 'Windows Vista Drivers' started by shak, Oct 3, 2003.

  1. shak

    shak Guest

    I am developing upperclass filter driver, so that we can
    send venderspecific smart commands to our ATA raid card.

    The driver needs to detect how many pci cards are
    installed in the system.

    Can anybody advice on how to read PCI configuration space
    of the device.

    thank you
    shak, Oct 3, 2003
    1. Advertisements

  2. Develop a card driver as a SCSI miniport (like HighPoint does), and use
    IOCTL_SCSI_MINIPORT to do the job.

    HighPoint also creates a "management LUN" on the emulated SCSI HBA, looks like
    its purpose is to be a target of RAID management commands.
    Maxim S. Shatskih, Oct 3, 2003
    1. Advertisements

  3. shak

    shakeel. Guest

    developing the driver for the ATA RAID board. we are
    using microsoft supplied generic IDE driver stack. I am
    writting upper class filter driver for our GUI to send
    vender specific smart commands. The driver required to
    detect our hardware and return how many such card count.
    All I need is a way to read the PCI configuration space
    and check the venderID, DeviceID.

    Thanks in advance,
    shakeel., Oct 6, 2003
  4. Why not use vendor-spevific device ID and INF files, to make sure your
    filter is only installed for your device?
    Alexander Grigoriev, Oct 7, 2003
  5. shak

    Shak Guest

    Yes, that is true for the driver installation. What I
    need is how can the driver detect the our hardware (by
    vender-id, device id) return how many devices are
    physicall present.

    there can be two or more devices, The driver need to
    determine the number of devices are physically present.

    Thanks in Advance.
    Shak, Oct 7, 2003
  6. Do an IoGetDeviceInterfaces on GUID_DEVINTERFACE_DISK and send an
    IOCTL_STORAGE_QUERY_PROPERTY to each listed disk interface.
    Gary G. Little, Oct 7, 2003
  7. developing the driver for the ATA RAID board. we are
    Use "microsoft supplied generic SCSI driver stack" instead, and emulate SCSI
    over IDE. This is a much better way.
    For what? The driver services each card separately. Counting cards must be done
    in user mode by SetupDiGetClassDevs and friends.
    Maxim S. Shatskih, Oct 7, 2003
  8. need is how can the driver detect the our hardware (by
    For what? Will it help the driver to serve its purpose, i.e. to run RAID card?
    Why the driver for RAID card must know anything about any other PCI devices?
    Maxim S. Shatskih, Oct 7, 2003
  9. shak

    Shakeel Guest

    Thanks Gary. Is there a direct way of reading pci
    configuration information? or Is there function call to
    detect the hardware with (Vender ID, Device ID).

    Thanks, Shakeel.
    Shakeel, Oct 7, 2003
  10. Can this be applied in usermode? I am trying to enumerate PCI devices to see
    if the user has one of our "supported" devices installed.

    Your thoughts?
    Bert Grantges, Oct 14, 2003
  11. shak

    Tim Roberts Guest

    No, but you can try enumerating the subkeys of
    Tim Roberts, Oct 15, 2003
  12. This looks like it would work with 2000 and XP. What about for Win 9x
    Operating systems.

    Your thoughts?
    Bert Grantges, Oct 20, 2003
  13. shak

    Tim Roberts Guest

    How much work do you want to go to? One easy way is to spawn off a 16-bit
    process and make some INT 1A calls to access PCI data to your heart's
    content. You can use WM_COPYDATA to transfer the data.
    Tim Roberts, Oct 21, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.