Hardware interrupt priority

There was a thread along these lines a few months ago. I have a few more questions assuming x86:

1.) There was some question about the default priority chain, highest to lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest. Would someone please verify
this?

2.) 4.25 had a ‘-i’ flag to ‘Proc’ that enabled one to set which IRQ had the highest priority and
began
the chain. RTP so far doesnt have a way to do this. Is this correct?

3.) Assume that I am currently executing an ISR from an interrupt on level 5. Assume level 3 has a
higher
priority and level 7 has a lower. Assume I havent masked or disabled any interrupts in my ISR.
Assume
a single processor.

a.) If while in my ISR an interrupt comes on level 3 would my ISR be preempted?

b.) If while in my ISR an interrupt comes on level 7 would my ISR be preempted?

Thanks!


Art Hays
National Institutes of Health
avhays@nih.gov

“Art Hays” <avhays@nih.gov> wrote in message
news:a70f49$lgr$1@inn.qnx.com

There was a thread along these lines a few months ago. I have a few more
questions assuming x86:

1.) There was some question about the default priority chain, highest to
lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest.
Would someone please verify
this?

2.) 4.25 had a ‘-i’ flag to ‘Proc’ that enabled one to set which IRQ had
the highest priority and
began
the chain. RTP so far doesnt have a way to do this. Is this correct?

3.) Assume that I am currently executing an ISR from an interrupt on level
5. Assume level 3 has a
higher
priority and level 7 has a lower. Assume I havent masked or disabled any
interrupts in my ISR.
Assume
a single processor.

a.) If while in my ISR an interrupt comes on level 3 would my ISR be
preempted?

Yes

b.) If while in my ISR an interrupt comes on level 7 would my ISR be
preempted?

No.

I don’t think it would make any difference on multiple CPU (on x86 at least)
as I beleive all interrupts are hooked to CPU 0.

Thanks!


Art Hays
National Institutes of Health
avhays@nih.gov

“Art Hays” <avhays@nih.gov> wrote in message news:a70f49$lgr$1@inn.qnx.com

There was a thread along these lines a few months ago. I have a few more questions assuming x86:

1.) There was some question about the default priority chain, highest to lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest. Would someone please verify
this?

I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

Can someone from QNX please verify which of the above is correct? Thanks.

Art Hays <avhays@nih.gov> wrote in article <a7c1ak$3c8$1@inn.qnx.com>…

“Art Hays” <> avhays@nih.gov> > wrote in message news:a70f49$lgr$> 1@inn.qnx.com> …
There was a thread along these lines a few months ago. I have a few more questions assuming
x86:

1.) There was some question about the default priority chain, highest to lowest. One post said
it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest. Would someone please
verify
this?


I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

Can someone from QNX please verify which of the above is correct? Thanks.

I believe the priority 0,1,8,9,10,11,12,13,14,15,3,4,5,6,7 from high to low, is setted by BIOS
during startup. It’s true for PC/AT and DOS. I guess it can be changed (reprogrammed) by QNX (in
additional the QNX should reprogram default vectors for hardware interrupts, but it’s another story
about real x86 mode, not really interesting here). I am also waiting for reply from QNX in this
thread. Since QNXRTP is real_time OS, please don’t ignore this subject.

Best regards.

Eduard.
ed1k at yahoo dot com



“Art Hays” <avhays@nih.gov> wrote in message
news:a7c1ak$3c8$1@inn.qnx.com

“Art Hays” <> avhays@nih.gov> > wrote in message
news:a70f49$lgr$> 1@inn.qnx.com> …
There was a thread along these lines a few months ago. I have a few
more questions assuming x86:

1.) There was some question about the default priority chain, highest to
lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest.
Would someone please verify
this?


I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

In what contex?. For example some people may want serial port set
at higher priority then HD. No setup is going to please everyone.

QNX4 offered some control over this which was great. I guess with QNX6 one
could write a
custom startup module to change this, but what a pain…

Can someone from QNX please verify which of the above is correct? Thanks.

“Mario Charest” <goto@nothingness.com> wrote in message news:a7ciso$fpb$1@inn.qnx.com

“Art Hays” <> avhays@nih.gov> > wrote in message
news:a7c1ak$3c8$> 1@inn.qnx.com> …

“Art Hays” <> avhays@nih.gov> > wrote in message
news:a70f49$lgr$> 1@inn.qnx.com> …
There was a thread along these lines a few months ago. I have a few
more questions assuming x86:

1.) There was some question about the default priority chain, highest to
lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest.
Would someone please verify
this?


I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

In what contex?. For example some people may want serial port set
at higher priority then HD. No setup is going to please everyone.

I think this is the default when the machine is powered up and after the BIOS is through.
I dont know if QNX6 then changes this. Under QNX4 I think it was changed so that
2 or 3 became the highest.

QNX4 offered some control over this which was great. I guess with QNX6 one
could write a
custom startup module to change this, but what a pain…


Can someone from QNX please verify which of the above is correct? Thanks.
\

Mario Charest <goto@nothingness.com> wrote in article <a7ciso$fpb$1@inn.qnx.com>…

“Art Hays” <> avhays@nih.gov> > wrote in message
news:a7c1ak$3c8$> 1@inn.qnx.com> …

“Art Hays” <> avhays@nih.gov> > wrote in message
news:a70f49$lgr$> 1@inn.qnx.com> …
There was a thread along these lines a few months ago. I have a few
more questions assuming x86:

1.) There was some question about the default priority chain, highest to
lowest. One post said it
was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15, with level 3 the highest.
Would someone please verify
this?


I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

In what contex?. For example some people may want serial port set
at higher priority then HD. No setup is going to please everyone.

Ok, forget about pleasure of everyone. I wonder which hardware interrupts order is setted by
standard x86 IPL (I’ve installed fresh QNXRTP on my PC, then which hardware interrupt has high
priority in my system?). No aswer. Nobody care.

Well, some extra questions for deep hardware guys (I hope they are):

Does QNXRTP initialize the x86 hardware in order to use Fully Nested Mode and don’t use The Special
Fully Nested Mode?

After reading the
http://qdn.qnx.com/support/docs/embedding_sdk_en/building/startup.html
I don’t see the danger to setup Specific Priority “in fly” or even setup Automatic Rotation on
Non-Specific EOI. Does anybody try to change priority in his program? Is it really safe?

Unfortunately I have no hardware to play around priorities at the moment. Otherwise I’d not ask
such questions. Is anyone willing to play around this?

Eduard.
ed1k at ukr dot net

Art Hays <avhays@nih.gov> wrote:

There was a thread along these lines a few months ago. I have a few more questions assuming x86:

1.) There was some question about the default priority chain, highest
to lowest. One post said it was 3,4,5,6,7,0,1,2,8,9,10,11,12,13,14,15,
with level 3 the highest. Would someone please verify this?

That was the default for QNX4.

That is not the default for QNX6.

Default for QNX6:

0,1,2[8,9,10,11,12,13,14,15],3,4,5,6,7

2.) 4.25 had a ‘-i’ flag to ‘Proc’ that enabled one
to set which IRQ had the highest priority and began
the chain. RTP so far doesnt have a way to do this. Is this correct?

Correct.

You would have to modify your startup to play with this.

You might be able to hit the 8259 directly after boot as well –
but be BLOODY careful how you do it, so you don’t change any other
bits, in fact, you’d better do it with interrupt disabled at a
minimum.

3.) Assume that I am currently executing an ISR from an interrupt
on level 5. Assume level 3 has a higher priority and level 7 has
a lower. Assume I havent masked or disabled any interrupts in my ISR.
Assume a single processor.

a.) If while in my ISR an interrupt comes on level 3 would my ISR
be preempted?

Yes.

b.) If while in my ISR an interrupt comes on level 7 would my ISR
be preempted?

No.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Art Hays <avhays@nih.gov> wrote:

I found a book that states that the default startup priority would be:

0,1,8,9,10,11,12,13,14,15,3,4,5,6,7

Can someone from QNX please verify which of the above is correct? Thanks.

Verified earlier, verified again here – this is correct.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.