Deleted Added
full compact
aim_machdep.c (204128) aim_machdep.c (205642)
1/*-
2 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
3 * Copyright (C) 1995, 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 41 unchanged lines hidden (view full) ---

50 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
52 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
53 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 * $NetBSD: machdep.c,v 1.74.2.1 2000/11/01 16:13:48 tv Exp $
55 */
56
57#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
3 * Copyright (C) 1995, 1996 TooLs GmbH.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 41 unchanged lines hidden (view full) ---

50 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
52 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
53 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 * $NetBSD: machdep.c,v 1.74.2.1 2000/11/01 16:13:48 tv Exp $
55 */
56
57#include <sys/cdefs.h>
58__FBSDID("$FreeBSD: head/sys/powerpc/aim/machdep.c 204128 2010-02-20 16:23:29Z nwhitehorn $");
58__FBSDID("$FreeBSD: head/sys/powerpc/aim/machdep.c 205642 2010-03-25 14:24:00Z nwhitehorn $");
59
60#include "opt_compat.h"
61#include "opt_ddb.h"
62#include "opt_kstack_pages.h"
63#include "opt_msgbuf.h"
64
65#include <sys/param.h>
66#include <sys/proc.h>

--- 879 unchanged lines hidden (view full) ---

946
947 return (0);
948}
949
950/*
951 * Set set up registers on exec.
952 */
953void
59
60#include "opt_compat.h"
61#include "opt_ddb.h"
62#include "opt_kstack_pages.h"
63#include "opt_msgbuf.h"
64
65#include <sys/param.h>
66#include <sys/proc.h>

--- 879 unchanged lines hidden (view full) ---

946
947 return (0);
948}
949
950/*
951 * Set set up registers on exec.
952 */
953void
954exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
954exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
955{
956 struct trapframe *tf;
957 struct ps_strings arginfo;
958
959 tf = trapframe(td);
960 bzero(tf, sizeof *tf);
961 tf->fixreg[1] = -roundup(-stack + 8, 16);
962

--- 27 unchanged lines hidden (view full) ---

990 td->td_retval[1] = (register_t)arginfo.ps_argvstr;
991 tf->fixreg[3] = arginfo.ps_nargvstr;
992 tf->fixreg[4] = (register_t)arginfo.ps_argvstr;
993 tf->fixreg[5] = (register_t)arginfo.ps_envstr;
994 tf->fixreg[6] = 0; /* auxillary vector */
995 tf->fixreg[7] = 0; /* termination vector */
996 tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */
997
955{
956 struct trapframe *tf;
957 struct ps_strings arginfo;
958
959 tf = trapframe(td);
960 bzero(tf, sizeof *tf);
961 tf->fixreg[1] = -roundup(-stack + 8, 16);
962

--- 27 unchanged lines hidden (view full) ---

990 td->td_retval[1] = (register_t)arginfo.ps_argvstr;
991 tf->fixreg[3] = arginfo.ps_nargvstr;
992 tf->fixreg[4] = (register_t)arginfo.ps_argvstr;
993 tf->fixreg[5] = (register_t)arginfo.ps_envstr;
994 tf->fixreg[6] = 0; /* auxillary vector */
995 tf->fixreg[7] = 0; /* termination vector */
996 tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */
997
998 tf->srr0 = entry;
998 tf->srr0 = imgp->entry_addr;
999 tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT;
1000 td->td_pcb->pcb_flags = 0;
1001}
1002
1003int
1004fill_regs(struct thread *td, struct reg *regs)
1005{
1006 struct trapframe *tf;

--- 196 unchanged lines hidden ---
999 tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT;
1000 td->td_pcb->pcb_flags = 0;
1001}
1002
1003int
1004fill_regs(struct thread *td, struct reg *regs)
1005{
1006 struct trapframe *tf;

--- 196 unchanged lines hidden ---