mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
m1n1.trace.agx: Check for ring buffer overflow
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
5b9c709753
commit
71e24171be
1 changed files with 2 additions and 0 deletions
|
@ -166,6 +166,8 @@ class ChannelTracer(Reloadable):
|
|||
|
||||
cur = self.state.tail[ring]
|
||||
tail = self.channel.state[ring].WRITE_PTR.val
|
||||
if tail >= count:
|
||||
raise Exception(f"Message index {tail:#x} >= {count:#x}")
|
||||
if cur != tail:
|
||||
#self.log(f"{cur:#x} -> {tail:#x}")
|
||||
while cur != tail:
|
||||
|
|
Loading…
Add table
Reference in a new issue