From: Tim Newsome Date: Thu, 16 Nov 2017 23:40:27 +0000 (-0800) Subject: Disable PMP for PrivRw test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96b21fa7b8912cc2ecc86f6b0e91d19a65103a55;p=riscv-tests.git Disable PMP for PrivRw test. --- diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 43ac1e0..3e61449 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -814,6 +814,11 @@ class PrivTest(GdbTest): class PrivRw(PrivTest): def test(self): """Test reading/writing priv.""" + # Disable physical memory protection by allowing U mode access to all + # memory. + self.gdb.p("$pmpcfg0=0xf") # TOR, R, W, X + self.gdb.p("$pmpaddr0=0x%x" % ((self.hart.ram + self.hart.ram_size) >> 2)) + # Leave the PC at _start, where the first 4 instructions should be # legal in any mode. for privilege in range(4):