Skip to content

Commit

Permalink
Add a new error code for lock status
Browse files Browse the repository at this point in the history
As per the ARC review feedback, it was suggested that the supervisor
software should be able to distinguish between denial reasons if it
was due to locked.

While at it, add some clarification about set operation when the
requested and existing values are same.

Signed-off-by: Atish Patra <[email protected]>
  • Loading branch information
atishp04 committed Jan 3, 2025
1 parent 1c9759e commit 18378df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/binary-encoding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ error codes.
| SBI_ERR_BAD_RANGE | -11 | Bad (or invalid) range
| SBI_ERR_TIMEOUT | -12 | Failed due to timeout
| SBI_ERR_IO | -13 | Input/Output error
| SBI_ERR_DENIED_LOCKED | -14 | Denied or not allowed due to lock status
|===

An `ECALL` with an unsupported SBI extension ID (*EID*) or an unsupported SBI
Expand Down
6 changes: 5 additions & 1 deletion src/ext-firmware-features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ firmware feature to be set according to the `value` and `flags` parameters for
which per feature supported values are described in
<<table_fw_features_attribute_values>> and flags in <<table_fw_features_flags>>.

NOTE: The set operation will succeed if requested `value` matches the existing
value.

[#table_fw_features_flags]
.FWFT Firmware Features Set Flags
[cols="1,1,3", width=90%, align="center", options="header"]
Expand Down Expand Up @@ -143,9 +146,10 @@ returned in `sbiret.error` are shown in <<table_fw_features_set_errors>> below.
| SBI_ERR_INVALID_PARAM | Provided `value` or `flags` parameter is invalid.
| SBI_ERR_DENIED | `feature` set operation failed because either: +
- it was denied by the SBI implementation +
- `feature` is locked +
- `feature` is reserved or is platform-specific and
unimplemented
| SBI_ERR_DENIED_LOCKED | `feature` set operation failed because the `feature`
is locked
| SBI_ERR_FAILED | The set operation failed for unspecified or unknown
other reasons.
|===
Expand Down

0 comments on commit 18378df

Please sign in to comment.