Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the disable_timer function #538

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,9 @@ def test(self):
self.disable_timer()
return

self.disable_timer()
assertGreater(interrupt_count, 1000)
assertGreater(local, 1000)
self.disable_timer()

def postMortem(self):
GdbSingleHartTest.postMortem(self)
Expand Down
3 changes: 3 additions & 0 deletions debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,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
Loading