diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-28 22:13:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-28 22:13:46 +0000 |
commit | 71b6b72592a47df0b36c753bb3aaa6ecf29d2cd6 (patch) | |
tree | 8552d5b8a1adb8020f908236768d4abd9bb5d027 /sys/arch | |
parent | 616f27119d4f8697ab9751845a304fbd9f840c2d (diff) |
Clean the MVME188 external interrupts routine, and do not let it loop forever
on clock interrupts, because interrupts were re-enabled too early.
Also, remove the old hack restricting the system to only use 32MB of memory.
This makes MVME188 boot multi-user again (only tested on 2P256 so far).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index d9ac14718d4..b2ecb0047c3 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.113 2003/09/20 13:57:37 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.114 2003/09/28 22:13:45 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -374,10 +374,6 @@ size_memory() break; *look = save; } - if ((look > (unsigned int *)0x01FFF000) && (brdtyp == BRD_188)) { - /* temp hack to fake 32Meg on MVME188 */ - look = (unsigned int *)0x01FFF000; - } return (trunc_page((unsigned)look)); } @@ -1592,10 +1588,10 @@ unsigned obio_vec[32] = { void m188_ext_int(u_int v, struct m88100_saved_state *eframe) { - register int cpu = cpu_number(); - register unsigned int cur_mask; - register unsigned int level, old_spl; - register struct intrhand *intr; + int cpu = cpu_number(); + unsigned int cur_mask; + unsigned int level, old_spl; + struct intrhand *intr; int ret, intbit; unsigned vec; @@ -1609,7 +1605,7 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) * DUART interrupts. */ flush_pipeline(); - return; + goto out; } uvmexp.intrs++; @@ -1640,13 +1636,23 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) for(;;) ; } +#ifdef DEBUG if (level > 7 || (char)level < 0) { panic("int level (%x) is not between 0 and 7", level); } +#endif setipl(level); - enable_interrupt(); + /* + * Do not enable interrupts yet if we know, from cur_mask, + * that we have not cleared enough conditions yet. + * For now, only the timer interrupt requires its condition + * to be cleared before interrupts are enabled. + */ + if ((cur_mask & DTI_BIT) == 0) { + enable_interrupt(); + } /* generate IACK and get the vector */ @@ -1659,11 +1665,6 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) /* find the first bit set in the current mask */ intbit = ff1(cur_mask); if (OBIO_INTERRUPT_MASK & (1 << intbit)) { - if (guarded_access(ivec[level], 4, (u_char *)&vec) == - EFAULT) { - panic("unable to get vector for this vmebus " - "interrupt (level %x)", level); - } vec = obio_vec[intbit]; if (vec == 0) { panic("unknown onboard interrupt: mask = 0x%b", @@ -1683,7 +1684,8 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) } vec &= VME_VECTOR_MASK; if (vec & VME_BERR_MASK) { - panic("vme vec timeout"); + printf("vme vec timeout"); + break; } if (vec == 0) { panic("unknown vme interrupt: mask = 0x%b", @@ -1694,11 +1696,6 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) "mask = 0x%b", level, intbit, 1 << intbit, IST_STRING); } - if (vec > 0xFF) { - panic("interrupt vector 0x%x greater than 255!" - "level = %d iack = 0x%x", - vec, level, ivec[level]); - } if ((intr = intr_handlers[vec]) == NULL) { /* increment intr counter */ @@ -1738,6 +1735,7 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) * returning to assembler */ disable_interrupt(); +out: if (eframe->dmt0 & DMT_VALID) m88100_trap(T_DATAFLT, eframe); @@ -1746,7 +1744,6 @@ m188_ext_int(u_int v, struct m88100_saved_state *eframe) * was taken. */ setipl(eframe->mask); - flush_pipeline(); } #endif /* MVME188 */ |