diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-01-04 20:48:20 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-01-04 20:48:20 -0500 |
commit | 643062f9bc208911e3f27265c697dbde151d4f56 (patch) | |
tree | 5e85a225c69eb106ee98b76803ffe58d2572a726 /src/pic.c | |
parent | 085debd93f52d36381ea13ef27e7f72e87fe62f5 (diff) | |
download | seabios-643062f9bc208911e3f27265c697dbde151d4f56.tar.gz |
Add int1589 support.
Int1589 switches into protected mode for the caller.
Also, consistently use BUILD_BIOS_ADDR/SIZE in GDT macros.
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) |