Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > PCI : try to get parent's device config space

Reply
Thread Tools Display Modes

PCI : try to get parent's device config space

 
 
Benoit
Guest
Posts: n/a

 
      10-01-2007
Hi list,

I have an issue with a PCI express device : it does not wakeup the
system although
it send correctly PM_PME messages in the bus (I checked with a
protocol analyser).

Thus, I try to know if the system recieve this message. Fortunatly a
register
located in the Root port's config space (my device's parent) allow me
to know that.

SO I gogglelized and I discovered that HalGetBusData(), or
HalGetBusDataByOffset(),
are my friends.

OK, I know that thoses two functions are obsoletes etc.... But :

1) they are still active in WInCE, AGP drivers. So they don't seem
completlty
obsolete.

2) The IRP_MN_QUERY_INTERFACE and IRP_MN_READ_CONFIG need a PDO. I
don't know
how to get parent's device PDO [any volunteer for help ? )]

3) I need to read parent's device config space only_for_debug_purpose,
so not
following this rule is not that annoying.


Then, in my driver, I added :
- HalGetBusDataByOffset() prototype,
- some structure declaration,
- hal.lib, in the depencies libraies list

Compilation goe well....
But driver crash at calls to HalGetBusDataByOffset, (winXP-SP2),
Bug Check 0x7E: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED,
reason : STATUS_ACCESS_VIOLATION, on .

Huh, obsisously, I missed something... Does anyone have a idea, or a
clue ?

If some can stand seeing HalGetBusDataByOffset(), waht are other mean
to read
PCI parent's device config space ?

Regards
--
Bennedict

 
Reply With Quote
 
 
 
 
Eliyas Yakub [MSFT]
Guest
Posts: n/a

 
      10-01-2007
There is no interface to get the parent PDO.

-Eliyas

"Benoit" <> wrote in message
news: oups.com...
> Hi list,
>
> I have an issue with a PCI express device : it does not wakeup the
> system although
> it send correctly PM_PME messages in the bus (I checked with a
> protocol analyser).
>
> Thus, I try to know if the system recieve this message. Fortunatly a
> register
> located in the Root port's config space (my device's parent) allow me
> to know that.
>
> SO I gogglelized and I discovered that HalGetBusData(), or
> HalGetBusDataByOffset(),
> are my friends.
>
> OK, I know that thoses two functions are obsoletes etc.... But :
>
> 1) they are still active in WInCE, AGP drivers. So they don't seem
> completlty
> obsolete.
>
> 2) The IRP_MN_QUERY_INTERFACE and IRP_MN_READ_CONFIG need a PDO. I
> don't know
> how to get parent's device PDO [any volunteer for help ? )]
>
> 3) I need to read parent's device config space only_for_debug_purpose,
> so not
> following this rule is not that annoying.
>
>
> Then, in my driver, I added :
> - HalGetBusDataByOffset() prototype,
> - some structure declaration,
> - hal.lib, in the depencies libraies list
>
> Compilation goe well....
> But driver crash at calls to HalGetBusDataByOffset, (winXP-SP2),
> Bug Check 0x7E: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED,
> reason : STATUS_ACCESS_VIOLATION, on .
>
> Huh, obsisously, I missed something... Does anyone have a idea, or a
> clue ?
>
> If some can stand seeing HalGetBusDataByOffset(), waht are other mean
> to read
> PCI parent's device config space ?
>
> Regards
> --
> Bennedict
>


 
Reply With Quote
 
Benoit
Guest
Posts: n/a

 
      10-02-2007
Hi Eliyas,

>
> There is no interface to get the parent PDO.
>


Ok, no interface !

But utilities programs, like PciView, are able to dump config space
for all connected PCI device.
So there is am ean to do that, not interface, but something.

So, any clue to avoid HalGetBusDataxx() crash ?


Thanks
--
Bennedict

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read extended config space on Windows XP Jeff Yang Windows Vista Drivers 0 04-09-2007 02:13 PM
reading/writing config space for any/all devices Hua-Ying Ling Windows Vista Drivers 1 11-10-2005 12:37 PM
PCI-Extended Config Space Rupesh Windows Vista Drivers 4 09-01-2005 05:20 AM
PCI Bus Filter driver to read config space? HyperWalker Windows Vista Drivers 5 07-15-2004 11:21 AM
Questions on PCI config space when ressetting a PCI board User1964 Windows Vista Drivers 5 03-03-2004 10:44 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59