How to access entire 4096 bytes of PCIE configuration registers

How to access entire 4096 bytes of PCIE configuration registers by WinIo?

I only access the first 256 bytes PCIE configuration registers right now

thank you

pccq_2002@126.com wrote:

How to access entire 4096 bytes of PCIE configuration registers by WinIo?

I only access the first 256 bytes PCIE configuration registers right now

Which WinIo do you mean? If you’re talking about the tool by Yariv
Kaplan, it’s driver doesn’t contain any interface for reading
configuration space at all. Are you using raw access through I/O ports
CF8 and CFC? If so, there are two problems. First, that method is not
safe. Those ports are owned by the PCI bus driver, which is allowed to
assume that no one else is using them. Because they are stateful, if
you both access them at the same time, you can cause a crash.

Second, the I/O port method only exposes the first 256 bytes. The I/O
port method is not recommended, so it was never extended for
PCIExpress. In order to get the extended space, you have to have a
kernel driver that uses the PCI driver’s bus interface.


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

RWEverything claims they dump the entire PCIE extended space of 4KB. Also https://www.mindshare.com/Software/Arbor they also might have tool or more pointers to tools. In UEFI shell the command PCI might dump 4K I am not sure try it out.

Thank you for reply.

Tim, you are right.

Can I access the entire 4096 bytes by using IRP with IRP_MN_READ_CONFIG or IRP_MN_WRITE_CONFIG?

On Apr 10, 2015, at 8:49 PM, pccq_2002@126.com wrote:

Tim, you are right.

Can I access the entire 4096 bytes by using IRP with IRP_MN_READ_CONFIG or IRP_MN_WRITE_CONFIG?

Did you check the documentation? Yes.
https://msdn.microsoft.com/en-us/library/windows/hardware/ff536890.aspx
The trick, of course, is that you have to be in the driver stack for device X in order to read the configuration space for device X.

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