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

Handle MIPS32 cycle counter overflow #292

Merged
merged 5 commits into from
Aug 30, 2024
Merged

Handle MIPS32 cycle counter overflow #292

merged 5 commits into from
Aug 30, 2024

Conversation

darkk
Copy link
Contributor

@darkk darkk commented Aug 29, 2024

Unfortunately, 32-bit cycle counter overflows ≈ twice a minute, so some code is needed to distinguish between meaningful overflow (just add 1<<32 and get the result) and hardly-meaningful (do some math to get the result).

The code might be extended to get rid of timer_inf altogether, but it needs clock counter frequency accounting at a timer level and I'm somewhat reluctant to implementing that as this code seems to be good enough.

@rurban rurban merged commit 6888dd3 into rurban:master Aug 30, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants