Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
WDM Input Output Concepts

WDM Input Output Concepts

Ratings: (0)|Views: 8,356|Likes:
Published by Dhiraj Shetty
A high-level understanding of I/O concepts in the Windows Driver Model
A high-level understanding of I/O concepts in the Windows Driver Model

More info:

Published by: Dhiraj Shetty on Aug 02, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less





This article gives a high-level understanding of the I/O concepts asdefined in the Windows Driver Model. It assumes knowledge of basic WDM Concepts.
I/O Flow through Device Stack
contains a collection of routines that can be called by the I/O Manager.The I/O Manager typically calls a driver routine at the following conditions:i. When a driver is loadedii. When a driver is unloaded or the system is shutting downiii. When a device is inserted or removediv. When a user-mode program issues an I/O request (which is routedthrough the device object)
v. When a shared hardware resource becomes available for driver use
I/O request packets (IRPs) are kernel mode structures that are used to facilitatecommunication between each of the WDM drivers as well as when theoperating system needs to communicate with the drivers.
Life-cycle of IRP:
I. With each user-mode request for I/O, the I/O Manager allocates an IRPfrom nonpaged system memory. The I/O Manager is responsible to passthe IRP to the appropriate driver.II. When the operation is complete, the driver stores a final status code in the
IRP and returns it to the I/O Manager.
III. The I/O Manager uses the information in the IRP to complete the requestand send the user the final status.
I/O stack location(s)
The I/O manager gives each driver in a chain of layered drivers an I/O stacklocation for every IRP that it sets up. Each I/O stack location consists of anIO_STACK_LOCATION structure. Each stack location corresponds to a particulardriver in the chain of layered drivers.The lowest-level driver in a chain of layered drivers can safely access only itsown I/O stack location in any IRP. A higher-level driver in a chain of layereddrivers can safely access only its own and the next-lower-level driver's I/O stacklocations in any IRP. Such a driver must set up the I/O stack location for thenext-lower-level driver in IRPs.However, when designing a higher-level driver, you cannot predict when (orwhether) a new driver will be added to the current format of chain just belowyour driver. However we can safely assume that any subsequently added(intermediate) driver will handle the same IRP major function codes(IRP_MJ_XXX) as the displaced next-lower-level driver did.

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Lars Wirfelt liked this
Lars Wirfelt liked this
Lars Wirfelt liked this
Lars Wirfelt liked this
Lars Wirfelt liked this
Lars Wirfelt liked this
Lars Wirfelt liked this
Teferi Kebebew liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->