IRQ to DIRQL mapping

Hi,

Anybody knows how Windows NT HAL maps the hardware IRQs to its
internal DIRQLs? Is is possible to reserve a high DIRQL (eg DIRQL27)
for certain hardware? I need the highest DIRQL to run my device since
it’s used for a very time-critical purpose.

Thanks.

Ma Jun


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You do not have control over how the system maps IRQ’s to DIQRLs.

Paul Lever
----- Original Message -----
From: “Ma Jun”
To: “NT Developers Interest List”
Sent: Wednesday, April 04, 2001 11:57 PM
Subject: [ntdev] IRQ to DIRQL mapping

> Hi,
>
> Anybody knows how Windows NT HAL maps the hardware IRQs to its
> internal DIRQLs? Is is possible to reserve a high DIRQL (eg DIRQL27)
> for certain hardware? I need the highest DIRQL to run my device since
> it’s used for a very time-critical purpose.
>
> Thanks.
>
> Ma Jun
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@home.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Ma Jun:

If you have a time critical application, you may find an answer by
subscribing and
posting that question to the ntrealtime mailing list.

There is a product by BSquare that may already solve your problem. Check
their web.

George

At 02:57 PM 4/5/01 +0800, you wrote:

Hi,

Anybody knows how Windows NT HAL maps the hardware IRQs to its
internal DIRQLs? Is is possible to reserve a high DIRQL (eg DIRQL27)
for certain hardware? I need the highest DIRQL to run my device since
it’s used for a very time-critical purpose.

Thanks.

Ma Jun


You are currently subscribed to ntdev as: xxxxx@brd.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Anybody knows how Windows NT HAL maps the hardware IRQs to its

internal DIRQLs?

You shouldn’t depend on this, but for a non-APIC x86 PC system under NT
4.0:
IRQL + IRQ# = 27

Thus, if your IRQL is 16, then you’re servicing IRQ 11.

Is is possible to reserve a high DIRQL (eg DIRQL27) for certain hardware?

For IRQ 0, the answer is no, unless you’re the clock interrupt. :slight_smile:

Generally, you might be able to do what you want with the BIOS settings
and/or Plug and Play.

Note that there’s some weirdness that goes on because NT prioritizes the
IRQs from 15 (lowest) -> 0 (highest). However, the non-APIC hardware
prioritizes them from 7 (lowest) -> 3, 15 -> 8, 2 -> 0 (highest). NT tries
to work around that, but fails under some cases. There was a good
discussion of this in a Dr. Dobb’s Journal article about 4 or more years
ago, but frankly, I forget the author (even though we exchanged a whole
bunch of email) and any details.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Taed,

Thanks a lot for your information.

> Anybody knows how Windows NT HAL maps the hardware IRQs to its
> internal DIRQLs?
You shouldn’t depend on this, but for a non-APIC x86 PC system under NT
4.0:
IRQL + IRQ# = 27
Thus, if your IRQL is 16, then you’re servicing IRQ 11.

I check on my machine, it’s a CompactPCI system with one AMD CPU and NT 4.0,
it’s exactly like what you said: IRQL + IRQ# = 27.
That means the highest IRQL I can use is IRQL24, which is IRQ3 phsically,
used
by COM2 normally, am I right?

> Is is possible to reserve a high DIRQL (eg DIRQL27) for certain
hardware?

For IRQ 0, the answer is no, unless you’re the clock interrupt. :slight_smile:

Generally, you might be able to do what you want with the BIOS settings
and/or Plug and Play.

Note that there’s some weirdness that goes on because NT prioritizes the
IRQs from 15 (lowest) -> 0 (highest). However, the non-APIC hardware
prioritizes them from 7 (lowest) -> 3, 15 -> 8, 2 -> 0 (highest). NT
tries
to work around that, but fails under some cases. There was a good
discussion of this in a Dr. Dobb’s Journal article about 4 or more years
ago, but frankly, I forget the author (even though we exchanged a whole
bunch of email) and any details.

For today’s normal one-cpu system, does it still use PIC to deal with
interrupt or
already update to APIC? How do I check?
If I use a non-APIC system, that means the hardware priorities are from
(lowest)7->3, 15->8, 2->0(highest), for IRQ3, it still has phsically lower
priority
than IRQ9, so even I choose IRQ3 (which can get IRQL24 inside NT), it
can preempted by IRQ9 phsically, no matter how NT deals with it, if so, I
still
can not guarantee that IRQ3 (DIRQL24) always has the higher priority than
other
devices. Is it true?

Unfortuntely I can not find the discussion you’ve metioned.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com