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

Why is MTIME M-mode only? #330

Open
Indanz opened this issue Oct 23, 2023 · 0 comments
Open

Why is MTIME M-mode only? #330

Indanz opened this issue Oct 23, 2023 · 0 comments

Comments

@Indanz
Copy link

Indanz commented Oct 23, 2023

Since commit 59a08cd, which is part of Split region permissions into M-mode and SU-mode MTIME is M-mode only.

This breaks OSes that read MTIME directly to avoid the overhead of emulated rdtime instructions on hardware that don't have native support for the instruction. The emulated rdtime has huge overhead. MTIME is well defined by the RISC-V standard, so we thought we could rely on it.

Is MTIME off-limits for OS code now, and why? Is that documented somewhere? Could read-only access to the CLINT/MTIME memory region be added back so low overhead timer reads are possible again on all RISC-V platforms?

Please advise how we should proceed.

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

No branches or pull requests

1 participant