summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2return_codes.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r--firmware/2lib/include/2return_codes.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index fa7437e0..69a9494f 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -20,7 +20,7 @@ enum vb2_return_code {
* All vboot2 error codes start at a large offset from zero, to reduce
* the risk of overlap with other error codes (TPM, etc.).
*/
- VB2_ERROR_BASE = 0x0100000,
+ VB2_ERROR_BASE = 0x10000000,
/* Unknown / unspecified error */
VB2_ERROR_UNKNOWN = VB2_ERROR_BASE + 1,
@@ -443,12 +443,41 @@ enum vb2_return_code {
/* TPM clear owner not implemented */
VB2_ERROR_EX_TPM_CLEAR_OWNER_UNIMPLEMENTED,
+
+ /**********************************************************************
+ * Errors generated by host library (non-firmware) start here.
+ */
+ VB2_ERROR_HOST_BASE = 0x20000000,
+
+ /**********************************************************************
+ * Errors generated by host library misc functions
+ */
+ VB2_ERROR_HOST_MISC = VB2_ERROR_HOST_BASE + 0x010000,
+
+ /* Unable to open file in read_file() */
+ VB2_ERROR_READ_FILE_OPEN,
+
+ /* Bad size in read_file() */
+ VB2_ERROR_READ_FILE_SIZE,
+
+ /* Unable to allocate buffer in read_file() */
+ VB2_ERROR_READ_FILE_ALLOC,
+
+ /* Unable to read data in read_file() */
+ VB2_ERROR_READ_FILE_DATA,
+
+ /* Unable to open file in write_file() */
+ VB2_ERROR_WRITE_FILE_OPEN,
+
+ /* Unable to write data in write_file() */
+ VB2_ERROR_WRITE_FILE_DATA,
+
/**********************************************************************
* Highest non-zero error generated inside vboot library. Note that
* error codes passed through vboot when it calls external APIs may
* still be outside this range.
*/
- VB2_ERROR_MAX = VB2_ERROR_BASE + 0xffffff,
+ VB2_ERROR_MAX = VB2_ERROR_BASE + 0x1fffffff,
};
#endif /* VBOOT_2_RETURN_CODES_H_ */