diff options
author | Russ Cox <[email protected]> | 2009-07-11 19:24:56 -0700 |
---|---|---|
committer | Russ Cox <[email protected]> | 2009-07-11 19:24:56 -0700 |
commit | 2de1c550cab8a5812dc9965313fce00816a003eb (patch) | |
tree | 6ed2412d4f47546a1ee9fa2fe3be4b09cf9ac5eb /lapic.c | |
parent | 887f19686cf377db55953dac651ca8147c268092 (diff) | |
download | xv6-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 'lapic.c')
-rw-r--r-- | lapic.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |