Arbitration and Translation, Part 1

A while back Jake Oshins answered a question on NTDEV about bus arbitration and afterwards I asked him if he could write a couple of posts about it for the blog. Here is part 1.   History Lesson   In the history of computing, most machines weren’t PCs.  PCs, and the related “industry standard” server…

1

What is IRQL?

Jake Oshins wanted to write about IRQLs and I am gladly letting him use my blog as a platform.  Here it is… I’ve found myself explaining IRQL a lot lately, sometimes to people who want to know because they’re trying to write Windows drivers and sometimes to people who are accustomed to Linux or some…

15

How do I cancel an IRP that another thread may be completing at the same time?

Let’s say that you allocated a PIRP and sent it down your device stack.  You free the PIRP in the completion routine and then return STATUS_MORE_PROCESSING_REQUIRED.  To make life more fun, you decide that you want to be able to cancel the sent IRP after you have sent it so you try to do it…

1

Inconceivableable

I have no idea who created the name for PNP_DEVICE_NOT_DISABLEABLE, but I probably have the same reaction as you … “seriously?  that is what they named?”  I mean come on, I think it could have at least been named PNP_DEVICE_CANNOT_BE_DISABLED.  I am sure you can think of some better names too. If so, please leave…

1

Once not disableable, forever not disableable

One interesting quirk about the PNP_DEVICE_NOT_DISABLEABLE state is that once it has been set and the PnP manager has processed it, the state is sticky.  By sticky I mean that even if you attempt to clear this bit on a subsequent IRP_MN_QUERY_PNP_DEVICE_STATE IRP, the PnP manager ignores your changes to this state.  This state remains…

1

Why I should not be writing applications ;)

The first driver I owned when I started at Microsoft in 1997 was i8042prt.sys, the driver that controls your PS2 mouse and keyboard.  I had the job of upgrading it from an NT4 legacy style driver to a PnP enabled Windows 2000 driver.  Of course my dad asked “didn’t keyboards and mice work before you…

5

How to share HW resources with another driver not in the same PnP hierarchy

First, I have to say that I don’t agree with this design pattern at all.  I think it leads to too many problems and complications that are not worth the pain.  The only reason I am writing this entry is that I have seen so many people get this wrong or not account for some…

1

Setting a security descriptor on a legacy device object

Setting the security descriptor allows you to control who can open a handle to the device object.  Typically you can call IoCreateDeviceSecure to create the device object and have the correct DACL from the start.  One issue with IoCreateDeviceSecure is that the SDDL string is limited to what it can describe, primarily you can only…

1

Fast Resume and how if affects your driver

Fast resume, which was introduced in Windows XP,  is often mentioned when implementing power support in your WDM driver.  But what does “fast resume” mean and when implementing fast resume, what side effects occur in your driver?  I’ll to answer both of these questions as well as the reasoning behind this feature.  When I started to write this…

2

Vista IO manager changes in handling FILE_DEVICE_SECURE_OPEN

After having the IO manager developer review my last 2 posts, he pointed out to me that the IO manager handling of FILE_DEVICE_SECURE_OPEN (FDSO) has changed slightly in Vista.  News to me and probably news to all of you as well.   The change involves the case where there is a file system mounted on a…

1