Re: [Geekos-devel] defs.h
Status: Pre-Alpha
Brought to you by:
daveho
From: Sergey L. <ioa...@ya...> - 2003-05-19 16:49:10
|
When PIC routes an interrupt to a processor, it disables all the interrupts (with lower priorities) until interrupt handler tells PIC that it finishes handling. that command, EOI - EndOfInterrupt, is used exactly for that purpose: telling PIC that interrupt has been processed and PIC may continue. So every IRQ handler must send EOI command to the PIC. Now, you must know that there are more then one PIC installed on the PC. Usually, there are two of them. Second PIC is connected to the IRQ 2 of the first PIC, making so-called 'cascading'. Therefore, all IRQs coming from second PIC, are in between IRQ 1 and IRQ 3 (of the first PIC) by priority. And if the interrupt comes from the second PIC, you must send EOI to both PICs since both PICs are 'locked'. hope i'm not saying a bullshit, sergey. --- Behrang Saeedzadeh <beh...@ya...> wrote: > Hi > > Thanks for the information. One more thing... > > What is the exact job of End_IRQ function implemented > in irq.c? I was reading some documents and source code > and it was said that to send the EOI command to the > PIC we have to send 0x20 to address 0x20 if the irq > number is between 0 and 7 and send it to both 0x20 and > 0xA0 address if it's something between 8 and 15: > > if (irq < 8) { > Out_Byte(0x20, 0x20); // something like this > // as I should use a char > // for the second arg... > } else { > Out_Byte(0x20, 0x20); > Out_Byte(0xA0, 0x20); > } > > But the actual code is a little bit more complex. Is > that a bug or I have misunderstood something about the > EOI and ...? > > Thanks, > Behrang S. > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: If flattening out C++ or Java > code to make your application fit in a relational database is > painful, > don't do it! Check out ObjectStore. Now part of Progress Software. > http://www.objectstore.net/sourceforge > _______________________________________________ > Geekos-devel mailing list > Gee...@li... > https://lists.sourceforge.net/lists/listinfo/geekos-devel __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |