From 2de1c550cab8a5812dc9965313fce00816a003eb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 11 Jul 2009 19:24:56 -0700 Subject: trap cleanup IRQ_OFFSET -> T_IRQ0 (a trap number not an IRQ number) T_SYSCALL 0x30 -> 0x40 (move out of IRQ range) --- lapic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lapic.c') diff --git a/lapic.c b/lapic.c index 19c5b4b..500844a 100644 --- a/lapic.c +++ b/lapic.c @@ -52,14 +52,14 @@ lapicinit(int c) return; // Enable local APIC; set spurious interrupt vector. - lapicw(SVR, ENABLE | (IRQ_OFFSET+IRQ_SPURIOUS)); + lapicw(SVR, ENABLE | (T_IRQ0 + IRQ_SPURIOUS)); // The timer repeatedly counts down at bus frequency // from lapic[TICR] and then issues an interrupt. // If xv6 cared more about precise timekeeping, // TICR would be calibrated using an external time source. lapicw(TDCR, X1); - lapicw(TIMER, PERIODIC | (IRQ_OFFSET + IRQ_TIMER)); + lapicw(TIMER, PERIODIC | (T_IRQ0 + IRQ_TIMER)); lapicw(TICR, 10000000); // Disable logical interrupt lines. @@ -72,7 +72,7 @@ lapicinit(int c) lapicw(PCINT, MASKED); // Map error interrupt to IRQ_ERROR. - lapicw(ERROR, IRQ_OFFSET+IRQ_ERROR); + lapicw(ERROR, T_IRQ0 + IRQ_ERROR); // Clear error status register (requires back-to-back writes). lapicw(ESR, 0); -- cgit v1.2.3