Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Re: MmMapLockedPagesSpecifyCache

Pavel_APavel_A Member Posts: 2,660
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
>

Comments

  • MikaeMikae Member Posts: 371
    >Hardware folks should do hardware, driverists should do drivers. Mixing these is not kosher.

    <offtop>Pavel, could you say who is meat in this case and who is milk? :)</offtop>

    P.S. Is there a way to contact you directly? The board doesn't allow private messages unfortunately.
  • Pavel_APavel_A Member Posts: 2,660
    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
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    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.
    >
    > <offtop>Pavel, could you say who is meat in this case and who is milk?
    > :)</offtop>
    >
    > 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
    >
  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,138
    <quote>
    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.
    </quote>

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

    Peter
    OSR

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Developing Minifilters 8 April 2019 OSR Seminar Space