diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-19 17:16:19 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-09-19 17:16:19 +0000 |
commit | 05289977dd22788ad17da20e49aee8f5eea5c11b (patch) | |
tree | 39c67d429c2c8c3fa6470d14fee261cb7e906832 /sys | |
parent | 191baf205ef0b68e4782f5edc7c97388f5cf22a6 (diff) |
Kill FPCOPROC (and some forgotten {SWAP,DEV}PAGER)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amiga/amiga/locore.s | 16 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/machdep.c | 300 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/trap.c | 4 | ||||
-rw-r--r-- | sys/arch/amiga/conf/CRASH | 6 | ||||
-rw-r--r-- | sys/arch/amiga/conf/DRACO | 6 | ||||
-rw-r--r-- | sys/arch/amiga/conf/FILIPPA | 6 | ||||
-rw-r--r-- | sys/arch/amiga/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/arch/amiga/conf/RAMDISK | 3 | ||||
-rw-r--r-- | sys/arch/amiga/include/cpu.h | 4 |
9 files changed, 9 insertions, 339 deletions
diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s index 6c4b70078ea..b05acb83253 100644 --- a/sys/arch/amiga/amiga/locore.s +++ b/sys/arch/amiga/amiga/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.23 1997/09/18 13:39:35 niklas Exp $ */ +/* $OpenBSD: locore.s,v 1.24 1997/09/19 17:16:12 niklas Exp $ */ /* $NetBSD: locore.s,v 1.89 1997/07/17 16:22:54 is Exp $ */ /* @@ -318,7 +318,6 @@ _fpunsupp: */ .globl _fpfault _fpfault: -#ifdef FPCOPROC clrl sp@- | stack adjust count moveml #0xFFFF,sp@- | save user registers movl usp,a0 | and save @@ -344,9 +343,6 @@ Lfptnull: frestore a0@ | restore state movl #T_FPERR,sp@- | push type arg jra _ASM_LABEL(faultstkadj) | call trap and deal with stack cleanup -#else - jra _badtrap | treat as an unexpected trap -#endif /* * Other exceptions only cause four and six word stack frame and require @@ -1007,13 +1003,11 @@ Lunshadow: movl a2,a1@(PCB_USP) | and save it movl a1,_curpcb | proc0 is running clrw a1@(PCB_FLAGS) | clear flags -#ifdef FPCOPROC clrl a1@(PCB_FPCTX) | ensure null FP context |WRONG! movl a1,sp@- | pea a1@(PCB_FPCTX) | jbsr _m68881_restore | restore it (does not kill a1) | addql #4,sp -#endif /* flush TLB and turn on caches */ jbsr _TBIA | invalidate TLB @@ -1311,7 +1305,6 @@ Lsw2: movl usp,a2 | grab USP (a2 has been saved) movl a2,a1@(PCB_USP) | and save it movl _CMAP2,a1@(PCB_CMAP2) | save temporary map PTE -#ifdef FPCOPROC #ifdef FPU_EMULATE tstl _fputype | do we have any FPU? jeq Lswnofpsave | no, dont save @@ -1341,7 +1334,6 @@ Lsavfp60: fmovem fpi,a2@(320) #endif Lswnofpsave: -#endif #ifdef DIAGNOSTIC tstl a0@(P_WCHAN) @@ -1404,7 +1396,6 @@ Lres5: moveml a1@(PCB_REGS),#0xFCFC | and registers movl a1@(PCB_USP),a0 movl a0,usp | and USP -#ifdef FPCOPROC #ifdef FPU_EMULATE tstl _fputype | do we _have_ any fpu? jne Lresnonofpatall @@ -1444,7 +1435,6 @@ Lresfp60rest2: moveq #1,d0 | return 1 (for alternate returns) rts #endif -#endif /* * savectx(pcb) @@ -1457,7 +1447,6 @@ ENTRY(savectx) movl a0,a1@(PCB_USP) | and save it moveml #0xFCFC,a1@(PCB_REGS) | save non-scratch registers movl _CMAP2,a1@(PCB_CMAP2) | save temporary map PTE -#ifdef FPCOPROC #ifdef FPU_EMULATE tstl _fputype jeq Lsavedone @@ -1487,7 +1476,6 @@ Lsavctx60: fmovem fpsr,a0@(316) fmovem fpi,a0@(320) #endif -#endif Lsavedone: moveq #0,d0 | return 0 rts @@ -1919,7 +1907,6 @@ ENTRY(ploadw) Lploadw040: | should 68040 do a ptest? rts -#ifdef FPCOPROC /* * Save and restore 68881 state. * Pretty awful looking since our assembler does not @@ -1981,7 +1968,6 @@ Lm68060fprdone: frestore a0@ | restore state rts #endif -#endif /* * Handle the nitty-gritty of rebooting the machine. diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index ae0236aa554..98997aa974b 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.25 1997/09/18 13:39:36 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.26 1997/09/19 17:16:14 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */ /* @@ -582,7 +582,6 @@ setregs(p, pack, stack, retval) frame->f_regs[SP] = stack; frame->f_regs[A2] = (int)PS_STRINGS; -#ifdef FPCOPROC /* restore a null state frame */ p->p_addr->u_pcb.pcb_fpregs.fpf_null = 0; #ifdef FPU_EMULATE @@ -591,7 +590,6 @@ setregs(p, pack, stack, retval) else #endif m68881_restore(&p->p_addr->u_pcb.pcb_fpregs); -#endif #ifdef COMPAT_SUNOS /* * SunOS' ld.so does self-modifying code without knowing @@ -757,302 +755,6 @@ int sigpid = 0; #define SDB_FPSTATE 0x04 #endif -/* - * Send an interrupt to process. - */ -void -sendsig(catcher, sig, mask, code, type, val) - sig_t catcher; - int sig, mask; - u_long code; - int type; - union sigval val; -{ - register struct proc *p = curproc; - register struct sigframe *fp, *kfp; - register struct frame *frame; - register struct sigacts *psp = p->p_sigacts; - register short ft; - int oonstack, fsize; - extern char sigcode[], esigcode[]; - - frame = (struct frame *)p->p_md.md_regs; - ft = frame->f_format; - oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; - - /* - * Allocate and validate space for the signal handler - * context. Note that if the stack is in P0 space, the - * call to grow() is a nop, and the useracc() check - * will fail if the process has not already allocated - * the space with a `brk'. - */ - fsize = sizeof(struct sigframe); - if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack && - (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + - psp->ps_sigstk.ss_size - fsize); - psp->ps_sigstk.ss_flags |= SS_ONSTACK; - } else - fp = (struct sigframe *)(frame->f_regs[SP] - fsize); - if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) - (void)grow(p, (unsigned)fp); -#ifdef DEBUG - if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) - printf("sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n", - p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft); -#endif - if (useracc((caddr_t)fp, fsize, B_WRITE) == 0) { -#ifdef DEBUG - if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) - printf("sendsig(%d): useracc failed on sig %d\n", - p->p_pid, sig); -#endif - /* - * Process has trashed its stack; give it an illegal - * instruction to halt it in its tracks. - */ - SIGACTION(p, SIGILL) = SIG_DFL; - sig = sigmask(SIGILL); - p->p_sigignore &= ~sig; - p->p_sigcatch &= ~sig; - p->p_sigmask &= ~sig; - psignal(p, SIGILL); - return; - } - kfp = (struct sigframe *)malloc((u_long)fsize, M_TEMP, M_WAITOK); - /* - * Build the argument list for the signal handler. - */ - kfp->sf_signum = sig; - kfp->sf_sip = NULL; - kfp->sf_scp = &fp->sf_sc; - kfp->sf_handler = catcher; - - /* - * Save necessary hardware state. Currently this includes: - * - general registers - * - original exception frame (if not a "normal" frame) - * - FP coprocessor state - */ - kfp->sf_state.ss_flags = SS_USERREGS; - bcopy((caddr_t)frame->f_regs, - (caddr_t)kfp->sf_state.ss_frame.f_regs, sizeof frame->f_regs); - if (ft >= FMT7) { -#ifdef DEBUG - if (ft > 15 || exframesize[ft] < 0) - panic("sendsig: bogus frame type"); -#endif - kfp->sf_state.ss_flags |= SS_RTEFRAME; - kfp->sf_state.ss_frame.f_format = frame->f_format; - kfp->sf_state.ss_frame.f_vector = frame->f_vector; - bcopy((caddr_t)&frame->F_u, - (caddr_t)&kfp->sf_state.ss_frame.F_u, exframesize[ft]); - /* - * Leave an indicator that we need to clean up the kernel - * stack. We do this by setting the "pad word" above the - * hardware stack frame to the amount the stack must be - * adjusted by. - * - * N.B. we increment rather than just set f_stackadj in - * case we are called from syscall when processing a - * sigreturn. In that case, f_stackadj may be non-zero. - */ - frame->f_stackadj += exframesize[ft]; - frame->f_format = frame->f_vector = 0; -#ifdef DEBUG - if (sigdebug & SDB_FOLLOW) - printf("sendsig(%d): copy out %d of frame %d\n", - p->p_pid, exframesize[ft], ft); -#endif - } - -#ifdef FPCOPROC - kfp->sf_state.ss_flags |= SS_FPSTATE; - if (fputype) - m68881_save(&kfp->sf_state.ss_fpstate); -#ifdef DEBUG - if ((sigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate) - printf("sendsig(%d): copy out FP state (%x) to %p\n", - p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate, - &kfp->sf_state.ss_fpstate); -#endif /* DEBUG */ -#endif /* FPCOPROC */ - /* - * Build the signal context to be used by sigreturn. - */ - kfp->sf_sc.sc_onstack = oonstack; - kfp->sf_sc.sc_mask = mask; - kfp->sf_sc.sc_sp = frame->f_regs[SP]; - kfp->sf_sc.sc_fp = frame->f_regs[A6]; - kfp->sf_sc.sc_ap = (int)&fp->sf_state; - kfp->sf_sc.sc_pc = frame->f_pc; - kfp->sf_sc.sc_ps = frame->f_sr; - - if (psp->ps_siginfo & sigmask(sig)) { - kfp->sf_sip = &fp->sf_si; - initsiginfo(&kfp->sf_si, sig, code, type, val); - } - - /* XXX do not copy out siginfo if not needed */ - (void)copyout((caddr_t)kfp, (caddr_t)fp, fsize); - frame->f_regs[SP] = (int)fp; -#ifdef DEBUG - if (sigdebug & SDB_FOLLOW) - printf("sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n", - p->p_pid, sig, kfp->sf_scp, fp, kfp->sf_sc.sc_sp, - kfp->sf_sc.sc_ap); -#endif /* DEBUG */ - /* - * Signal trampoline code is at base of user stack. - */ - frame->f_pc = (int)PS_STRINGS - (esigcode - sigcode); -#ifdef DEBUG - if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) - printf("sendsig(%d): sig %d returns\n", p->p_pid, sig); -#endif - free((caddr_t)kfp, M_TEMP); -} - -/* - * System call to cleanup state after a signal - * has been taken. Reset signal mask and - * stack state from context left by sendsig (above). - * Return to previous pc and psl as specified by - * context left by sendsig. Check carefully to - * make sure that the user has not modified the - * psl to gain improper priviledges or to cause - * a machine fault. - */ -/* ARGSUSED */ -int -sys_sigreturn(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct sys_sigreturn_args /* { - syscallarg(struct sigcontext *) sigcntxp; - } */ *uap = v; - struct sigcontext *scp, context; - struct frame *frame; - int rf, flags; - struct sigstate tstate; - extern short exframesize[]; - - scp = SCARG(uap, sigcntxp); -#ifdef DEBUG - if (sigdebug & SDB_FOLLOW) - printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp); -#endif - if ((int)scp & 1) - return(EINVAL); - /* - * Test and fetch the context structure. - * We grab it all at once for speed. - */ - if (useracc((caddr_t)scp, sizeof(*scp), B_WRITE) == 0 || - copyin(scp, &context, sizeof(context))) - return(EINVAL); - scp = &context; - if ((scp->sc_ps & (PSL_MBZ|PSL_IPL|PSL_S)) != 0) - return(EINVAL); - /* - * Restore the user supplied information - */ - if (scp->sc_onstack & 1) - p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK; - else - p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; - p->p_sigmask = scp->sc_mask &~ sigcantmask; - frame = (struct frame *) p->p_md.md_regs; - frame->f_regs[SP] = scp->sc_sp; - frame->f_regs[A6] = scp->sc_fp; - frame->f_pc = scp->sc_pc; - frame->f_sr = scp->sc_ps; - /* - * Grab pointer to hardware state information. - * If zero, the user is probably doing a longjmp. - */ - if ((rf = scp->sc_ap) == 0) - return (EJUSTRETURN); - /* - * See if there is anything to do before we go to the - * expense of copying in close to 1/2K of data - */ - flags = fuword((caddr_t)rf); -#ifdef DEBUG - if (sigdebug & SDB_FOLLOW) - printf("sigreturn(%d): sc_ap %x flags %x\n", - p->p_pid, rf, flags); -#endif - /* - * fuword failed (bogus sc_ap value). - */ - if (flags == -1) - return (EINVAL); - if (flags == 0 || copyin((caddr_t)rf, (caddr_t)&tstate, sizeof tstate)) - return (EJUSTRETURN); -#ifdef DEBUG - if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) - printf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n", - p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp), - (flags&SS_RTEFRAME) ? tstate.ss_frame.f_format : -1); -#endif - /* - * Restore most of the users registers except for A6 and SP - * which were handled above. - */ - if (flags & SS_USERREGS) - bcopy((caddr_t)tstate.ss_frame.f_regs, - (caddr_t)frame->f_regs, sizeof(frame->f_regs)-2*NBPW); - /* - * Restore long stack frames. Note that we do not copy - * back the saved SR or PC, they were picked up above from - * the sigcontext structure. - */ - if (flags & SS_RTEFRAME) { - register int sz; - - /* grab frame type and validate */ - sz = tstate.ss_frame.f_format; - if (sz > 15 || (sz = exframesize[sz]) < 0) - return (EINVAL); - frame->f_stackadj -= sz; - frame->f_format = tstate.ss_frame.f_format; - frame->f_vector = tstate.ss_frame.f_vector; - bcopy((caddr_t)&tstate.ss_frame.F_u, (caddr_t)&frame->F_u, sz); -#ifdef DEBUG - if (sigdebug & SDB_FOLLOW) - printf("sigreturn(%d): copy in %d of frame type %d\n", - p->p_pid, sz, tstate.ss_frame.f_format); -#endif - } -#ifdef FPCOPROC - /* - * Finally we restore the original FP context - */ -#ifdef FPU_EMULATE - if ((flags & SS_FPSTATE) && fputype) -#else - if (fputype) -#endif - m68881_restore(&tstate.ss_fpstate); -#ifdef DEBUG - if ((sigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate) - printf("sigreturn(%d): copied in FP state (%x) at %p\n", - p->p_pid, *(u_int *)&tstate.ss_fpstate, - &tstate.ss_fpstate); -#endif -#endif -#ifdef DEBUG - if ((sigdebug & SDB_FOLLOW) || - ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)) - printf("sigreturn(%d): returns\n", p->p_pid); -#endif - return (EJUSTRETURN); -} - static int waittime = -1; void diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c index e1334bf0208..f6b43565e5d 100644 --- a/sys/arch/amiga/amiga/trap.c +++ b/sys/arch/amiga/amiga/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.14 1997/09/18 13:39:37 niklas Exp $ */ +/* $OpenBSD: trap.c,v 1.15 1997/09/19 17:16:14 niklas Exp $ */ /* $NetBSD: trap.c,v 1.56 1997/07/16 00:01:47 is Exp $ */ /* @@ -642,7 +642,6 @@ trap(type, code, v, frame) v = frame.f_pc; break; -#ifdef FPCOPROC /* * User coprocessor violation */ @@ -678,7 +677,6 @@ trap(type, code, v, frame) */ case T_COPERR: /*FALLTHROUGH*/ -#endif /* * Kernel format error diff --git a/sys/arch/amiga/conf/CRASH b/sys/arch/amiga/conf/CRASH index 2c11946f683..2e339f56f3e 100644 --- a/sys/arch/amiga/conf/CRASH +++ b/sys/arch/amiga/conf/CRASH @@ -1,4 +1,4 @@ -# $OpenBSD: CRASH,v 1.8 1997/03/25 16:53:57 niklas Exp $ +# $OpenBSD: CRASH,v 1.9 1997/09/19 17:16:15 niklas Exp $ # # The first OpenBSD/Amiga "user" Neil Brewitt's GG2 + NE2000 equipped A3000 @@ -18,10 +18,6 @@ options TIMEZONE=300, DST=1 #option FPSP # MC68040 floating point support option "M68030" # support for 030 #option "M68020" # support for 020/851 -option FPCOPROC # Support for MC6888[12] (Required) - -option SWAPPAGER # Pager for processes (Required) -option DEVPAGER # Pager for devices (Required) # # Networking options diff --git a/sys/arch/amiga/conf/DRACO b/sys/arch/amiga/conf/DRACO index 73e3b99b287..51211fedf3d 100644 --- a/sys/arch/amiga/conf/DRACO +++ b/sys/arch/amiga/conf/DRACO @@ -1,4 +1,4 @@ -# $OpenBSD: DRACO,v 1.10 1997/09/18 13:39:38 niklas Exp $ +# $OpenBSD: DRACO,v 1.11 1997/09/19 17:16:16 niklas Exp $ # $NetBSD: DRACO,v 1.7 1996/12/20 19:18:16 veego Exp $ # @@ -22,10 +22,6 @@ option DRACO option "M68060" # support for 060 option "M060SP" # MC68060 software support (Required for 060) -option FPCOPROC # Support for MC6888[12] (Required) - -option SWAPPAGER # Pager for processes (Required) -option DEVPAGER # Pager for devices (Required) # # Networking options diff --git a/sys/arch/amiga/conf/FILIPPA b/sys/arch/amiga/conf/FILIPPA index 488ade43c7e..a04fb43db12 100644 --- a/sys/arch/amiga/conf/FILIPPA +++ b/sys/arch/amiga/conf/FILIPPA @@ -1,4 +1,4 @@ -# $OpenBSD: FILIPPA,v 1.19 1997/06/23 19:05:34 kstailey Exp $ +# $OpenBSD: FILIPPA,v 1.20 1997/09/19 17:16:16 niklas Exp $ # # Niklas' AMIGA with ISA support @@ -16,10 +16,6 @@ option "M68040" # support for 040 option FPSP # MC68040 floating point support #option "M68030" # support for 030 #option "M68020" # support for 020/851 -option FPCOPROC # Support for MC6888[12] (Required) - -option SWAPPAGER -option DEVPAGER # # Networking option diff --git a/sys/arch/amiga/conf/GENERIC b/sys/arch/amiga/conf/GENERIC index 323ee03d096..7abe3670427 100644 --- a/sys/arch/amiga/conf/GENERIC +++ b/sys/arch/amiga/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.21 1997/09/18 13:39:39 niklas Exp $ +# $OpenBSD: GENERIC,v 1.22 1997/09/19 17:16:17 niklas Exp $ # $NetBSD: GENERIC,v 1.85 1997/08/27 19:32:49 is Exp $ # @@ -32,7 +32,6 @@ option M68040 # support for 040 option FPSP # MC68040 floating point support option M68030 # support for 030 option M68020 # support for 020/851 -option FPCOPROC # Support for MC6888[12] (Required) option FPU_EMULATE # FPU emulation # diff --git a/sys/arch/amiga/conf/RAMDISK b/sys/arch/amiga/conf/RAMDISK index 5576e390593..be89c74acfe 100644 --- a/sys/arch/amiga/conf/RAMDISK +++ b/sys/arch/amiga/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.3 1997/09/18 13:39:40 niklas Exp $ +# $OpenBSD: RAMDISK,v 1.4 1997/09/19 17:16:17 niklas Exp $ # # A ramdisk kernel @@ -23,7 +23,6 @@ option "M68040" # support for 040 option FPSP # MC68040 floating point support option "M68030" # support for 030 option "M68020" # support for 020/851 -option FPCOPROC # Support for MC6888[12] (Required) option FPU_EMULATE # FPU emulation # diff --git a/sys/arch/amiga/include/cpu.h b/sys/arch/amiga/include/cpu.h index 9b1733a4b65..25b9113c9eb 100644 --- a/sys/arch/amiga/include/cpu.h +++ b/sys/arch/amiga/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.10 1997/09/18 13:40:01 niklas Exp $ */ +/* $OpenBSD: cpu.h,v 1.11 1997/09/19 17:16:18 niklas Exp $ */ /* $NetBSD: cpu.h,v 1.36 1996/09/11 00:11:42 thorpej Exp $ */ /* @@ -190,10 +190,8 @@ void doboot __P((void)) __attribute__((__noreturn__)); u_long getdfc __P((void)); u_long getsfc __P((void)); void loadustp __P((int)); -#ifdef FPCOPROC void m68881_save __P((struct fpframe *)); void m68881_restore __P((struct fpframe *)); -#endif void physcopyseg __P((vm_offset_t, vm_offset_t)); u_int probeva __P((u_int, u_int)); void proc_trampoline __P((void)); |