diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-02 10:20:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-02 10:20:13 +0000 |
commit | 096156f638e75dd2157f141d847f91a144943ab3 (patch) | |
tree | 32b2d87aed229a010346aa813d10cd96447b6e5f /sys/arch/mvme88k | |
parent | f0658c368d13b03bf83530ad32bd660282a09001 (diff) |
Fix some DAE processing logic - the kernel would incorrectly end up retrying
already processed, or unwanted, DAE in certain circumstances by mistake.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore_c_routines.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/trap.c | 23 |
2 files changed, 7 insertions, 22 deletions
diff --git a/sys/arch/mvme88k/mvme88k/locore_c_routines.c b/sys/arch/mvme88k/mvme88k/locore_c_routines.c index c666d855281..57f08e8981a 100644 --- a/sys/arch/mvme88k/mvme88k/locore_c_routines.c +++ b/sys/arch/mvme88k/mvme88k/locore_c_routines.c @@ -1,4 +1,4 @@ -/* $OpenBSD: locore_c_routines.c,v 1.35 2003/09/28 22:14:35 miod Exp $ */ +/* $OpenBSD: locore_c_routines.c,v 1.36 2003/10/02 10:20:12 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -157,13 +157,13 @@ data_access_emulation(unsigned *eframe) unsigned v, reg; dmtx = eframe[EF_DMT0]; - if (!ISSET(dmtx, DMT_VALID) && !ISSET(dmtx, DMT_SKIP)) + if (!ISSET(dmtx, DMT_VALID)) return; for (x = 0; x < 3; x++) { dmtx = eframe[EF_DMT0 + x * 3]; - if (!ISSET(dmtx, DMT_VALID) && !ISSET(dmtx, DMT_SKIP)) + if (!ISSET(dmtx, DMT_VALID) || ISSET(dmtx, DMT_SKIP)) continue; dmdx = eframe[EF_DMD0 + x * 3]; diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c index c8c00c2de12..6d30ad32016 100644 --- a/sys/arch/mvme88k/mvme88k/trap.c +++ b/sys/arch/mvme88k/mvme88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.52 2003/09/26 19:04:30 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.53 2003/10/02 10:20:12 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -347,7 +347,7 @@ m88100_trap(unsigned type, struct m88100_saved_state *frame) * dmt1 & dmt2. Mark dmt0 so that * data_access_emulation skips it. XXX smurph */ - frame->dmt0 = DMT_SKIP; + frame->dmt0 |= DMT_SKIP; data_access_emulation((unsigned *)frame); frame->dpfsr = 0; frame->dmt0 = 0; @@ -359,7 +359,6 @@ m88100_trap(unsigned type, struct m88100_saved_state *frame) * The fault was resolved. Call data_access_emulation * to drain the data unit pipe line and reset dmt0 * so that trap won't get called again. - * For inst faults, back up the pipe line. */ data_access_emulation((unsigned *)frame); frame->dpfsr = 0; @@ -373,8 +372,7 @@ m88100_trap(unsigned type, struct m88100_saved_state *frame) * We could resolve the fault. Call * data_access_emulation to drain the data * unit pipe line and reset dmt0 so that trap - * won't get called again. For inst faults, - * back up the pipe line. + * won't get called again. */ data_access_emulation((unsigned *)frame); frame->dpfsr = 0; @@ -404,7 +402,7 @@ m88100_trap(unsigned type, struct m88100_saved_state *frame) * transactions in dmt1 & dmt2. Mark dmt0 so that * data_access_emulation skips it. XXX smurph */ - frame->dmt0 = DMT_SKIP; + frame->dmt0 |= DMT_SKIP; data_access_emulation((unsigned *)frame); frame->dpfsr = 0; frame->dmt0 = 0; @@ -1445,9 +1443,6 @@ m88110_syscall(register_t code, struct m88100_saved_state *tf) switch (error) { case 0: -#ifdef DEBUG - printf("syscall success!\n"); -#endif /* * If fork succeeded and we are the child, our stack * has moved and the pointer tf is no longer valid, @@ -1464,9 +1459,6 @@ m88110_syscall(register_t code, struct m88100_saved_state *tf) tf->exip &= ~3; break; case ERESTART: -#ifdef DEBUG - printf("syscall restart!\n"); -#endif /* * Reexecute the trap. * exip is already at the trap instruction, so @@ -1475,18 +1467,11 @@ m88110_syscall(register_t code, struct m88100_saved_state *tf) tf->epsr &= ~PSR_C; break; case EJUSTRETURN: -#ifdef DEBUG - printf("syscall just return!\n"); -#endif tf->epsr &= ~PSR_C; tf->exip += 4; tf->exip &= ~3; break; default: -#ifdef DEBUG - printf("syscall error %d!\n", error); -#endif - /* error != ERESTART && error != EJUSTRETURN*/ if (p->p_emul->e_errno) error = p->p_emul->e_errno[error]; tf->r[2] = error; |