From b1dc9f47a408867fdf9c772101e07104a01ad0f5 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Fri, 3 Jan 2025 01:03:50 -0800 Subject: [PATCH] Add a new error code for lock status 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 --- src/binary-encoding.adoc | 1 + src/ext-firmware-features.adoc | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/binary-encoding.adoc b/src/binary-encoding.adoc index a620840..27ad59a 100644 --- a/src/binary-encoding.adoc +++ b/src/binary-encoding.adoc @@ -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 diff --git a/src/ext-firmware-features.adoc b/src/ext-firmware-features.adoc index ecfa033..1241c89 100644 --- a/src/ext-firmware-features.adoc +++ b/src/ext-firmware-features.adoc @@ -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 <> and flags in <>. +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"] @@ -143,9 +146,10 @@ returned in `sbiret.error` are shown in <> 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. |===