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

Is sbi_cppc_read_hi allowed to ignore reserved/unimplemented register IDs? #132

Open
repnop opened this issue Nov 25, 2023 · 1 comment
Open

Comments

@repnop
Copy link

repnop commented Nov 25, 2023

The documentation for sbi_cppc_read_hi currently reads:

This function always returns zero in sbiret.value when supervisor mode XLEN is 64 or higher.

Does this imply no validity checking is done when called with XLEN >= 64, or should implementations still return an error on a reserved or unimplemented register ID?

@atishp04
Copy link
Collaborator

Yes. No validity checking is required when sbi_cppc_read_hi is called with XLEN >= 64. The additional validity checking is unnecessary because the sbi_cppc_read_hi can't provide any meaningful value when XLEN>=64 . There is no point in burdening the implementation with additional sanity checks. The invalid register would have already checked with cppc_probe call also.

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

2 participants