DISPATCH_LEVEL and WDM on 9x

Does anyone knows how DISPATCH_LEVEL maps in 9x environment? I mean, can there be any thread switch or VM switch, except for hardware interrupt?

And where in VM paradigm WMD driver lives? it is patched somewhow to VxD world? I am mostly interested in how VMM recognizes it, and how the thread scheduler looks at NT IRQLs…

Thanks in advance, you guys are most helpful!

Paul Shpilsher

I don’t exactly know how all this stuff work, but I saw in VMM.VXD module
many code fragments that operate with IRQL level. The base IRQL logic
resides within VMM module (KfRaiseIrql(), KfLowerIrql() etc. are here) and
is tightly tied with VPICD module that performs IRQL to IRQ lines mapping
and masking and also supports KINTERRUPT object. I also saw some IRQL
manipulation code in the function which pumps event queue. Also VWIN32 works
with IRQL stuff (when using dispatch object). I didn’t thoroughly study how
it works.

But the basic module which provides WDM emulation layer is NTKERN.VXD. This
module provides the whole bunch of WDM functions (thru PELDR_AddExportTable
service as all other WDM-aware modules). NTKERN is mainly tied with
CONFIGMG.VXD (configuration, driver loading, PnP and Power support) and of
course with VMM.VXD because NTKERN actively uses its services. WDM-driver
loading is performed by VXDLDR.VXD module using the PELDR_LoadModule2
service. This service loads driver image as PE-file and resolves all import
dependencies. It’s worth mentioning NTKERN loads almost all WDM drivers in
so-called preemptable memory area so that code in these drivers will be
preemtable (unlike VXD drivers that must use special technique to be
preemptable).

If you have any question on this subject, please feel free to ask me. But I
digged into these internals a long time ago so many things were forgotten.

WBR,

Konstantin Manurin
Programmer
Nival Interactive
mailto:xxxxx@nival.com

10a bld. 5, 1st Volokolamsky proezd
Moscow 123060 Russia
Tel: +7 (095) 363-9630
Fax: +7 (095) 363-9631
http://www.nival.com
http://www.etherlords.com
http://www.evil-islands.com