diff options
author | liangzhen <zhen.liang@spacemit.com> | 2023-09-14 10:25:28 +0800 |
---|---|---|
committer | liangzhen <zhen.liang@spacemit.com> | 2023-10-10 09:50:53 +0800 |
commit | ecf4fde3b3ddf0fc3e8a8069d96e4d5c64cf54bf (patch) | |
tree | 5fbab368cbc4989f6b2f9adc5d1b597b19365d1f /debug/testlib.py | |
parent | d4eaa5bd6674b51d3b9b24913713c4638e99cdd9 (diff) | |
download | riscv-tests-ecf4fde3b3ddf0fc3e8a8069d96e4d5c64cf54bf.zip riscv-tests-ecf4fde3b3ddf0fc3e8a8069d96e4d5c64cf54bf.tar.gz riscv-tests-ecf4fde3b3ddf0fc3e8a8069d96e4d5c64cf54bf.tar.bz2 |
Disable timer interrupt to fix some bugs
Signed-off-by: liangzhen <zhen.liang@spacemit.com>
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 435b41b..6f470a0 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -1411,6 +1411,13 @@ class GdbTest(BaseTest): # PMP registers are optional pass + def disable_timer(self, interrupt=False): + for hart in self.target.harts: + self.gdb.select_hart(hart) + if interrupt: + self.gdb.interrupt() + self.gdb.p("$mie=$mie & ~0x80") + def exit(self, expected_result=10): self.gdb.command("delete") self.gdb.b("_exit") |