From owner-svn-src-projects@FreeBSD.ORG Sun Jul 8 09:55:01 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28536106566C; Sun, 8 Jul 2012 09:55:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10C758FC12; Sun, 8 Jul 2012 09:55:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q689t0rn042507; Sun, 8 Jul 2012 09:55:00 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q689t0xs042506; Sun, 8 Jul 2012 09:55:00 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201207080955.q689t0xs042506@svn.freebsd.org> From: Andrew Turner Date: Sun, 8 Jul 2012 09:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238225 - projects/arm_eabi/sys/arm/arm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 09:55:01 -0000 Author: andrew Date: Sun Jul 8 09:55:00 2012 New Revision: 238225 URL: http://svn.freebsd.org/changeset/base/238225 Log: Fix sigcode to work correctly with the new syscall interface. It should work with both the old and EABI version by setting r7 and placing the syscall value in the instruction. Modified: projects/arm_eabi/sys/arm/arm/locore.S Modified: projects/arm_eabi/sys/arm/arm/locore.S ============================================================================== --- projects/arm_eabi/sys/arm/arm/locore.S Sun Jul 8 09:49:01 2012 (r238224) +++ projects/arm_eabi/sys/arm/arm/locore.S Sun Jul 8 09:55:00 2012 (r238225) @@ -330,12 +330,29 @@ ENTRY_NP(abort) ENTRY_NP(sigcode) mov r0, sp + + /* + * Call the sigreturn system call. + * + * We have to load r7 manually rather than using + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * correct. Using the alternative places esigcode at the address + * of the datra rather than the address one past the data. + */ + + ldr r7, [pc, #12] /* Load SYS_sigreturn */ swi SYS_sigreturn /* Well if that failed we better exit quick ! */ + ldr r7, [pc, #8] /* Load SYS_exit */ swi SYS_exit - b . - 8 + + /* Branch back to retry SYS_sigreturn */ + b . - 16 + + .word SYS_sigreturn + .word SYS_exit .align 0 .global _C_LABEL(esigcode)