aboutsummaryrefslogtreecommitdiffstats
path: root/src/pic.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-01-04 20:48:20 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-01-04 20:48:20 -0500
commit643062f9bc208911e3f27265c697dbde151d4f56 (patch)
tree5e85a225c69eb106ee98b76803ffe58d2572a726 /src/pic.c
parent085debd93f52d36381ea13ef27e7f72e87fe62f5 (diff)
downloadseabios-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.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/pic.c b/src/pic.c
index f421bec8..8992a8b5 100644
--- a/src/pic.c
+++ b/src/pic.c
@@ -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)