summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2return_codes.h
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-07-30 10:36:00 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-06 21:19:39 +0000
commit99b15d64f9b15a487fd871fcd527d00c3641509c (patch)
treef0cac760286479da29e7e736ec8315fb9766cf5e /firmware/2lib/include/2return_codes.h
parent16e6fe39f94e802cadcd67ae0ac612aa6ec1ee7f (diff)
downloadvboot-99b15d64f9b15a487fd871fcd527d00c3641509c.tar.gz
vboot: convert LoadKernel and TryLoadKernel to vboot2-style errors
Convert LoadKernel and TryLoadKernel to use vboot2-style error codes. Error codes are renamed as follows: VBERROR_NO_KERNEL_FOUND --> VB2_ERROR_LK_NO_KERNEL_FOUND VBERROR_INVALID_KERNEL_FOUND --> VB2_ERROR_LK_INVALID_KERNEL_FOUND VBERROR_NO_DISK_FOUND --> VB2_ERROR_LK_NO_DISK_FOUND Remove these error codes: VBERROR_LOAD_KERNEL_RECOVERY Remove VBSD_BOOT_DEV_SWITCH_ON check in vb2_developer_ui to align vboot_ui and vboot_ui_menu functionality. VBERROR_LOAD_KERNEL Unused. BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: I90389c6629cc6055c4a4acbbbdd358bb79b63bf7 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1728297 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r--firmware/2lib/include/2return_codes.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 0ab9e750..0d344476 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -69,16 +69,6 @@ enum vb2_return_code {
VBERROR_TPM_LOCK_KERNEL = 0x1000C,
/* Calling firmware requested shutdown via VbExIsShutdownRequested() */
VBERROR_SHUTDOWN_REQUESTED = 0x1000D,
- /* Unable to find a boot device on which to look for a kernel */
- VBERROR_NO_DISK_FOUND = 0x1000E,
- /* No OS kernel found on any boot device */
- VBERROR_NO_KERNEL_FOUND = 0x1000F,
- /* All OS kernels found were invalid (corrupt, improperly signed...) */
- VBERROR_INVALID_KERNEL_FOUND = 0x10010,
- /* VbSelectAndLoadKernel() requested recovery mode */
- VBERROR_LOAD_KERNEL_RECOVERY = 0x10011,
- /* Other error inside VbSelectAndLoadKernel() */
- VBERROR_LOAD_KERNEL = 0x10012,
/* Invalid Google binary block */
VBERROR_INVALID_GBB = 0x10013,
/* Invalid bitmap volume */
@@ -756,6 +746,22 @@ enum vb2_return_code {
VB2_ERROR_EX_UNIMPLEMENTED,
/**********************************************************************
+ * LoadKernel errors
+ *
+ * Should be ordered by specificity -- lower number means more specific.
+ */
+ VB2_ERROR_LK = 0x100b0000,
+
+ /* Only an invalid kernel was found in LoadKernel() */
+ VB2_ERROR_LK_INVALID_KERNEL_FOUND = 0x100b1000,
+
+ /* No kernel partitions were found in LoadKernel() */
+ VB2_ERROR_LK_NO_KERNEL_FOUND = 0x100b2000,
+
+ /* No working block devices were found in VbTryLoadKernel() */
+ VB2_ERROR_LK_NO_DISK_FOUND = 0x100b3000,
+
+ /**********************************************************************
* Errors generated by host library (non-firmware) start here.
*/
VB2_ERROR_HOST_BASE = 0x20000000,