General Info | |
Interface: IntController_i386 Files: intcontroller_i386.h Last change: 30/07/2002 Author: Luiz Henrique Shigunov |
Description
To learn more |
System Functions | |
0x00 - EndIRQ - Send end of IRQ command 0x01 - MaskIRQ - Disable an interrupt |
0x02 - RedirectIRQ - Redirect interrupts 0x03 - UnmaskIRQ - Enable an interrupt |
This page describes the IntController_i386 interface which provides access to the interrupt controller used in the Intel IA32 architecture.
The PIC (Programmable Interrupt Controller) is the component that manages hardware interrupts. PC/AT and compatibles have two PICs. The first one manages IRQs 0-7 and the second IRQs 8-15. We have 15 IRQs because IRQ 2 is used to cascade PICs.
When an IRQ is signaled, the proper PIC generates an interrupt. This interrupt number depends on the PIC configuration.
At startup all IRQs are masked and each module that uses an IRQ must unmask it.
To learn more about the PIC visit:
void IntController_i386_EndIRQ(unsigned int irq);
This function sends the end of IRQ command to the proper PIC.
If irq belongs to the first PIC, the command is sent to the first PIC. But, if it belongs to the second PIC, the command is sent to the first and the second PIC.
int IntController_i386_MaskIRQ(unsigned int irq);
This function disables irq. When an IRQ is disabled, it won't generate an interrupt.
int IntController_i386_RedirectIRQ(unsigned int interrupt);
This function redirects IRQs. This way IRQ0 can be bind to interrupt 45h, for instance. So, when IRQ0 is signaled, interrupt 45h will be generated.
If IRQ0 is bind to interrupt 45h, IRQ1 is bind to 46h, IRQ2 to 47h and so on. IRQ0 is bind to interrupt. The second PIC IRQs will be redirected too, they will be just after the first PIC.
int IntController_i386_UnmaskIRQ(unsigned int irq);
This function enables irq. When an IRQ is enabled it will generate interrupts.