- 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.
This commit is contained in:
parent
51c60bdd41
commit
34637b8687
@ -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>
|
||||
@ -275,44 +275,6 @@ cpu_startup(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -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 @@ void drsc_handler(void);
|
||||
/*
|
||||
* 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);
|
||||
|
||||
|
@ -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"
|
||||
@ -231,40 +231,6 @@ cpu_startup(void)
|
||||
iomem_malloc_safe = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -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 @@ int fpu_probe(void);
|
||||
/*
|
||||
* 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 *);
|
||||
|
@ -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"
|
||||
@ -278,42 +278,6 @@ cpu_startup(void)
|
||||
printf("avail mem = %ld\n", ptoa(uvmexp.free));
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -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 @@ extern int astpending; /* need to trap before returning to user mode */
|
||||
#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);
|
||||
|
||||
|
@ -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"
|
||||
@ -337,40 +337,6 @@ cpu_startup(void)
|
||||
extio_ex_malloc_safe = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.65 2011/02/08 20:20:13 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.66 2011/05/16 13:22:53 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -126,11 +126,7 @@ extern int astpending; /* need to trap before returning to user mode */
|
||||
extern uint8_t *intiobase, *intiolimit, *extiobase;
|
||||
extern void (*vectab[])(void);
|
||||
|
||||
struct fpframe;
|
||||
|
||||
/* locore.s functions */
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $NetBSD: files.luna68k,v 1.20 2008/02/20 21:43:34 drochner Exp $
|
||||
# $NetBSD: files.luna68k,v 1.21 2011/05/16 13:22:53 tsutsui Exp $
|
||||
#
|
||||
maxpartitions 8
|
||||
maxusers 2 8 64
|
||||
@ -66,4 +66,8 @@ file dev/md_root.c memory_disk_hooks
|
||||
# NetBSD m68k a.out Binary Compatibility (COMPAT_AOUT_M68K)
|
||||
include "compat/aoutm68k/files.aoutm68k"
|
||||
|
||||
# SunOS binary compatibility (COMPAT_SUNOS)
|
||||
include "compat/sunos/files.sunos"
|
||||
file arch/m68k/m68k/sunos_machdep.c compat_sunos
|
||||
|
||||
include "arch/luna68k/conf/majors.luna68k"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.29 2011/02/08 20:20:16 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.30 2011/05/16 13:22:53 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -122,11 +122,8 @@ void dumpconf(void);
|
||||
void dumpsys(void);
|
||||
|
||||
/* locore.s functions */
|
||||
struct fpframe;
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
/* machdep.c functions */
|
||||
int badaddr(void *, int);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.78 2011/03/04 22:25:27 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.79 2011/05/16 13:22:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.78 2011/03/04 22:25:27 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79 2011/05/16 13:22:53 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -275,41 +275,6 @@ cpu_startup(void)
|
||||
greeting();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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);
|
||||
extern int fputype;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void
|
||||
identifycpu(void)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: m68k.h,v 1.18 2011/02/08 20:20:16 rmind Exp $ */
|
||||
/* $NetBSD: m68k.h,v 1.19 2011/05/16 13:22:53 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -96,6 +96,7 @@ extern int mmutype; /* MMU on this host */
|
||||
|
||||
struct pcb;
|
||||
struct trapframe;
|
||||
struct fpframe;
|
||||
|
||||
/* copypage.s */
|
||||
void copypage040(void *fromaddr, void *toaddr);
|
||||
@ -105,6 +106,8 @@ void zeropage(void *addr);
|
||||
/* locore.s (XXX: move to support.s?) */
|
||||
int getdfc(void);
|
||||
int getsfc(void);
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
/* switch_subr.s */
|
||||
void lwp_trampoline(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: m68k_machdep.c,v 1.8 2010/07/07 01:16:25 chs Exp $ */
|
||||
/* $NetBSD: m68k_machdep.c,v 1.9 2011/05/16 13:22:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -26,12 +26,58 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* the Systems Programming Group of the University of Utah Computer
|
||||
* Science Department.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: Utah $Hdr: machdep.c 1.74 92/12/20$
|
||||
*
|
||||
* @(#)machdep.c 8.10 (Berkeley) 4/20/94
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: m68k_machdep.c,v 1.8 2010/07/07 01:16:25 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: m68k_machdep.c,v 1.9 2011/05/16 13:22:53 tsutsui Exp $");
|
||||
|
||||
#include "opt_compat_sunos.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/lwp.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
#include <m68k/m68k.h>
|
||||
#include <m68k/frame.h>
|
||||
#include <m68k/pcb.h>
|
||||
#include <m68k/reg.h>
|
||||
|
||||
/* the following is used externally (sysctl_hw) */
|
||||
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
@ -54,3 +100,44 @@ ucas_ras_check(struct trapframe *v)
|
||||
f->f_format = f->f_vector = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set registers on exec.
|
||||
*/
|
||||
void
|
||||
setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
|
||||
{
|
||||
struct trapframe *tf = (struct trapframe *)l->l_md.md_regs;
|
||||
struct pcb *pcb = lwp_getpcb(l);
|
||||
|
||||
tf->tf_sr = PSL_USERSET;
|
||||
tf->tf_pc = pack->ep_entry & ~1;
|
||||
tf->tf_regs[D0] = 0;
|
||||
tf->tf_regs[D1] = 0;
|
||||
tf->tf_regs[D2] = 0;
|
||||
tf->tf_regs[D3] = 0;
|
||||
tf->tf_regs[D4] = 0;
|
||||
tf->tf_regs[D5] = 0;
|
||||
tf->tf_regs[D6] = 0;
|
||||
tf->tf_regs[D7] = 0;
|
||||
tf->tf_regs[A0] = 0;
|
||||
tf->tf_regs[A1] = 0;
|
||||
tf->tf_regs[A2] = l->l_proc->p_psstrp;
|
||||
tf->tf_regs[A3] = 0;
|
||||
tf->tf_regs[A4] = 0;
|
||||
tf->tf_regs[A5] = 0;
|
||||
tf->tf_regs[A6] = 0;
|
||||
tf->tf_regs[SP] = stack;
|
||||
|
||||
/* restore a null state frame */
|
||||
pcb->pcb_fpregs.fpf_null = 0;
|
||||
#if !defined(__mc68010__)
|
||||
if (fputype)
|
||||
m68881_restore(&pcb->pcb_fpregs);
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_SUNOS
|
||||
/* see m68k/sunos_syscall.c */
|
||||
l->l_md.md_flags = 0;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.95 2011/02/08 20:20:17 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.96 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -283,16 +283,12 @@ extern unsigned long load_addr;
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
struct fpframe;
|
||||
|
||||
/* machdep.c */
|
||||
void mac68k_set_bell_callback(int (*)(void *, int, int, int), void *);
|
||||
int mac68k_ring_bell(int, int, int);
|
||||
u_int get_mapping(void);
|
||||
|
||||
/* locore.s functions */
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.339 2011/03/04 22:25:27 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.340 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.339 2011/03/04 22:25:27 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.340 2011/05/16 13:22:54 tsutsui Exp $");
|
||||
|
||||
#include "opt_adb.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -438,41 +438,6 @@ initcpu(void)
|
||||
|
||||
void doboot(void) __attribute__((__noreturn__));
|
||||
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
int waittime = -1;
|
||||
struct pcb dumppcb;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.147 2011/03/04 22:25:27 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.148 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.147 2011/03/04 22:25:27 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.148 2011/05/16 13:22:54 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_m060sp.h"
|
||||
@ -484,41 +484,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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);
|
||||
extern void m68881_restore(struct fpframe *);
|
||||
|
||||
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
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.38 2011/02/08 20:20:20 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.39 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -164,12 +164,8 @@ extern u_int intrcnt[];
|
||||
extern void (*vectab[])(void);
|
||||
|
||||
struct frame;
|
||||
struct fpframe;
|
||||
|
||||
/* locore.s functions */
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
void badtrap(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.93 2011/05/15 16:51:09 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.94 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.93 2011/05/15 16:51:09 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.94 2011/05/16 13:22:54 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -249,40 +249,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 != FPU_NONE)
|
||||
m68881_restore(&pcb->pcb_fpregs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Info for CTL_HW
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.44 2011/02/08 20:20:21 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.45 2011/05/16 13:22:54 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -114,12 +114,7 @@ extern int astpending; /* need to trap before returning to user mode */
|
||||
|
||||
extern void (*vectab[])(void);
|
||||
|
||||
struct fpframe;
|
||||
|
||||
/* locore.s functions */
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.103 2011/05/10 14:45:28 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.104 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2011/05/10 14:45:28 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2011/05/16 13:22:55 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -315,40 +315,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.68 2011/03/04 22:25:29 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.69 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -149,7 +149,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.68 2011/03/04 22:25:29 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.69 2011/05/16 13:22:55 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -367,40 +367,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* Set registers on exec.
|
||||
*/
|
||||
void
|
||||
setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
|
||||
{
|
||||
struct trapframe *tf = (struct trapframe *)l->l_md.md_regs;
|
||||
struct pcb *pcb = lwp_getpcb(l);
|
||||
|
||||
tf->tf_sr = PSL_USERSET;
|
||||
tf->tf_pc = pack->ep_entry & ~1;
|
||||
tf->tf_regs[D0] = 0;
|
||||
tf->tf_regs[D1] = 0;
|
||||
tf->tf_regs[D2] = 0;
|
||||
tf->tf_regs[D3] = 0;
|
||||
tf->tf_regs[D4] = 0;
|
||||
tf->tf_regs[D5] = 0;
|
||||
tf->tf_regs[D6] = 0;
|
||||
tf->tf_regs[D7] = 0;
|
||||
tf->tf_regs[A0] = 0;
|
||||
tf->tf_regs[A1] = 0;
|
||||
tf->tf_regs[A2] = l->l_proc->p_psstrp;
|
||||
tf->tf_regs[A3] = 0;
|
||||
tf->tf_regs[A4] = 0;
|
||||
tf->tf_regs[A5] = 0;
|
||||
tf->tf_regs[A6] = 0;
|
||||
tf->tf_regs[SP] = stack;
|
||||
|
||||
/* restore a null state frame */
|
||||
pcb->pcb_fpregs.fpf_null = 0;
|
||||
|
||||
l->l_md.md_flags = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Info for CTL_HW
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.200 2011/03/04 22:25:29 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.201 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.200 2011/03/04 22:25:29 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.201 2011/05/16 13:22:55 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -284,42 +284,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* Set registers on exec.
|
||||
*/
|
||||
void
|
||||
setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
|
||||
{
|
||||
struct trapframe *tf = (struct trapframe *)l->l_md.md_regs;
|
||||
struct pcb *pcb = lwp_getpcb(l);
|
||||
|
||||
tf->tf_sr = PSL_USERSET;
|
||||
tf->tf_pc = pack->ep_entry & ~1;
|
||||
tf->tf_regs[D0] = 0;
|
||||
tf->tf_regs[D1] = 0;
|
||||
tf->tf_regs[D2] = 0;
|
||||
tf->tf_regs[D3] = 0;
|
||||
tf->tf_regs[D4] = 0;
|
||||
tf->tf_regs[D5] = 0;
|
||||
tf->tf_regs[D6] = 0;
|
||||
tf->tf_regs[D7] = 0;
|
||||
tf->tf_regs[A0] = 0;
|
||||
tf->tf_regs[A1] = 0;
|
||||
tf->tf_regs[A2] = l->l_proc->p_psstrp;
|
||||
tf->tf_regs[A3] = 0;
|
||||
tf->tf_regs[A4] = 0;
|
||||
tf->tf_regs[A5] = 0;
|
||||
tf->tf_regs[A6] = 0;
|
||||
tf->tf_regs[SP] = stack;
|
||||
|
||||
/* restore a null state frame */
|
||||
pcb->pcb_fpregs.fpf_null = 0;
|
||||
if (fputype)
|
||||
m68881_restore(&pcb->pcb_fpregs);
|
||||
|
||||
l->l_md.md_flags = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Info for CTL_HW
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.h,v 1.36 2006/10/03 13:02:32 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.h,v 1.37 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
@ -127,9 +127,6 @@ void intreg_init(void);
|
||||
void isr_init(void);
|
||||
void isr_config(void);
|
||||
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
void netintr(void);
|
||||
|
||||
void obio_init(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.127 2011/03/04 22:25:30 joerg Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.128 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.127 2011/03/04 22:25:30 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.128 2011/05/16 13:22:55 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -247,42 +247,6 @@ cpu_startup(void)
|
||||
initcpu();
|
||||
}
|
||||
|
||||
/*
|
||||
* Set registers on exec.
|
||||
*/
|
||||
void
|
||||
setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
|
||||
{
|
||||
struct trapframe *tf = (struct trapframe *)l->l_md.md_regs;
|
||||
struct pcb *pcb = lwp_getpcb(l);
|
||||
|
||||
tf->tf_sr = PSL_USERSET;
|
||||
tf->tf_pc = pack->ep_entry & ~1;
|
||||
tf->tf_regs[D0] = 0;
|
||||
tf->tf_regs[D1] = 0;
|
||||
tf->tf_regs[D2] = 0;
|
||||
tf->tf_regs[D3] = 0;
|
||||
tf->tf_regs[D4] = 0;
|
||||
tf->tf_regs[D5] = 0;
|
||||
tf->tf_regs[D6] = 0;
|
||||
tf->tf_regs[D7] = 0;
|
||||
tf->tf_regs[A0] = 0;
|
||||
tf->tf_regs[A1] = 0;
|
||||
tf->tf_regs[A2] = l->l_proc->p_psstrp;
|
||||
tf->tf_regs[A3] = 0;
|
||||
tf->tf_regs[A4] = 0;
|
||||
tf->tf_regs[A5] = 0;
|
||||
tf->tf_regs[A6] = 0;
|
||||
tf->tf_regs[SP] = stack;
|
||||
|
||||
/* restore a null state frame */
|
||||
pcb->pcb_fpregs.fpf_null = 0;
|
||||
if (fputype)
|
||||
m68881_restore(&pcb->pcb_fpregs);
|
||||
|
||||
l->l_md.md_flags = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Info for CTL_HW
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.53 2011/05/12 15:07:42 tsutsui Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.54 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -134,11 +134,8 @@ int fpu_probe(void);
|
||||
void dumpsys(void);
|
||||
|
||||
/* locore.s functions */
|
||||
struct fpframe;
|
||||
int suline(void *, void *);
|
||||
void loadustp(int);
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
/* machdep.c functions */
|
||||
int badaddr(volatile void*);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.176 2011/05/15 17:27:49 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.177 2011/05/16 13:22:55 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.176 2011/05/15 17:27:49 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.177 2011/05/16 13:22:55 tsutsui Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -280,40 +280,6 @@ cpu_startup(void)
|
||||
callout_init(&candbtimer_ch, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user