Access GPIO base(0x0500) of PCi

Hi,

We are trying to read the status of GPIO’s at the address(base addr: 0x0500) of the PCI card. Should we need to develop a a filter driver to PCI in order to access to gpio’s ?
Can anyone please suggest a simple way to access this?

Regards,
Sriram

xxxxx@lnttechservices.com wrote:

We are trying to read the status of GPIO’s at the address(base addr: 0x0500) of the PCI card. Should we need to develop a a filter driver to PCI in order to access to gpio’s ?
Can anyone please suggest a simple way to access this?

What kind of PCI card? Does it already have a driver? From where are
you trying to read the registers?

If the device already has a driver, then that driver should be offering
the GPIO services.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim,

The PCI card has a driver , but it is not in our control. We would like to read the config space of the pci. Currently we are working on windows 10. We are planning to write a pci bus filter to read the config space (only read), is it the right way to proceed?

Thanks,
Sriram

Why not write a device lower filter, not a bus filter, and read the register in EvtDevicePrepareHw. This will be before the function driver can access the register

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@lnttechservices.com
Sent: Thursday, January 5, 2017 8:27:39 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Access GPIO base(0x0500) of PCi

Hi Tim,

The PCI card has a driver , but it is not in our control. We would like to read the config space of the pci. Currently we are working on windows 10. We are planning to write a pci bus filter to read the config space (only read), is it the right way to proceed?

Thanks,
Sriram


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

xxxxx@lnttechservices.com wrote:

The PCI card has a driver , but it is not in our control. We would like to read the config space of the pci. Currently we are working on windows 10. We are planning to write a pci bus filter to read the config space (only read), is it the right way to proceed?

Your first message said you needed to read a BAR register. Is it a BAR
register, or is it config space? The mechanism is quite different.

In either case, a device lower filter can certainly do this, as long as
you’re aware that the main driver won’t know what you’re doing. If you
are just reading, it’s probably fine, but if you write something,
there’s a risk.

https://msdn.microsoft.com/en-us/windows/hardware/drivers/pci/accessing-pci-device-configuration-space


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.