diff options
Diffstat (limited to 'src/pic.c')
-rw-r--r-- | src/pic.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -10,15 +10,14 @@ #include "config.h" // CONFIG_* void -pic_setup(void) +set_pics(u8 irq0, u8 irq8) { - dprintf(3, "init pic\n"); // Send ICW1 (select OCW1 + will send ICW4) outb(0x11, PORT_PIC1_CMD); outb(0x11, PORT_PIC2_CMD); // Send ICW2 (base irqs: 0x08-0x0f for irq0-7, 0x70-0x77 for irq8-15) - outb(0x08, PORT_PIC1_DATA); - outb(0x70, PORT_PIC2_DATA); + outb(irq0, PORT_PIC1_DATA); + outb(irq8, PORT_PIC2_DATA); // Send ICW3 (cascaded pic ids) outb(0x04, PORT_PIC1_DATA); outb(0x02, PORT_PIC2_DATA); @@ -30,6 +29,13 @@ pic_setup(void) outb(~0, PORT_PIC2_DATA); } +void +pic_setup(void) +{ + dprintf(3, "init pic\n"); + set_pics(0x08, 0x70); +} + // Handler for otherwise unused hardware irqs. void VISIBLE16 handle_hwpic1(struct bregs *regs) |