summaryrefslogtreecommitdiff
path: root/picirq.c
diff options
context:
space:
mode:
authorRuss Cox <[email protected]>2009-07-11 19:24:56 -0700
committerRuss Cox <[email protected]>2009-07-11 19:24:56 -0700
commit2de1c550cab8a5812dc9965313fce00816a003eb (patch)
tree6ed2412d4f47546a1ee9fa2fe3be4b09cf9ac5eb /picirq.c
parent887f19686cf377db55953dac651ca8147c268092 (diff)
downloadxv6-labs-2de1c550cab8a5812dc9965313fce00816a003eb.tar.gz
xv6-labs-2de1c550cab8a5812dc9965313fce00816a003eb.tar.bz2
xv6-labs-2de1c550cab8a5812dc9965313fce00816a003eb.zip
trap cleanup
IRQ_OFFSET -> T_IRQ0 (a trap number not an IRQ number) T_SYSCALL 0x30 -> 0x40 (move out of IRQ range)
Diffstat (limited to 'picirq.c')
-rw-r--r--picirq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/picirq.c b/picirq.c
index be505a0..ff86831 100644
--- a/picirq.c
+++ b/picirq.c
@@ -45,7 +45,7 @@ picinit(void)
outb(IO_PIC1, 0x11);
// ICW2: Vector offset
- outb(IO_PIC1+1, IRQ_OFFSET);
+ outb(IO_PIC1+1, T_IRQ0);
// ICW3: (master PIC) bit mask of IR lines connected to slaves
// (slave PIC) 3-bit # of slave's connection to master
@@ -63,7 +63,7 @@ picinit(void)
// Set up slave (8259A-2)
outb(IO_PIC2, 0x11); // ICW1
- outb(IO_PIC2+1, IRQ_OFFSET + 8); // ICW2
+ outb(IO_PIC2+1, T_IRQ0 + 8); // ICW2
outb(IO_PIC2+1, IRQ_SLAVE); // ICW3
// NB Automatic EOI mode doesn't tend to work on the slave.
// Linux source code says it's "to be investigated".