Re: MmMapLockedPagesSpecifyCache

The IRQL is DISPATCH probably because you are under
some spinlock (or WDF lock if you use KMDF).
So you need to find where you grab this spinlock and
call MmMapLockedPagesSpecifyCache before or after it.
Note that a work item won’t help here because it runs
outside of your user process context.

Alternatives:

  1. Don’t map the memory to user mode. In Windows we don’t like it as
    much as in embedded or some other OS. Just do it in the good Windows way.
  2. Tell your boss to find a consultant to take care of the driver,
    and be done with this nuisance at last.
    Hardware folks should do hardware, driverists should do drivers.
    Mixing these is not kosher.

Regards,
– pa

On 22-Aug-2012 15:34, xxxxx@gmail.com wrote:

Dear Members,

My driver is based on Plx9x5x sample.
There is no KeRaiseIrql nor KeLowerIrql in other places.

Upon IOCTL request (used to map kernel space to user space) I checked IRQL. It is 2
So I used KeRaiseIrql to make it 1.

I think it is a BUG that KeRaiseIrql helped me to make IRQL=1.

Can you tell what is the reason my IRQL is 2 upon IOCTL ?
I’m aware changing IRQL is wrong.
Can you suggest an alternative so that MmMapLockedPagesSpecifyCache will not cause exception ?

Thanks,
Zvika

>Hardware folks should do hardware, driverists should do drivers. Mixing these is not kosher.

Pavel, could you say who is meat in this case and who is milk? :slight_smile:

P.S. Is there a way to contact you directly? The board doesn’t allow private messages unfortunately.

On 23-Aug-2012 01:43, xxxxx@yahoo.com wrote:

P.S. Is there a way to contact you directly? The board doesn’t allow private messages unfortunately.

For private messages, just use email.
The web interface hides email addresses, but when you read this list in
a nntp newsreader all addresses are visible.

– pa

The problem with hardware folks doing hardware without any comprehension
of reality, using only their “hardware designer blinders”, gets designs
that result in catastrophes when you try to write a driver.

The problem with driver writers not understanding hardware is that they
(a) don’t know what to ask for (b) don’t recognize the difference between
a legitimate “that’s impossible” and the I-don’t-feel-like-changing-it
“that’s impossible” (c) they naively assume the hardware actually works.

I remember the days when high-speed intercomputer networks filled boxes
and were built out of 7400-class TTL gates. And I remember a colleague
and I with the prints in front of us, tracing the circuit signals (me on
the receiver and he on the transmitter) only to discover that it was
possible for each host to put its half-duplex component into “receive”
mode, and not know it, and wait forever trying to get data, or both into
“transmit” and cause the circuits to burn out (they used totem-pole TTL
instead of robust interfaces). We were the ones charged with writing the
device drivers on our respective sides. We sent the device back to the
lab and said “redesign this abomination”
joe

>Hardware folks should do hardware, driverists should do drivers. Mixing
> these is not kosher.

Pavel, could you say who is meat in this case and who is milk?
> :slight_smile:

P.S. Is there a way to contact you directly? The board doesn’t allow
private messages unfortunately.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

This is so true, I think I’m going to have a plaque made with this on it.

Peter
OSR