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

Description

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

To learn more about the PIC visit:

0x00 - EndIRQ

Syntax

void IntController_i386_EndIRQ(unsigned int irq);

Properties

Description

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.

Return value

Nothing.

0x01 - MaskIRQ

Syntax

int IntController_i386_MaskIRQ(unsigned int irq);

Properties

Description

This function disables irq. When an IRQ is disabled, it won't generate an interrupt.

Return value

0x02 - RedirectIRQ

Syntax

int IntController_i386_RedirectIRQ(unsigned int interrupt);

Properties

Description

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.

Return value

0x03 - UnmaskIRQ

Syntax

int IntController_i386_UnmaskIRQ(unsigned int irq);

Properties

Description

This function enables irq. When an IRQ is enabled it will generate interrupts.

Return value