OSR Dev Blog

Special Win2K PnP Tracing and Checks
(By: Hector J. Rodriguez | Published: 31-Jul-01| Modified: 10-Oct-02)

There's been a rumor floating around here for a while about some "secret" locations in Win2K that you could modify to get it to:

a)      Enable a bunch of built-in tests, much like (but beyond those provided by) driver verifier, and,

b)      Display PnP information as the drivers started.

Imagine our surprise when, we typed "!patch" in WinDbg and the following was displayed:

Category: WDM Driver Correctness !Patch Irps - Assert IRP usage is correct !Patch IrpTrack - Monitor IRPs for mistakes !Patch IrpRotateStatus - Rotate success codes !Patch IrpPendAll - Force IRPs Pending !Patch IrpDeferCompletion - IRP completion is stalled at each stack !Patch IrpConsumeStacks - Consume stack locations (undo IoSkips) !Patch IrpSurrogate - Writes to IRPs after completion fault !Patch IrpEditSRBs - Patch SRBs so writes after completion fault.

Complete IRPs at specific IRQLs.

And up to one of:

!Patch IrpDpcComplete - Complete all IRPs at IRQL2 (DPC). !Patch IrpPassiveComplete - Complete all IRPs at IRQL0 (Passive). !Patch IrpSeedStack - Catches uninitialized variables. !Patch IrpWatchAlloc - IRPs are allocated from the special pool. !Patch IrpNoHacks - Disable all hacks for IRP asserting. !Patch IrpNoAsserts - Turn off IRP assertions.

Category: Plug-n-Play Options !Patch PnpQueue - Shows Pnp remove information. !Patch HalPnpVerbose - Turn on Hal Pnp Verbose Output. !Patch PnpRes - Show resource assignment info.

And up to one of:

Patch PnpResFull - Even more resource info.

Selecting an indented assert automatically enables all higher asserts. Type !Patch ? to get more information on an assert.

Selecting an indented assert automatically enables all higher asserts. Type !Patch ? to get more information on an assert.

Cool, eh? Yeah, I thought so too...

 

 

This article was printed from OSR Online http://www.osronline.com

Copyright 2017 OSR Open Systems Resources, Inc.