projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e787812
)
Clear triggers during entry.
author
Tim Newsome
<tim@sifive.com>
Thu, 29 Sep 2016 18:38:54 +0000
(11:38 -0700)
committer
Tim Newsome
<tim@sifive.com>
Thu, 29 Sep 2016 18:38:54 +0000
(11:38 -0700)
If the last test leaves some triggers set they should be cleaned up.
debug/programs/entry.S
patch
|
blob
|
history
diff --git
a/debug/programs/entry.S
b/debug/programs/entry.S
index 80904cdb38191967deb1958e18955c4365fc1c91..6dc694f69ea54780ef2a1eb51cb2888c86819924 100755
(executable)
--- a/
debug/programs/entry.S
+++ b/
debug/programs/entry.S
@@
-40,6
+40,15
@@
handle_reset:
# initialize stack pointer
la sp, stack_top
+ # Clear all hardware triggers
+ li t0, ~0
+1:
+ addi t0, t0, 1
+ csrw CSR_TSELECT, t0
+ csrw CSR_TDATA1, zero
+ csrr t1, CSR_TSELECT
+ beq t0, t1, 1b
+
# perform the rest of initialization in C
j _init