We use the error category codes from absl_status.h. More...
#include <sw/device/lib/base/status.h>
Data Fields | |
int32_t | value |
We use the error category codes from absl_status.h.
OpenTitan's status_t is a single 32-bit word conveying either a result code or an error code.
We build a packed status value that identifies the source of the error (in the form of the module identifier and line number).
By default, the module identifier is the first three letters of the source filename. The identifier can be overridden (per-module) with the DECLARE_MODULE_ID macro.
Our status codes are arranged as a packed bitfield, with the sign bit signifying whether the value represents a result or an error.
All Ok (good) values: 32 31 0 +—+------------------------------------------—+ | | 31 bit | | 0 | Result | +—+------------------------------------------—+
All Error values: 32 31 26 21 16 5 0 +—+----—+----—+----—+----------—+----—+ | | 15 bit | 11 bit | 5 bit | | 1 | Module Identifier | Line Number | code | +—+----—+----—+----—+----------—+----—+
The module identifier value is interpreted as three 5-bit fields representing the characters 0x40..0x5F.
Ok
value which is equivalent in value to kHardenedBoolTrue.The otcrypto error codes all have the MSB set and encode an error type of absl_status_t in the lower 5 bits.
This definition is supplied to provide the status_t definition when otcrypto is exported out of the OpenTitan repository.