Re: hardware interrupt handlers registration and msg-passing ?



I am not sure of what I understand so far. But to clarify my confused
mind, I just jot down my understanding.If anything is found not corret
or inappropriate, let me know. I have just started leaning by going
through the Minix 3 after just finishing up the understanding of Minix
2 up to point where what I wanted to.

Basically, the thesis about the "True Microkenel ~~" wiritten by Jorrit
gave me a big picture about the difference between Minix 2 and 3 as
well as some perspectives I didn't notice. Furthermore, I think there
are some differences between 3.0.0 , which he wrote his thesis based
on, and the current versions.I haven't looked at verson 3.0.0.

First of all, 3.0.0 used "hold" queue for nested interrupts but this
feature was disabled and replaced with pending bitmap passing mechanism
to drivers when interrupts occur.

Second, the pending interrupts are resolved by one shot of sending
bitmaps to a driver no matter what pending interrups are piled up
during interrupt handling when an arbitray interrupt takes place. (This
is likely to be the most confusing and hidden-from-me idea. In addition
I think that's why the reentrance feature has been disabled in the
current version)

Third, lots of reconfigurations of structures in Minix 3 have been
caused for the purposes of dynamic mechanism and more forced modularity
as well as seperaion of hardware-dependent from hardware-independent
parts from the system perspective.

The registration of handlers with the kernel is done through message
passing from drivers. I think this is the reason I coun't find the call
"put_irq_handler" inside the drivers.

If anybody's comments are welcome. If you find anything, let me know.
I am stiil learning and just started understand what OSs really mean
and what they are doing.

Thanks for your attention.
Tyson M Kim








ma777x@xxxxxxxxxxx wrote:
Hii Can anybody give me a little bit explantion about hardware
interrupt handlers registration and msg-passing to drivers ?
or some hints where I should look around ?

According to the book , hardware interrupt handlers are registered into
an array of struct ir_hooks{}; named irq_handlers[] and also gives some
hints about "generic-handler" for drivers in user-level.

But I am unable to figure out where the "generic-handler" is about or
how it is regiesterd to the "hook" structure to pass msg to the
drivers. I think this is one of the biggest differences from the
previous verson (2.0.0) as far as I know so far along with disabled
reentrance and a kind of callback mechanism due to the movement of
drivers to the upper layer.

System.c just shows an initialization but those are empty(NONE) . My
guess when the drivers are loaded onto memory, they register them but
only lance ethernet driver tried to do it but finally was commneted
out. Nobody does it. Somewere in System.c there should be the code for
registration of generic handers. So far no gains yet.

And also when does the stuct irq_hooks[] are filled with effective data
?

Any comments or your hints are really appreciated.

Tyson M Kim

.



Relevant Pages

  • Re: Polling loop good here???
    ... The "vertical retrace interrupt" was IRQ 2... ... In today's hardware - as has been mentioned - they've almost certainly ... it...make use of the drivers... ...
    (alt.lang.asm)
  • Re: [RFC] killing the NR_IRQS arrays.
    ... Subject: IRQ API ... interrupt controllers, and knowing hardware designers, they'll ... I believe that there are some common problems with the existing API ... architecture specific drivers now if they feel they would benefit ...
    (Linux-Kernel)
  • Re: XScale problem
    ... You shold keep in mind that the under CE the NDIS miniport environment ... provided in CE to make it easier to port existing drivers written for NT ... actual interrupt service routine. ... corresponding driver IST, which in turn will call first ISR ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Minix roadmap
    ... What is the future Minix roadmap? ... reasonably fast system more for low-end machines than aiming ... creating a small OS developed thinking on ... especially in drivers. ...
    (comp.os.minix)
  • Re: Status of MINIX 3
    ... Porting drivers. ... Porting MINIX 3 to hardware platforms other than the Pentium. ...
    (comp.os.minix)