Using the set bus data and Get bus data calls.

Hi All,
I have a WDM driver which exports a interface to a Diagnostics
application to read and write the PCI config space registers of my
device. My observation is that some of the registers does not get
written. One of the registers that I tried to write was 0x3c [Intr PIN]
register in the PCI configuration space which does not work. I tried to
write the same register using other PCI tools and I was able to modify
that register. I am using the SetBusData and GetBusData to read/modify
the PCI Configuration space registers.

To verify that from the drive side I am doing ok I tried to modify
one of the BARs and the proper value was written on it.

Any help is highly appriciated.

  • Thanks,
    Ajitabh.

Ajitabh Saxena wrote:

Hi All,
I have a WDM driver which exports a interface to a Diagnostics
application to read and write the PCI config space registers of my
device. My observation is that some of the registers does not get
written. One of the registers that I tried to write was 0x3c [Intr
PIN] register in the PCI configuration space which does not work. I
tried to write the same register using other PCI tools and I was able
to modify that register. I am using the SetBusData and GetBusData
to read/modify the PCI Configuration space registers.

I’m not terribly surprised. Having you change the interrupt pin without
notifying the BIOS or the operating system can cause an interrupt storm
and lock up the computer. I don’t know for certain that SetBusData
protects you from such things, but it’s not impossible.

How would you test this after you changed it?


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

Hi Tim,
Thanks for the response.
I check the values written using my driver interface / another
tool to verify that the values are written properly.
I understand that there will be problems if we change the
registers like this but for diagnostic purposes this should be fine.
But I need to know that does SetBusData prohibits to write these
registers.

  • Thanks.
    Ajitabh

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, November 06, 2006 6:07 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Using the set bus data and Get bus data calls.

Ajitabh Saxena wrote:

Hi All,
I have a WDM driver which exports a interface to a Diagnostics
application to read and write the PCI config space registers of my
device. My observation is that some of the registers does not get
written. One of the registers that I tried to write was 0x3c [Intr
PIN] register in the PCI configuration space which does not work. I
tried to write the same register using other PCI tools and I was able
to modify that register. I am using the SetBusData and GetBusData to
read/modify the PCI Configuration space registers.

I’m not terribly surprised. Having you change the interrupt pin without
notifying the BIOS or the operating system can cause an interrupt storm
and lock up the computer. I don’t know for certain that SetBusData
protects you from such things, but it’s not impossible.

How would you test this after you changed it?


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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer