aboutsummaryrefslogtreecommitdiff
path: root/debug/gdbserver.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug/gdbserver.py')
-rwxr-xr-xdebug/gdbserver.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index d085e2e..af9a334 100755
--- 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):