diff options
| author | glass <glass@NetBSD.org> | 1994-06-02 06:14:56 +0000 |
|---|---|---|
| committer | glass <glass@NetBSD.org> | 1994-06-02 06:14:56 +0000 |
| commit | 5e54277664ad7e5e1b3217841be5a3425f002505 (patch) | |
| tree | e3db06e6c611cb6db6665e668dd85033d2d89a10 /sys/arch | |
| parent | 20ddd6eee432c37d093294469a54075c4995eab3 (diff) | |
fix a few integration bugs, add vmfault debugging, more ultrix stuff
Diffstat (limited to 'sys/arch')
| -rw-r--r-- | sys/arch/mips/include/cpu.h | 3 | ||||
| -rw-r--r-- | sys/arch/mips/mips/trap.c | 14 | ||||
| -rw-r--r-- | sys/arch/pmax/conf/files.pmax | 10 | ||||
| -rw-r--r-- | sys/arch/pmax/conf/files.pmax.oldconf | 10 | ||||
| -rw-r--r-- | sys/arch/pmax/dev/dc.c | 10 | ||||
| -rw-r--r-- | sys/arch/pmax/dev/scc.c | 12 | ||||
| -rw-r--r-- | sys/arch/pmax/include/cpu.h | 3 | ||||
| -rw-r--r-- | sys/arch/pmax/pmax/machdep.c | 8 | ||||
| -rw-r--r-- | sys/arch/pmax/pmax/pmax_trap.c | 14 | ||||
| -rw-r--r-- | sys/arch/pmax/pmax/trap.c | 14 |
10 files changed, 50 insertions, 48 deletions
diff --git a/sys/arch/mips/include/cpu.h b/sys/arch/mips/include/cpu.h index 5dd5c0f00ea..de5897763e1 100644 --- a/sys/arch/mips/include/cpu.h +++ b/sys/arch/mips/include/cpu.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 8.4 (Berkeley) 1/4/94 - * $Id: cpu.h,v 1.6 1994/05/27 09:00:32 glass Exp $ + * $Id: cpu.h,v 1.7 1994/06/02 06:15:03 glass Exp $ */ #ifndef _CPU_H_ @@ -54,7 +54,6 @@ #define cpu_exec(p) (p->p_md.md_ss_addr = 0) /* init single step */ #define cpu_wait(p) /* nothing */ -#define cpu_setstack(p, ap) (p)->p_md.md_regs[SP] = ap #define cpu_set_init_frame(p, fp) /* nothing */ /* diff --git a/sys/arch/mips/mips/trap.c b/sys/arch/mips/mips/trap.c index 89bb34821a0..751fab93ffe 100644 --- a/sys/arch/mips/mips/trap.c +++ b/sys/arch/mips/mips/trap.c @@ -38,7 +38,7 @@ * from: Utah Hdr: trap.c 1.32 91/04/06 * * from: @(#)trap.c 8.5 (Berkeley) 1/11/94 - * $Id: trap.c,v 1.4 1994/05/27 09:04:15 glass Exp $ + * $Id: trap.c,v 1.5 1994/06/02 06:15:08 glass Exp $ */ #include <sys/param.h> @@ -345,6 +345,10 @@ trap(statusReg, causeReg, vadr, pc, args) map = &vm->vm_map; va = trunc_page((vm_offset_t)vadr); rv = vm_fault(map, va, ftype, FALSE); +#ifdef VMFAULT_TRACE + printf("vm_fault(%x (pmap %x), %x (%x), %x, %d) -> %x at pc %x\n", + map, &vm->vm_pmap, va, vadr, ftype, FALSE, rv, pc); +#endif /* * If this was a stack access we keep track of the maximum * accessed stack size. Also, if vm_fault gets a protection @@ -399,8 +403,8 @@ trap(statusReg, causeReg, vadr, pc, args) struct sysent *systab; extern int nsysent; #ifdef COMPAT_ULTRIX - extern struct sysent ultrixsysent[]; - extern int ultrixnsysent; + extern struct sysent ultrix_sysent[]; + int nultrix_sysent; #endif cnt.v_syscall++; @@ -416,8 +420,8 @@ trap(statusReg, causeReg, vadr, pc, args) break; #ifdef COMPAT_ULTRIX case EMUL_ULTRIX: - systab = ultrixsysent; - numsys = ultrixnsysent; + systab = ultrix_sysent; + numsys = nultrix_sysent; break; #endif } diff --git a/sys/arch/pmax/conf/files.pmax b/sys/arch/pmax/conf/files.pmax index 5fc410712dd..5fc72734206 100644 --- a/sys/arch/pmax/conf/files.pmax +++ b/sys/arch/pmax/conf/files.pmax @@ -1,4 +1,4 @@ -# $Id: files.pmax,v 1.5 1994/05/27 08:57:52 glass Exp $ +# $Id: files.pmax,v 1.6 1994/06/02 06:14:56 glass Exp $ arch/pmax/pmax/autoconf.c standard arch/pmax/pmax/clock.c standard arch/pmax/pmax/conf.c standard @@ -10,7 +10,6 @@ arch/pmax/pmax/machdep.c standard config-dependent arch/pmax/pmax/mem.c standard arch/pmax/pmax/pmap.c standard arch/pmax/pmax/process_machdep.c standard -#arch/pmax/pmax/procfs_machdep.c optional procfs arch/pmax/pmax/sys_machdep.c standard arch/pmax/pmax/trap.c standard arch/pmax/pmax/vm_machdep.c standard @@ -29,9 +28,8 @@ arch/pmax/dev/scc.c optional scc device-driver arch/pmax/dev/sii.c optional sii device-driver arch/pmax/dev/tz.c optional tz device-driver arch/pmax/dev/xcfb.c optional xcfb device-driver -arch/pmax/ultrix/ultrix_compat.c optional compat_ultrix -arch/pmax/ultrix/ultrix_syscalls.c optional compat_ultrix -arch/pmax/ultrix/ultrix_sysent.c optional compat_ultrix +compat/ultrix/ultrix_misc.c optional compat_ultrix +compat/ultrix/ultrix_syscalls.c optional compat_ultrix +compat/ultrix/ultrix_sysent.c optional compat_ultrix netinet/in_cksum.c optional inet netns/ns_cksum.c optional ns -#dev/cd.c optional cd diff --git a/sys/arch/pmax/conf/files.pmax.oldconf b/sys/arch/pmax/conf/files.pmax.oldconf index bdf9ac56a43..a1970011804 100644 --- a/sys/arch/pmax/conf/files.pmax.oldconf +++ b/sys/arch/pmax/conf/files.pmax.oldconf @@ -1,4 +1,4 @@ -# $Id: files.pmax.oldconf,v 1.5 1994/05/27 08:57:52 glass Exp $ +# $Id: files.pmax.oldconf,v 1.6 1994/06/02 06:14:56 glass Exp $ arch/pmax/pmax/autoconf.c standard arch/pmax/pmax/clock.c standard arch/pmax/pmax/conf.c standard @@ -10,7 +10,6 @@ arch/pmax/pmax/machdep.c standard config-dependent arch/pmax/pmax/mem.c standard arch/pmax/pmax/pmap.c standard arch/pmax/pmax/process_machdep.c standard -#arch/pmax/pmax/procfs_machdep.c optional procfs arch/pmax/pmax/sys_machdep.c standard arch/pmax/pmax/trap.c standard arch/pmax/pmax/vm_machdep.c standard @@ -29,9 +28,8 @@ arch/pmax/dev/scc.c optional scc device-driver arch/pmax/dev/sii.c optional sii device-driver arch/pmax/dev/tz.c optional tz device-driver arch/pmax/dev/xcfb.c optional xcfb device-driver -arch/pmax/ultrix/ultrix_compat.c optional compat_ultrix -arch/pmax/ultrix/ultrix_syscalls.c optional compat_ultrix -arch/pmax/ultrix/ultrix_sysent.c optional compat_ultrix +compat/ultrix/ultrix_misc.c optional compat_ultrix +compat/ultrix/ultrix_syscalls.c optional compat_ultrix +compat/ultrix/ultrix_sysent.c optional compat_ultrix netinet/in_cksum.c optional inet netns/ns_cksum.c optional ns -#dev/cd.c optional cd diff --git a/sys/arch/pmax/dev/dc.c b/sys/arch/pmax/dev/dc.c index b55c76a76e4..2fb9513a37b 100644 --- a/sys/arch/pmax/dev/dc.c +++ b/sys/arch/pmax/dev/dc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)dc.c 8.2 (Berkeley) 11/30/93 - * $Id: dc.c,v 1.5 1994/05/30 06:12:07 glass Exp $ + * $Id: dc.c,v 1.6 1994/06/02 06:14:59 glass Exp $ */ /* @@ -193,14 +193,12 @@ dcprobe(cp) /* init pseudo DMA structures */ pdp = &dcpdma[cp->pmax_unit * 4]; - tp = dc_tty[cp->pmax_unit * 4]; - if (tp == NULL) - tp = dc_tty[cp->pmax_unit * 4] = ttymalloc(); for (cntr = 0; cntr < 4; cntr++) { pdp->p_addr = (void *)dcaddr; - pdp->p_arg = (int)tp; + tp = dc_tty[cp->pmax_unit * 4 + cntr] = ttymalloc(); + pdp->p_arg = (int) tp; pdp->p_fcn = dcxint; - pdp++, tp++; + pdp++; } dcsoftCAR[cp->pmax_unit] = cp->pmax_flags | 0xB; diff --git a/sys/arch/pmax/dev/scc.c b/sys/arch/pmax/dev/scc.c index c79b24e3aee..c97d1c01ea8 100644 --- a/sys/arch/pmax/dev/scc.c +++ b/sys/arch/pmax/dev/scc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)scc.c 8.2 (Berkeley) 11/30/93 - * $Id: scc.c,v 1.5 1994/05/30 06:13:58 glass Exp $ + * $Id: scc.c,v 1.6 1994/06/02 06:15:01 glass Exp $ */ /* @@ -195,15 +195,13 @@ sccprobe(cp) pdp = &sc->scc_pdma[0]; /* init pseudo DMA structures */ - tp = scc_tty[cp->pmax_unit * 2]; - if (tp == NULL) - tp = scc_tty[cp->pmax_unit * 2] = ttymalloc(); for (cntr = 0; cntr < 2; cntr++) { pdp->p_addr = (void *)cp->pmax_addr; + tp = scc_tty[cp->pmax_unit * 2 + cntr] = ttymalloc(); pdp->p_arg = (int)tp; pdp->p_fcn = (void (*)())0; tp->t_dev = (dev_t)((cp->pmax_unit << 1) | cntr); - pdp++, tp++; + pdp++; } sc->scc_softCAR = cp->pmax_flags | 0x2; @@ -649,8 +647,8 @@ sccintr(unit) if (tp->t_state & TS_FLUSH) tp->t_state &= ~TS_FLUSH; else { - ndflush(&tp->t_outq, dp->p_mem - (caddr_t) - tp->t_outq.c_cf); + ndflush(&tp->t_outq, dp->p_mem - + (caddr_t) tp->t_outq.c_cf); dp->p_end = dp->p_mem = tp->t_outq.c_cf; } if (tp->t_line) diff --git a/sys/arch/pmax/include/cpu.h b/sys/arch/pmax/include/cpu.h index 5dd5c0f00ea..de5897763e1 100644 --- a/sys/arch/pmax/include/cpu.h +++ b/sys/arch/pmax/include/cpu.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 8.4 (Berkeley) 1/4/94 - * $Id: cpu.h,v 1.6 1994/05/27 09:00:32 glass Exp $ + * $Id: cpu.h,v 1.7 1994/06/02 06:15:03 glass Exp $ */ #ifndef _CPU_H_ @@ -54,7 +54,6 @@ #define cpu_exec(p) (p->p_md.md_ss_addr = 0) /* init single step */ #define cpu_wait(p) /* nothing */ -#define cpu_setstack(p, ap) (p)->p_md.md_regs[SP] = ap #define cpu_set_init_frame(p, fp) /* nothing */ /* diff --git a/sys/arch/pmax/pmax/machdep.c b/sys/arch/pmax/pmax/machdep.c index 3ae1b1cd7e8..03cabc040b4 100644 --- a/sys/arch/pmax/pmax/machdep.c +++ b/sys/arch/pmax/pmax/machdep.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 8.3 (Berkeley) 1/12/94 - * $Id: machdep.c,v 1.7 1994/06/01 04:50:30 glass Exp $ + * $Id: machdep.c,v 1.8 1994/06/02 06:15:06 glass Exp $ */ /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ @@ -958,16 +958,16 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) * Set registers on exec. * Clear all registers except sp, pc. */ -setregs(p, entry, retval) +setregs(p, entry, stack, retval) register struct proc *p; u_long entry; + u_long stack; int retval[2]; { - int sp = p->p_md.md_regs[SP]; extern struct proc *machFPCurProcPtr; bzero((caddr_t)p->p_md.md_regs, (FSR + 1) * sizeof(int)); - p->p_md.md_regs[SP] = sp; + p->p_md.md_regs[SP] = stack; p->p_md.md_regs[PC] = entry & ~3; p->p_md.md_regs[PS] = PSL_USERSET; p->p_md.md_flags & ~MDP_FPUSED; diff --git a/sys/arch/pmax/pmax/pmax_trap.c b/sys/arch/pmax/pmax/pmax_trap.c index b377c80f36f..10d3dbe3551 100644 --- a/sys/arch/pmax/pmax/pmax_trap.c +++ b/sys/arch/pmax/pmax/pmax_trap.c @@ -38,7 +38,7 @@ * from: Utah Hdr: trap.c 1.32 91/04/06 * * from: @(#)trap.c 8.5 (Berkeley) 1/11/94 - * $Id: pmax_trap.c,v 1.4 1994/05/27 09:04:15 glass Exp $ + * $Id: pmax_trap.c,v 1.5 1994/06/02 06:15:08 glass Exp $ */ #include <sys/param.h> @@ -345,6 +345,10 @@ trap(statusReg, causeReg, vadr, pc, args) map = &vm->vm_map; va = trunc_page((vm_offset_t)vadr); rv = vm_fault(map, va, ftype, FALSE); +#ifdef VMFAULT_TRACE + printf("vm_fault(%x (pmap %x), %x (%x), %x, %d) -> %x at pc %x\n", + map, &vm->vm_pmap, va, vadr, ftype, FALSE, rv, pc); +#endif /* * If this was a stack access we keep track of the maximum * accessed stack size. Also, if vm_fault gets a protection @@ -399,8 +403,8 @@ trap(statusReg, causeReg, vadr, pc, args) struct sysent *systab; extern int nsysent; #ifdef COMPAT_ULTRIX - extern struct sysent ultrixsysent[]; - extern int ultrixnsysent; + extern struct sysent ultrix_sysent[]; + int nultrix_sysent; #endif cnt.v_syscall++; @@ -416,8 +420,8 @@ trap(statusReg, causeReg, vadr, pc, args) break; #ifdef COMPAT_ULTRIX case EMUL_ULTRIX: - systab = ultrixsysent; - numsys = ultrixnsysent; + systab = ultrix_sysent; + numsys = nultrix_sysent; break; #endif } diff --git a/sys/arch/pmax/pmax/trap.c b/sys/arch/pmax/pmax/trap.c index 89bb34821a0..751fab93ffe 100644 --- a/sys/arch/pmax/pmax/trap.c +++ b/sys/arch/pmax/pmax/trap.c @@ -38,7 +38,7 @@ * from: Utah Hdr: trap.c 1.32 91/04/06 * * from: @(#)trap.c 8.5 (Berkeley) 1/11/94 - * $Id: trap.c,v 1.4 1994/05/27 09:04:15 glass Exp $ + * $Id: trap.c,v 1.5 1994/06/02 06:15:08 glass Exp $ */ #include <sys/param.h> @@ -345,6 +345,10 @@ trap(statusReg, causeReg, vadr, pc, args) map = &vm->vm_map; va = trunc_page((vm_offset_t)vadr); rv = vm_fault(map, va, ftype, FALSE); +#ifdef VMFAULT_TRACE + printf("vm_fault(%x (pmap %x), %x (%x), %x, %d) -> %x at pc %x\n", + map, &vm->vm_pmap, va, vadr, ftype, FALSE, rv, pc); +#endif /* * If this was a stack access we keep track of the maximum * accessed stack size. Also, if vm_fault gets a protection @@ -399,8 +403,8 @@ trap(statusReg, causeReg, vadr, pc, args) struct sysent *systab; extern int nsysent; #ifdef COMPAT_ULTRIX - extern struct sysent ultrixsysent[]; - extern int ultrixnsysent; + extern struct sysent ultrix_sysent[]; + int nultrix_sysent; #endif cnt.v_syscall++; @@ -416,8 +420,8 @@ trap(statusReg, causeReg, vadr, pc, args) break; #ifdef COMPAT_ULTRIX case EMUL_ULTRIX: - systab = ultrixsysent; - numsys = ultrixnsysent; + systab = ultrix_sysent; + numsys = nultrix_sysent; break; #endif } |
