From 4a72ca96dcab626a6289ccf035175adb69d8d727 Mon Sep 17 00:00:00 2001 From: liangzhen Date: Fri, 5 Jan 2024 11:30:57 +0800 Subject: [PATCH] Disable mmu after test translate Signed-off-by: liangzhen --- debug/gdbserver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 5450adb1e..787e5bf69 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -1679,6 +1679,10 @@ def test_translation(self): assertEqual(0xdeadbeef, self.gdb.p("virtual[0]")) assertEqual(0x55667788, self.gdb.p("virtual[1]")) + # disable mmu + self.gdb.p("$mstatus=$mstatus & ~0x20000") + self.gdb.p("$satp=0") + SATP_MODE_OFF = 0 SATP_MODE_SV32 = 1 SATP_MODE_SV39 = 8