Skip to content

Commit

Permalink
Improve the disable_timer function
Browse files Browse the repository at this point in the history
Signed-off-by: liangzhen <zhen.liang@spacemit.com>
Change-Id: I885c50698893ae83b32db35dabc9a04b5d709483
  • Loading branch information
lz-bro committed Feb 4, 2024
1 parent 67e7759 commit 8e68cc4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,9 @@ def disable_timer(self, interrupt=False):
if interrupt:
self.gdb.interrupt()
self.gdb.p("$mie=$mie & ~0x80")
self.gdb.p("$mstatus=$mstatus & ~0x8")
self.gdb.p(f"*((long long*) 0x{self.target.clint_addr + 0x4000:x})
=0x" + "f" * (self.hart.xlen // 4))

def exit(self, expected_result=10):
self.gdb.command("delete")
Expand Down

0 comments on commit 8e68cc4

Please sign in to comment.