From owner-svn-src-all@FreeBSD.ORG Sat May 4 19:59:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9B66A402; Sat, 4 May 2013 19:59:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 73CB3D72; Sat, 4 May 2013 19:59:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r44JxaFl020438; Sat, 4 May 2013 19:59:36 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r44JxZDg020435; Sat, 4 May 2013 19:59:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201305041959.r44JxZDg020435@svn.freebsd.org> From: Ian Lepore Date: Sat, 4 May 2013 19:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250253 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 May 2013 19:59:36 -0000 Author: ian Date: Sat May 4 19:59:35 2013 New Revision: 250253 URL: http://svnweb.freebsd.org/changeset/base/250253 Log: Insert STOP_UNWINDING directives in the _start (kernel entry point) and fork_trampoline (thread entry point) assembler routines, because it's not possible to unwind beyond those points. Also insert STOP_UNWINDING in the exception_exit routine, to prevent an unwind-loop at that point. This is just a stopgap until we get around to instrumenting all assembler functions with proper unwind metadata. Modified: head/sys/arm/arm/exception.S head/sys/arm/arm/locore.S head/sys/arm/arm/swtch.S Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sat May 4 19:50:50 2013 (r250252) +++ head/sys/arm/arm/exception.S Sat May 4 19:59:35 2013 (r250253) @@ -196,15 +196,20 @@ END(address_exception_entry) * Interrupts are disabled at suitable points to avoid ASTs * being posted between testing and exit to user mode. * - * This function uses PULLFRAMEFROMSVCANDEXIT and - * DO_AST - * only be called if the exception handler used PUSHFRAMEINSVC + * This function uses PULLFRAMEFROMSVCANDEXIT and DO_AST and can + * only be called if the exception handler used PUSHFRAMEINSVC. * + * For EABI, don't try to unwind any further than this. This is a + * stopgap measure to avoid getting stuck in a loop in the unwinder, + * which happens because we don't yet provide the proper unwind info + * here that describes which registers are being restored. */ -exception_exit: +ASENTRY_NP(exception_exit) + STOP_UNWINDING DO_AST PULLFRAMEFROMSVCANDEXIT +END(exception_exit) /* * undefined_entry: Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sat May 4 19:50:50 2013 (r250252) +++ head/sys/arm/arm/locore.S Sat May 4 19:59:35 2013 (r250253) @@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$"); */ ENTRY_NP(btext) ASENTRY_NP(_start) + STOP_UNWINDING /* Can't unwind into the bootloader! */ + mov r9, r0 /* 0 or boot mode from boot2 */ mov r8, r1 /* Save Machine type */ mov ip, r2 /* Save meta data */ Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Sat May 4 19:50:50 2013 (r250252) +++ head/sys/arm/arm/swtch.S Sat May 4 19:59:35 2013 (r250253) @@ -540,6 +540,7 @@ ENTRY(savectx) END(savectx) ENTRY(fork_trampoline) + STOP_UNWINDING /* Can't unwind beyond the thread enty point */ mov r1, r5 mov r2, sp mov r0, r4