[PATCH v2 0/4] lib: sbi: fwft: Fix return error values according to the spec
Clément Léger
cleger at rivosinc.com
Fri Jan 24 08:51:55 PST 2025
The fwft spec mandates that an invalid feature ID return
SBI_ERR_INVALID_PARAM and that setting a locked value should return
SBI_ERR_DENIED_LOCKED. Add support for both cases.
---
v2:
- Use BIT_ULL instead of BIT to avoid shift overflow.
- Include another patch to optimize flags clearing.
Clément Léger (4):
include: sbi: Add SBI_ERR_DENIED_LOCKED
lib: sbi: fwft: Return SBI_ERR_DENIED_LOCKED when setting a locked
feature
lib: sbi: fwft: Fix error return value for feature > 32 bits
lib: sbi: Clear lock only for local events
include/sbi/sbi_ecall_interface.h | 3 ++-
include/sbi/sbi_error.h | 1 +
include/sbi/sbi_fwft.h | 4 ++--
lib/sbi/sbi_fwft.c | 38 +++++++++++++++++++------------
4 files changed, 29 insertions(+), 17 deletions(-)
--
2.47.1
More information about the opensbi
mailing list