Date: Thu, 17 Jan 2013 09:52:36 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245551 - in head/sys/arm: arm include Message-ID: <201301170952.r0H9qaEA090832@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Thu Jan 17 09:52:35 2013 New Revision: 245551 URL: http://svnweb.freebsd.org/changeset/base/245551 Log: * Correct KINFO_PROC_SIZE for ARM EABI. * Update the syscall interface to pass in the syscall value in register r7. Modified: head/sys/arm/arm/trap.c head/sys/arm/include/proc.h Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Thu Jan 17 09:50:18 2013 (r245550) +++ head/sys/arm/arm/trap.c Thu Jan 17 09:52:35 2013 (r245551) @@ -866,7 +866,11 @@ cpu_fetch_syscall_args(struct thread *td register_t *ap; int error; +#ifdef __ARM_EABI__ + sa->code = td->td_frame->tf_r7; +#else sa->code = sa->insn & 0x000fffff; +#endif ap = &td->td_frame->tf_r0; if (sa->code == SYS_syscall) { sa->code = *ap++; @@ -905,16 +909,18 @@ syscall(struct thread *td, trapframe_t * struct syscall_args sa; int error; +#ifndef __ARM_EABI__ sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); switch (sa.insn & SWI_OS_MASK) { case 0: /* XXX: we need our own one. */ - sa.nap = 4; break; default: call_trapsignal(td, SIGILL, 0); userret(td, frame); return; } +#endif + sa.nap = 4; error = syscallenter(td, &sa); KASSERT(error != 0 || td->td_ar == NULL, Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Thu Jan 17 09:50:18 2013 (r245550) +++ head/sys/arm/include/proc.h Thu Jan 17 09:52:35 2013 (r245551) @@ -60,7 +60,11 @@ struct mdproc { void *md_sigtramp; }; +#ifdef __ARM_EABI__ +#define KINFO_PROC_SIZE 816 +#else #define KINFO_PROC_SIZE 792 +#endif #define MAXARGS 8 struct syscall_args { @@ -69,7 +73,9 @@ struct syscall_args { register_t args[MAXARGS]; int narg; u_int nap; +#ifndef __ARM_EABI__ u_int32_t insn; +#endif }; #endif /* !_MACHINE_PROC_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301170952.r0H9qaEA090832>