how can i access PCI Configuration Space?

Hi ALL,

I need a small favor from any of you & any suggestion is most welcome from any.

I wanted to access the PCI Configuration space from the Windows Device Driver & I need a way other than HalGetBusData()/HalGetBusDataByOffset() API’s provided & moreover i wanted to change the values of PCI Configuration space say some register which generates interrupt to the Device lies in PCI Configuration space,so i need to access the PCI Configuration,(Say the API is like PCI_Config_Write()/PCI_Config_Read() as in Linux).

Thanks & Regards,
Vishwanath m.

IRP_MN_QUERY_INTERFACE will return you a set of function pointers to manipulate your card’s config space. Write an inline wrapper around it to simplify coding.
You cannot touch other card’s config spaces other then by deprecated HalGetBusData, this is done intentionally by MS to avoid drivers bringing havoc to the system.
In NT4, HalGetBusData was exactly the analog of Linux’s PCI_Config_Read.

Also - if you need to touch config space from each ISR invocation, then your card is ill-designed. “No control/status registers in config space” - on of the principlies of PCI hardware design guidelines for Windows.

Max
----- Original Message -----
From: vishwanath
To: NT Developers Interest List
Sent: Saturday, June 01, 2002 10:07 AM
Subject: [ntdev] how can i access PCI Configuration Space?

Hi ALL,

I need a small favor from any of you & any suggestion is most welcome from any.

I wanted to access the PCI Configuration space from the Windows Device Driver & I need a way other than HalGetBusData()/HalGetBusDataByOffset() API’s provided & moreover i wanted to change the values of PCI Configuration space say some register which generates interrupt to the Device lies in PCI Configuration space,so i need to access the PCI Configuration,(Say the API is like PCI_Config_Write()/PCI_Config_Read() as in Linux).

Thanks & Regards,
Vishwanath m.

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

You can use NdisReadPciSlotInformation & NdisWritePciSlotInformation.

Manish
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of vishwanath
Sent: Saturday, 1 June 2002 11:38 AM
To: NT Developers Interest List
Subject: [ntdev] how can i access PCI Configuration Space?

Hi ALL,

I need a small favor from any of you & any suggestion is most welcome from
any.

I wanted to access the PCI Configuration space from the Windows Device
Driver & I need a way other than HalGetBusData()/HalGetBusDataByOffset()
API’s provided & moreover i wanted to change the values of PCI Configuration
space say some register which generates interrupt to the Device lies in PCI
Configuration space,so i need to access the PCI Configuration,(Say the API
is like PCI_Config_Write()/PCI_Config_Read() as in Linux).

Thanks & Regards,
Vishwanath m.

You are currently subscribed to ntdev as: xxxxx@future.futsoft.com
To unsubscribe send a blank email to %%email.unsub%%

***************************************************************************
This message is proprietary to Future Software Limited (FSL)
and is intended solely for the use of the individual to whom it
is addressed. It may contain privileged or confidential information
and should not be circulated or used for any purpose other than for
what it is intended.

If you have received this message in error, please notify the
originator immediately. If you are not the intended recipient,
you are notified that you are strictly prohibited from using,
copying, altering, or disclosing the contents of this message.
FSL accepts no responsibility for loss or damage arising from
the use of the information transmitted by this email including
damage from virus.
***************************************************************************

On which OS are you working? You can refer to the sample program in ArtBaker
for getting / setting PCI configuration header space. HAL functions are
available in WindowsNT.

Sophia.

From: “Manish K”
>Reply-To: “NT Developers Interest List”
>To: “NT Developers Interest List”
>Subject: [ntdev] RE: how can i access PCI Configuration Space?
>Date: Sat, 1 Jun 2002 14:03:28 +0530
>
>You can use NdisReadPciSlotInformation & NdisWritePciSlotInformation.
>
>Manish
> -----Original Message-----
> From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com]On Behalf Of vishwanath
> Sent: Saturday, 1 June 2002 11:38 AM
> To: NT Developers Interest List
> Subject: [ntdev] how can i access PCI Configuration Space?
>
>
> Hi ALL,
>
> I need a small favor from any of you & any suggestion is most welcome
>from
>any.
>
> I wanted to access the PCI Configuration space from the Windows Device
>Driver & I need a way other than HalGetBusData()/HalGetBusDataByOffset()
>API’s provided & moreover i wanted to change the values of PCI
>Configuration
>space say some register which generates interrupt to the Device lies in PCI
>Configuration space,so i need to access the PCI Configuration,(Say the API
>is like PCI_Config_Write()/PCI_Config_Read() as in Linux).
>
> Thanks & Regards,
> Vishwanath m.
> —
> You are currently subscribed to ntdev as: xxxxx@future.futsoft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>This message is proprietary to Future Software Limited (FSL)
>and is intended solely for the use of the individual to whom it
>is addressed. It may contain privileged or confidential information
>and should not be circulated or used for any purpose other than for
>what it is intended.
>
>If you have received this message in error, please notify the
>originator immediately. If you are not the intended recipient,
>you are notified that you are strictly prohibited from using,
>copying, altering, or disclosing the contents of this message.
>FSL accepts no responsibility for loss or damage arising from
>the use of the information transmitted by this email including
>damage from virus.
>

>
>—
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to %%email.unsub%%

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

For NT 4, the HAL routines are your only solution. For WDM drivers look at this KB article:
Q253232


Gary G. Little
xxxxx@broadstor.com
xxxxx@inland.net

“vishwanath” wrote in message news:xxxxx@ntdev…
Hi ALL,

I need a small favor from any of you & any suggestion is most welcome from any.

I wanted to access the PCI Configuration space from the Windows Device Driver & I need a way other than HalGetBusData()/HalGetBusDataByOffset() API’s provided & moreover i wanted to change the values of PCI Configuration space say some register which generates interrupt to the Device lies in PCI Configuration space,so i need to access the PCI Configuration,(Say the API is like PCI_Config_Write()/PCI_Config_Read() as in Linux).

Thanks & Regards,
Vishwanath m.