Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch - merge and move pasted m68k MD setreg() functions ...
details: https://anonhg.NetBSD.org/src/rev/ae664aa2dde0
branches: trunk
changeset: 765032:ae664aa2dde0
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon May 16 13:22:51 2011 +0000
description:
- merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>
Briefly tested and no obvious breakage on atari, sun3, and x68k.
diffstat:
sys/arch/amiga/amiga/machdep.c | 42 +----------------
sys/arch/amiga/include/cpu.h | 8 +--
sys/arch/atari/atari/machdep.c | 38 +--------------
sys/arch/atari/include/cpu.h | 6 +--
sys/arch/cesfic/cesfic/machdep.c | 40 +---------------
sys/arch/cesfic/include/cpu.h | 6 +--
sys/arch/hp300/hp300/machdep.c | 38 +--------------
sys/arch/hp300/include/cpu.h | 6 +--
sys/arch/luna68k/conf/files.luna68k | 6 ++-
sys/arch/luna68k/include/cpu.h | 5 +-
sys/arch/luna68k/luna68k/machdep.c | 39 +---------------
sys/arch/m68k/include/m68k.h | 5 +-
sys/arch/m68k/m68k/m68k_machdep.c | 91 ++++++++++++++++++++++++++++++++++++-
sys/arch/mac68k/include/cpu.h | 6 +--
sys/arch/mac68k/mac68k/machdep.c | 39 +---------------
sys/arch/mvme68k/mvme68k/machdep.c | 39 +---------------
sys/arch/news68k/include/cpu.h | 6 +--
sys/arch/news68k/news68k/machdep.c | 38 +--------------
sys/arch/next68k/include/cpu.h | 7 +--
sys/arch/next68k/next68k/machdep.c | 38 +--------------
sys/arch/sun2/sun2/machdep.c | 38 +--------------
sys/arch/sun3/sun3/machdep.c | 40 +---------------
sys/arch/sun3/sun3/machdep.h | 5 +-
sys/arch/sun3/sun3x/machdep.c | 40 +---------------
sys/arch/x68k/include/cpu.h | 5 +-
sys/arch/x68k/x68k/machdep.c | 38 +--------------
26 files changed, 134 insertions(+), 535 deletions(-)
diffs (truncated from 1160 to 300 lines):
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/amiga/amiga/machdep.c Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.232 2011/04/17 00:37:49 mlelstv Exp $ */
+/* $NetBSD: machdep.c,v 1.233 2011/05/16 13:22:51 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -48,7 +48,7 @@
#include "opt_m68k_arch.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.232 2011/04/17 00:37:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.233 2011/05/16 13:22:51 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -276,44 +276,6 @@
}
/*
- * Set registers on exec.
- */
-void
-setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
-{
- struct frame *frame = (struct frame *)l->l_md.md_regs;
- struct pcb *pcb = lwp_getpcb(l);
-
- frame->f_sr = PSL_USERSET;
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[D0] = 0;
- frame->f_regs[D1] = 0;
- frame->f_regs[D2] = 0;
- frame->f_regs[D3] = 0;
- frame->f_regs[D4] = 0;
- frame->f_regs[D5] = 0;
- frame->f_regs[D6] = 0;
- frame->f_regs[D7] = 0;
- frame->f_regs[A0] = 0;
- frame->f_regs[A1] = 0;
- frame->f_regs[A2] = l->l_proc->p_psstrp;
- frame->f_regs[A3] = 0;
- frame->f_regs[A4] = 0;
- frame->f_regs[A5] = 0;
- frame->f_regs[A6] = 0;
- frame->f_regs[SP] = stack;
-
- /* restore a null state frame */
- pcb->pcb_fpregs.fpf_null = 0;
-#ifdef FPU_EMULATE
- if (!fputype)
- memset(&pcb->pcb_fpregs, 0, sizeof(struct fpframe));
- else
-#endif
- m68881_restore(&pcb->pcb_fpregs);
-}
-
-/*
* Info for CTL_HW
*/
char cpu_model[120];
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/amiga/include/cpu.h Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.78 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.79 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -152,15 +152,9 @@
/*
* Prototypes from locore.s
*/
-struct fpframe;
-
void clearseg(vm_offset_t);
void doboot(void) __attribute__((__noreturn__));
void loadustp(int);
-#ifdef FPCOPROC
-void m68881_save(struct fpframe *);
-void m68881_restore(struct fpframe *);
-#endif
void physcopyseg(vm_offset_t, vm_offset_t);
u_int probeva(u_int, u_int);
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/atari/atari/machdep.c
--- a/sys/arch/atari/atari/machdep.c Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/atari/atari/machdep.c Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.170 2011/03/04 22:25:25 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.171 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.170 2011/03/04 22:25:25 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 2011/05/16 13:22:52 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -232,40 +232,6 @@
}
/*
- * Set registers on exec.
- */
-void
-setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
-{
- struct frame *frame = (struct frame *)l->l_md.md_regs;
- struct pcb *pcb = lwp_getpcb(l);
-
- frame->f_sr = PSL_USERSET;
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[D0] = 0;
- frame->f_regs[D1] = 0;
- frame->f_regs[D2] = 0;
- frame->f_regs[D3] = 0;
- frame->f_regs[D4] = 0;
- frame->f_regs[D5] = 0;
- frame->f_regs[D6] = 0;
- frame->f_regs[D7] = 0;
- frame->f_regs[A0] = 0;
- frame->f_regs[A1] = 0;
- frame->f_regs[A2] = l->l_proc->p_psstrp;
- frame->f_regs[A3] = 0;
- frame->f_regs[A4] = 0;
- frame->f_regs[A5] = 0;
- frame->f_regs[A6] = 0;
- frame->f_regs[SP] = stack;
-
- /* restore a null state frame */
- pcb->pcb_fpregs.fpf_null = 0;
- if (fputype)
- m68881_restore(&pcb->pcb_fpregs);
-}
-
-/*
* Info for CTL_HW
*/
char cpu_model[120];
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/atari/include/cpu.h
--- a/sys/arch/atari/include/cpu.h Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/atari/include/cpu.h Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.66 2011/02/08 20:20:10 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.67 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -165,13 +165,9 @@
/*
* Prototypes from locore.s
*/
-struct fpframe;
-
void clearseg(paddr_t);
void doboot(void);
void loadustp(int);
-void m68881_save(struct fpframe *);
-void m68881_restore(struct fpframe *);
void physcopyseg(paddr_t, paddr_t);
u_int probeva(u_int, u_int);
int suline(void *, void *);
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/cesfic/cesfic/machdep.c
--- a/sys/arch/cesfic/cesfic/machdep.c Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/cesfic/cesfic/machdep.c Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.58 2011/03/04 22:25:25 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.59 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2011/03/04 22:25:25 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.59 2011/05/16 13:22:52 tsutsui Exp $");
#include "opt_bufcache.h"
#include "opt_ddb.h"
@@ -279,42 +279,6 @@
}
/*
- * Set registers on exec.
- * XXX Should clear registers except sp, pc,
- * but would break init; should be fixed soon.
- */
-void
-setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
-{
- struct frame *frame = (struct frame *)l->l_md.md_regs;
- struct pcb *pcb = lwp_getpcb(l);
-
- frame->f_sr = PSL_USERSET;
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[D0] = 0;
- frame->f_regs[D1] = 0;
- frame->f_regs[D2] = 0;
- frame->f_regs[D3] = 0;
- frame->f_regs[D4] = 0;
- frame->f_regs[D5] = 0;
- frame->f_regs[D6] = 0;
- frame->f_regs[D7] = 0;
- frame->f_regs[A0] = 0;
- frame->f_regs[A1] = 0;
- frame->f_regs[A2] = l->l_proc->p_psstrp;
- frame->f_regs[A3] = 0;
- frame->f_regs[A4] = 0;
- frame->f_regs[A5] = 0;
- frame->f_regs[A6] = 0;
- frame->f_regs[SP] = stack;
-
- /* restore a null state frame */
- pcb->pcb_fpregs.fpf_null = 0;
- if (fputype)
- m68881_restore(&pcb->pcb_fpregs);
-}
-
-/*
* Info for CTL_HW
*/
char cpu_model[] = "FIC8234";
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/cesfic/include/cpu.h
--- a/sys/arch/cesfic/include/cpu.h Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/cesfic/include/cpu.h Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.26 2011/02/08 20:20:10 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.27 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -117,11 +117,7 @@
#define M68K_MMU_MOTOROLA
#endif /* ! M68K_MMU_MOTOROLA */
-struct fpframe;
-
/* locore.s functions */
-void m68881_save(struct fpframe *);
-void m68881_restore(struct fpframe *);
int suline(void *, void *);
void loadustp(int);
diff -r e34e66764e58 -r ae664aa2dde0 sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c Mon May 16 12:43:59 2011 +0000
+++ b/sys/arch/hp300/hp300/machdep.c Mon May 16 13:22:51 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.221 2011/05/15 16:57:08 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.222 2011/05/16 13:22:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.221 2011/05/15 16:57:08 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.222 2011/05/16 13:22:52 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -338,40 +338,6 @@
}
/*
- * Set registers on exec.
- */
-void
-setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
-{
- struct frame *frame = (struct frame *)l->l_md.md_regs;
- struct pcb *pcb = lwp_getpcb(l);
-
- frame->f_sr = PSL_USERSET;
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[D0] = 0;
- frame->f_regs[D1] = 0;
- frame->f_regs[D2] = 0;
- frame->f_regs[D3] = 0;
- frame->f_regs[D4] = 0;
- frame->f_regs[D5] = 0;
- frame->f_regs[D6] = 0;
- frame->f_regs[D7] = 0;
- frame->f_regs[A0] = 0;
- frame->f_regs[A1] = 0;
- frame->f_regs[A2] = l->l_proc->p_psstrp;
- frame->f_regs[A3] = 0;
- frame->f_regs[A4] = 0;
- frame->f_regs[A5] = 0;
- frame->f_regs[A6] = 0;
- frame->f_regs[SP] = stack;
Home |
Main Index |
Thread Index |
Old Index