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

Collection of fixes #191

Merged
merged 10 commits into from
Jan 3, 2025
Merged

Collection of fixes #191

merged 10 commits into from
Jan 3, 2025

Conversation

atishp04
Copy link
Collaborator

@atishp04 atishp04 commented Jan 3, 2025

No description provided.

clementleger and others added 10 commits January 2, 2025 16:41
As raised by Atish, this event is designated for the PMU overflow
event. Disambiguate that by renaming the local PMU event to local PMU
overflow event.

Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Clément Léger <[email protected]>
Some events might only be supported if there is hardware support for
them (such as the PMU overflow one for instance). In that case,
returning SBI_ERR_NOT_SUPPORTED would allow to differentiate between
valid events but not supported and non valid events in which case
SBI_ERR_INVALID_PARAM is returned.

Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Clément Léger <[email protected]>
For SSE, we are returning SBI_ERR_NOT_SUPPORTED if the event is valid
but missing dependencies (either hardware or SBI does not implements
it). In order to be coherent with that description, align the firmware
feature one.

Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Clément Léger <[email protected]>
What we mean by long is XLEN;  C defines the width of long to be:
 * at least the width of int,
 * at least 32 bits wide,
 * and no more that the width of long long

SBI specification is not coupled with any C ABI and SBI implementation
must not care about what language the supervisor is using, so our
pseudocode definition should provide the explicit sizes of data types.

Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Unused input registers are currently unspecified, so define them to keep
their behavior the same, which allows the supervisor software to
optimize the unused inputs.

Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Bring the invalid value error in line with other pmu calls.

Reviewed-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Forcing reserved bits to zero allows us to enable future flags by simply
increasing the SBI implementation version.

Reviewed-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Reserved bits must be zero.  If we didn't do this, future flags would
also need to introduce a separate feature toggle that would have to be
enabled by the supervisor before using this flag.

Signed-off-by: Radim Krčmář <[email protected]>
"should be zero" does not prevent supervisor from writing random data.
If we want to use those bits in the future, it is more flexible to force
them to zero now.

Reviewed-by: Anup Patel <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Force reserved flag bits to be zero and get rid of the different wording
on one of them.

Reviewed-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
@atishp04 atishp04 merged commit 393055c into riscv-non-isa:master Jan 3, 2025
2 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.

3 participants