My Kernel v0.1.0
Interrupt Controller - x86
Collaboration diagram for Interrupt Controller - x86:

Macros

#define PIC_IRQ_COUNT   (IRQ_ATA_SECONDARY + 1)
 The total number of IRQ.
 

Enumerations

enum  pic_irq {
  IRQ_TIMER = 0 , IRQ_KEYBOARD , IRQ_CASCADE , IRQ_COM2 ,
  IRQ_COM1 , IRQ_LPT2 , IRQ_FLOPPY , IRQ_LPT1 ,
  IRQ_CMOS , IRQ_FREE1 , IRQ_FREE2 , IRQ_FREE3 ,
  IRQ_PS2 , IRQ_FPU , IRQ_ATA_PRIMARY , IRQ_ATA_SECONDARY
}
 All available PIC irqs, by vector index. More...
 

Functions

void pic_reset ()
 Reset the PIC. More...
 
void pic_eoi (pic_irq)
 Send an End Of Interrupt command to the PIC. More...
 
void pic_disable_irq (pic_irq)
 Disable the given IRQ.
 
void pic_enable_irq (pic_irq)
 Enable the given IRQ.
 

Detailed Description

8259 Programmable Interrupt Controller (PIC)

Any interaction done with the PIC should be done through the functions defined inside this header.

This also includes the definition of the interrupt handlers for the IRQs raised by the PIC.

See also

Enumeration Type Documentation

◆ pic_irq

enum pic_irq
Enumerator
IRQ_TIMER 

Raised by the PIT.

IRQ_KEYBOARD 

Raised by the keyboard.

IRQ_CASCADE 

Used to access the second controller.

IRQ_COM2 

Raised by the serial port.

IRQ_COM1 

Raised by the serial port.

Function Documentation

◆ pic_eoi()

void pic_eoi ( pic_irq  irq)

This is issued to the PIC chips at the end of an IRQ-based interrupt routine

Parameters
interruptThe interrupt request we finished treating

◆ pic_reset()

void pic_reset ( )

Should be called when entering protected mode.