diff options
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r-- | firmware/2lib/include/2return_codes.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index 3a303be1..6b5c0279 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -24,7 +24,30 @@ enum vb2_return_code { /* Success - no error */ VB2_SUCCESS = 0, - /* + /********************************************************************** + * Return values that are not considered errors + */ + VB2_REQUEST = 0x1000, + + /* Calling firmware requested shutdown via VbExIsShutdownRequested() */ + VB2_REQUEST_SHUTDOWN = 0x1001, + + /* Calling firmware needs to perform a reboot */ + VB2_REQUEST_REBOOT = 0x1002, + + /* Need EC to reboot to read-only code to switch RW slot */ + VB2_REQUEST_REBOOT_EC_SWITCH_RW = 0x1003, + + /* Need EC to reboot to read-only code */ + VB2_REQUEST_REBOOT_EC_TO_RO = 0x1004, + + /* Continue in the UI loop. This is used in UI internal functions. */ + VB2_REQUEST_UI_CONTINUE = 0x1005, + + /* End of VB2_REQUEST_* */ + VB2_REQUEST_END = 0x5000, + + /********************************************************************** * All vboot2 error codes start at a large offset from zero, to reduce * the risk of overlap with other error codes (TPM, etc.). */ @@ -41,22 +64,22 @@ enum vb2_return_code { * TODO: deprecate these once they have all moved over to vboot2 style */ /* Calling firmware needs to perform a reboot. */ - VBERROR_REBOOT_REQUIRED = 0x10007, + VBERROR_REBOOT_REQUIRED = VB2_REQUEST_REBOOT, /* Calling firmware requested shutdown via VbExIsShutdownRequested() */ - VBERROR_SHUTDOWN_REQUESTED = 0x1000D, + VBERROR_SHUTDOWN_REQUESTED = VB2_REQUEST_SHUTDOWN, /* VbExBeep() can't make sound in the background */ VBERROR_NO_BACKGROUND_SOUND = 0x10019, /* Need EC to reboot to read-only code to switch RW slot */ - VBERROR_EC_REBOOT_TO_SWITCH_RW = 0x1001A, + VBERROR_EC_REBOOT_TO_SWITCH_RW = VB2_REQUEST_REBOOT_EC_SWITCH_RW, /* Need EC to reboot to read-only code */ - VBERROR_EC_REBOOT_TO_RO_REQUIRED = 0x10022, + VBERROR_EC_REBOOT_TO_RO_REQUIRED = VB2_REQUEST_REBOOT_EC_TO_RO, /* Peripheral busy. Cannot upgrade firmware at present. */ VBERROR_PERIPHERAL_BUSY = 0x10030, /* Error writing VPD */ VBERROR_VPD_WRITE = 0x10032, /* Detachable UI internal functions may return the following codes */ /* No error; return to UI loop */ - VBERROR_KEEP_LOOPING = 0x30000, + VBERROR_KEEP_LOOPING = VB2_REQUEST_UI_CONTINUE, /********************************************************************** * SHA errors |