From 96b21fa7b8912cc2ecc86f6b0e91d19a65103a55 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 16 Nov 2017 15:40:27 -0800 Subject: [PATCH] Disable PMP for PrivRw test. --- debug/gdbserver.py | 5 +++++ 1 file changed, 5 insertions(+) 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): -- 2.30.2