diff options
| author | Clément Léger <[email protected]> | 2025-03-25 11:26:10 +0100 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-03-27 18:15:25 +0530 |
| commit | 1e7258d6a81097e7a003aed860f98bcb1d8c58a7 (patch) | |
| tree | 0a0342059a3f2c5d4b3de14e1e5b547c13d5d940 /lib | |
| parent | 5dc7a6db6f9adb7d18029691bf42d20f4b10d3cd (diff) | |
lib: sbi: sse: Return SBI_EDENIED for read only parameters.
The SSE specification did specified that read only parameters should
return SBI_EBADRANGE but was modified recently to return SBI_EDENIED.
Signed-off-by: Clément Léger <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_sse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c index f959eaa6..47721b2f 100644 --- a/lib/sbi/sbi_sse.c +++ b/lib/sbi/sbi_sse.c @@ -388,7 +388,7 @@ static int sse_event_set_hart_id_check(struct sbi_sse_event *e, struct sbi_domain *hd = sbi_domain_thishart_ptr(); if (!sse_event_is_global(e)) - return SBI_EBAD_RANGE; + return SBI_EDENIED; if (!sbi_domain_is_assigned_hart(hd, sbi_hartid_to_hartindex(hartid))) return SBI_EINVAL; @@ -444,7 +444,13 @@ static int sse_event_set_attr_check(struct sbi_sse_event *e, uint32_t attr_id, return SBI_OK; default: - return SBI_EBAD_RANGE; + /* + * Attribute range validity was already checked by + * sbi_sse_attr_check(). If we end up here, attribute was not + * handled by the above 'case' statements and thus it is + * read-only. + */ + return SBI_EDENIED; } } |
