How deviceTree driver/App is able to parse and present devnodes?

Hi All

How device Tree application/driver is able to present full device tree?
Does it use any hidden kernel api? or uses generic api for this purpose.

Thanks
-santosh k

Life is Small and Lots of Things to Learn
Lets Share the Knowledge

  1. What do you mean by the ‘device tree application/driver?’

  2. Have you looked at the source code for devcon?

Good luck,

mm

Hi mm

DeviceTree is an application available from osronline, which list the
devicenodes connection/properties as seen by pnp manager.
I saw the source code of devcon, but using that we do not get detailed
info, such as device object pointer of FDO/PDO, device names etc.

-santosh k

On Mon, Dec 21, 2009 at 11:12 PM, wrote:
> 1. ?What do you mean by the ‘device tree application/driver?’
>
> 2. ?Have you looked at the source code for devcon?
>
>
> Good luck,
>
> mm
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>


Life is Small and Lots of Things to Learn
Lets Share the Knowledge

The CM_Xxx APIs will let you traverse the pnp tree. Why do you need to do that on your own?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of santosh katvate
Sent: Monday, December 21, 2009 9:54 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How deviceTree driver/App is able to parse and present devnodes?

Hi mm

DeviceTree is an application available from osronline, which list the
devicenodes connection/properties as seen by pnp manager.
I saw the source code of devcon, but using that we do not get detailed
info, such as device object pointer of FDO/PDO, device names etc.

-santosh k

On Mon, Dec 21, 2009 at 11:12 PM, wrote:
> 1. ?What do you mean by the ‘device tree application/driver?’
>
> 2. ?Have you looked at the source code for devcon?
>
>
> Good luck,
>
> mm
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>


Life is Small and Lots of Things to Learn
Lets Share the Knowledge


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

DeviceTree uses NT APIs and uses an imbedded driver to get the
information in needs to show the device tree.

Mark J. Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of santosh katvate
Sent: Monday, December 21, 2009 12:34 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How deviceTree driver/App is able to parse and present
devnodes?

Hi All

How device Tree application/driver is able to present full device tree?
Does it use any hidden kernel api? or uses generic api for this purpose.

Thanks
-santosh k

Life is Small and Lots of Things to Learn
Lets Share the Knowledge


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Hi Mark

On Tue, Dec 22, 2009 at 2:42 AM, Mark Cariddi wrote:
> DeviceTree uses ?NT APIs and uses an imbedded driver to get the
> information in needs to show the device tree.

Is this NT APIs documented? How imbedded driver gets to know about
PDO,FDO, driver stack?

thanks
santosh k

The NTAPIs used are documented. As for getting the PDO/FDO,etc, its all a matter of digging thru data structures and links.

Mark J. Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of santosh katvate
Sent: Tuesday, December 22, 2009 1:27 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How deviceTree driver/App is able to parse and present devnodes?

Hi Mark

On Tue, Dec 22, 2009 at 2:42 AM, Mark Cariddi wrote:
> DeviceTree uses ?NT APIs and uses an imbedded driver to get the
> information in needs to show the device tree.

Is this NT APIs documented? How imbedded driver gets to know about
PDO,FDO, driver stack?

thanks
santosh k


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Hi Mark

The NTAPIs used are documented. As for getting the PDO/FDO,etc, its all a matter of digging thru data structures and links.

So can it be done using below given APIs?
IoGetDeviceObjectPointer
IoGetLowerDeviceObject
IoGetAttachedDevice
and similar if any

OR will need to use Object Manager or some Zw_XX routines.

I am seeing main problem will be to traverse the device stack starting
from PDO.

thanks
santosh k

Why you want to traverse the stack from the PDO? What problem are you trying to solve?

You cannot acquire the right locks to synchronize access to these fields correctly. So while it might be fine for a utlity to do this, doing it in production code is not acceptable.

d

-----Original Message-----
From: santosh katvate
Sent: Tuesday, December 22, 2009 10:12 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How deviceTree driver/App is able to parse and present devnodes?

Hi Mark

> The NTAPIs used are documented. As for getting the PDO/FDO,etc, its all a matter of digging thru data structures and links.
>

So can it be done using below given APIs?
IoGetDeviceObjectPointer
IoGetLowerDeviceObject
IoGetAttachedDevice
and similar if any

OR will need to use Object Manager or some Zw_XX routines.

I am seeing main problem will be to traverse the device stack starting
from PDO.

thanks
santosh k


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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