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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to