Exemple #1
0
Fichier : irq.c Projet : 1m69/OS67
/* in short: map irq 0-15 to int 32-47 */
void irq_remap(){
    pic_init();

    outb(PIC1_DATA, 0x20);                   // ICW2: Master PIC vector offset
    outb(PIC2_DATA, 0x28);                   // ICW2: Slave PIC vector offset

    outb(PIC1_DATA, 4);                      // ICW3: tell Master PIC that there is a slave PIC at IRQ2 (0000 0100)
    outb(PIC2_DATA, 2);                      // ICW3: tell Slave PIC its cascade identity (0000 0010)
 
    outb(PIC1_DATA, ICW4_8086);
    outb(PIC2_DATA, ICW4_8086);
 
    irq_clear_mask();
}
Exemple #2
0
void irq_configure(void){
  // Remap IRQ to avoid conflict with Intel Interrupts (thx IBM)
  pic_remap(MPIC_IRQ_OFFSET, SPIC_IRQ_OFFSET);
  irq_clear_mask(1);
}
Exemple #3
0
void keyboard_init() {
	irq_clear_mask(1);
}