projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
bfa3b7d
)
Merge pull request #132 from riscv/debug-clear-satp
author
Megan Wachs
<megan@sifive.com>
Sun, 29 Apr 2018 03:38:37 +0000
(20:38 -0700)
committer
GitHub
<noreply@github.com>
Sun, 29 Apr 2018 03:38:37 +0000
(20:38 -0700)
debug: need to clear satp before changing priv
debug/gdbserver.py
patch
|
blob
|
history
diff --git
a/debug/gdbserver.py
b/debug/gdbserver.py
index d085e2ef60df5a3a2bc2fc1efb547cb4a9fc69ae..af9a33456b5855c348f2fa28f209c2d276f6a9a4 100755
(executable)
--- a/
debug/gdbserver.py
+++ b/
debug/gdbserver.py
@@
-881,6
+881,13
@@
class PrivRw(PrivTest):
# PMP registers are optional
pass
+ # Ensure Virtual Memory is disabled if applicable (SATP register is not reset)
+ try:
+ self.gdb.p("$satp=0")
+ except testlib.CouldNotFetch:
+ # SATP only exists if you have S mode.
+ pass
+
# Leave the PC at _start, where the first 4 instructions should be
# legal in any mode.
for privilege in range(4):