From owner-svn-src-all@freebsd.org Wed Jul 8 14:07:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE50995FAE; Wed, 8 Jul 2015 14:07:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F14BA108E; Wed, 8 Jul 2015 14:07:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t68E77Gi033766; Wed, 8 Jul 2015 14:07:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t68E777r033765; Wed, 8 Jul 2015 14:07:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507081407.t68E777r033765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 8 Jul 2015 14:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285271 - head/sys/arm64/arm64 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.20 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: Wed, 08 Jul 2015 14:07:08 -0000 Author: andrew Date: Wed Jul 8 14:07:06 2015 New Revision: 285271 URL: https://svnweb.freebsd.org/changeset/base/285271 Log: Add an implementation of savectx that doesn't just call panic. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/swtch.S Modified: head/sys/arm64/arm64/swtch.S ============================================================================== --- head/sys/arm64/arm64/swtch.S Wed Jul 8 13:52:59 2015 (r285270) +++ head/sys/arm64/arm64/swtch.S Wed Jul 8 14:07:06 2015 (r285271) @@ -246,10 +246,31 @@ ENTRY(fork_trampoline) END(fork_trampoline) ENTRY(savectx) - adr x0, .Lsavectx_panic_str - bl panic + /* Store the callee-saved registers */ + stp x8, x9, [x0, #PCB_REGS + 8 * 8] + stp x10, x11, [x0, #PCB_REGS + 10 * 8] + stp x12, x13, [x0, #PCB_REGS + 12 * 8] + stp x14, x15, [x0, #PCB_REGS + 14 * 8] + stp x16, x17, [x0, #PCB_REGS + 16 * 8] + stp x18, x19, [x0, #PCB_REGS + 18 * 8] + stp x20, x21, [x0, #PCB_REGS + 20 * 8] + stp x22, x23, [x0, #PCB_REGS + 22 * 8] + stp x24, x25, [x0, #PCB_REGS + 24 * 8] + stp x26, x27, [x0, #PCB_REGS + 26 * 8] + stp x28, x29, [x0, #PCB_REGS + 28 * 8] + str x30, [x0, #PCB_REGS + 30 * 8] + /* And the old stack pointer */ + mov x5, sp + mrs x6, tpidr_el0 + stp x5, x6, [x0, #PCB_SP] + + /* Store the VFP registers */ +#ifdef VFP + mov x29, lr + bl vfp_save_state + mov lr, x29 +#endif + ret -.Lsavectx_panic_str: - .asciz "savectx" END(savectx)