Does Windows XP support KMD?

Does Windows XP support Kernel Mode Driver used in Windows NT 4.x?

Yes, but this is a bad idea, it will disable the power management at least.

Max

----- Original Message -----
From: “Sherman”
To: “NT Developers Interest List”
Sent: Friday, April 05, 2002 5:52 PM
Subject: [ntdev] Does Windows XP support KMD?

> Does Windows XP support Kernel Mode Driver used in Windows NT 4.x?
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

Yes. Load it as a legacy driver.


Gary G. Little
xxxxx@broadstor.com
xxxxx@inland.net

“Sherman” wrote in message news:xxxxx@ntdev…
>
> Does Windows XP support Kernel Mode Driver used in Windows NT 4.x?
>
>

“Sherman” wrote in message news:xxxxx@ntdev…
>
> Does Windows XP support Kernel Mode Driver used in Windows NT 4.x?
>

SORT of. Not every NT V4 driver works as written.

As Max pointed out, loading such a driver that uses any hardware resources
WILL disable power management on the entire machine.

The biggest issue is that it’s not clear how far into the future these
“legacy” type drivers will be supported. Nobody (almost – there’s always
some weird exception to the rule) should be writing NT V4 style drivers for
use exclusively on Windows 2000, Windows XP, or Windows .NET. Support for
PnP and Power is a requirement.

Peter
OSR

>The biggest issue is that it’s not clear how far into the future these

“legacy” type drivers will be supported. Nobody (almost – there’s always
some weird exception to the rule) should be writing NT V4 style drivers for
use exclusively on Windows 2000, Windows XP, or Windows .NET. Support for
PnP and Power is a requirement.

That seems like it might be a case of “does Microsoft do what they say we
should do”. I was curious and just counted what looked like PnP drivers vs.
legacy drivers on a Win2000 system. It offhand looked like there were more
legacy drivers than PnP drivers on the system. If somebody has a WinXP
system handy (the WinXP system next to me seems to not boot at this
instant), perhaps they could comment on the ratio. I’d expect to see a
DRAMATIC reduction in legacy drivers if Microsoft were serious about this?
Like ZERO legacy drivers in WinXP.

Even stranger, on the front page of the Jan-Feb 2002 NT Insider, it talks
about clever new in-stack queued spin locks, and also says they are NOT
available in WDM drivers, only “standard kernel mode drivers” or “file
system drivers”. I guess somebody forgot to inform the OS core developers
than “standard kernel mode drivers” were no longer acceptable. The DDK help
file seems to agree, you need ntddk.h and not wdm.h. It has been suggested
here: wdm.h is the future, and ntddk.h is the past. Looking at ntddk.h for
the WinXP DDK, KeAcquireInStackQueuedSpinLock seems to be inside the
comments that say “begin_wdm”. Perhaps the truth is we have “standard
kernel mode drivers” which are the same as “wdm” drivers but are different
than “WDM” drivers.

I think if writing Windows drivers get’s much more complex, I’ll go in with
my friends on a bulk purchase on the book “Biotech for Dummies”.

  • Jan

Jan,

You must have specially calibrated eyes … how do you tell if a driver is a
legacy driver or not when ALL drivers have entries in
CurrentControlSet->Services? Mostly you can get any driver to load simply by
defining for that driver what has always been defined for that driver …
the values in CurrentControlSet->Services->aDriver. Whether it abides by WDM
will then define whether the AddDevice function is called. I would venture
to say that not all drivers will ever be WDM since not all drivers require
power management or PnP.

There most likely will always be “standard kernel mode drivers” with
“legacy” drivers falling into the category of an NT4 driver, compiled for
NT4 but needed to run in 2000 or XP. Standard KM drivers, then would be
drivers compiled for 2000 or XP but not a WDM variant.

All that is supposition by the way … and if I add 2.90 I can by you a bad
tasting cup of coffee at Starbucks. :slight_smile:


Gary G. Little
xxxxx@broadstor.com
xxxxx@inland.net

“Jan Bottorff” wrote in message news:xxxxx@ntdev…
>
>
> >The biggest issue is that it’s not clear how far into the future these
> >“legacy” type drivers will be supported. Nobody (almost – there’s
always
> >some weird exception to the rule) should be writing NT V4 style drivers
for
> >use exclusively on Windows 2000, Windows XP, or Windows .NET. Support
for
> >PnP and Power is a requirement.
>
> That seems like it might be a case of “does Microsoft do what they say we
> should do”. I was curious and just counted what looked like PnP drivers
vs.
> legacy drivers on a Win2000 system. It offhand looked like there were more
> legacy drivers than PnP drivers on the system. If somebody has a WinXP
> system handy (the WinXP system next to me seems to not boot at this
> instant), perhaps they could comment on the ratio. I’d expect to see a
> DRAMATIC reduction in legacy drivers if Microsoft were serious about this?
> Like ZERO legacy drivers in WinXP.
>
> Even stranger, on the front page of the Jan-Feb 2002 NT Insider, it talks
> about clever new in-stack queued spin locks, and also says they are NOT
> available in WDM drivers, only “standard kernel mode drivers” or “file
> system drivers”. I guess somebody forgot to inform the OS core developers
> than “standard kernel mode drivers” were no longer acceptable. The DDK
help
> file seems to agree, you need ntddk.h and not wdm.h. It has been suggested
> here: wdm.h is the future, and ntddk.h is the past. Looking at ntddk.h for
> the WinXP DDK, KeAcquireInStackQueuedSpinLock seems to be inside the
> comments that say “begin_wdm”. Perhaps the truth is we have “standard
> kernel mode drivers” which are the same as “wdm” drivers but are different
> than “WDM” drivers.
>
> I think if writing Windows drivers get’s much more complex, I’ll go in
with
> my friends on a bulk purchase on the book “Biotech for Dummies”.
>
> - Jan
>
>
>
>
>
>

> ----------

From: xxxxx@pmatrix.com[SMTP:xxxxx@pmatrix.com]
Reply To: xxxxx@lists.osr.com
Sent: Saturday, April 06, 2002 2:15 AM
To: xxxxx@lists.osr.com
Subject: [ntdev] Re: Does Windows XP support KMD?

I think if writing Windows drivers get’s much more complex, I’ll go in
with
my friends on a bulk purchase on the book “Biotech for Dummies”.

There is ZwCreateMutant() function prepared for you :wink:

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]

>You must have specially calibrated eyes … how do you tell if a driver is a

legacy driver or not when ALL drivers have entries in
CurrentControlSet->Services?

I looked through CurrentControlSet->Services->Enum and all the ones
starting with ROOT\LEGACY_ seem like pretty good candidates. I believe
perhaps a better way might be to type !devnode 0 1 in windbg and look for
the DNF_LEGACY_DRIVER flag, although that would indicate more how many
legacy devices there were vs. legacy drivers. Doing this suggests somewhere
around 30% of the devnodes have this flag set.

I would venture

to say that not all drivers will ever be WDM since not all drivers require
power management or PnP.

I fully agree. MANY drivers seem like they don’t do PnP or power
management, or even have much to do with actual hardware.

  • Jan