Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2016 13:59:14 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300614 - head/sys/riscv/riscv
Message-ID:  <201605241359.u4ODxE5a000967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Tue May 24 13:59:13 2016
New Revision: 300614
URL: https://svnweb.freebsd.org/changeset/base/300614

Log:
  Store the original value of stack pointer to the exception frame
  (the value we had before supervisor exception occurred).
  This helps consumers (e.g. DTrace) to not proceed additional calculations.
  
  Sponsored by:	DARPA, AFRL
  Sponsored by:	HEIF5

Modified:
  head/sys/riscv/riscv/exception.S

Modified: head/sys/riscv/riscv/exception.S
==============================================================================
--- head/sys/riscv/riscv/exception.S	Tue May 24 13:58:07 2016	(r300613)
+++ head/sys/riscv/riscv/exception.S	Tue May 24 13:59:13 2016	(r300614)
@@ -93,7 +93,9 @@ __FBSDID("$FreeBSD$");
 
 .if \el == 1
 	/* Store kernel sp */
-	sd	sp, (TF_SP)(sp)
+	li	t1, TF_SIZE
+	add	t0, sp, t1
+	sd	t0, (TF_SP)(sp)
 .else
 	/* Store user sp */
 	csrr	t0, sscratch



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605241359.u4ODxE5a000967>