summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2return_codes.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-10-25 10:00:27 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-14 16:42:19 -0800
commitf182401b974b85bc4bc641d8ec43719a99777b1b (patch)
treefa861263146816c1bc8ae8812a20e57373d27650 /firmware/2lib/include/2return_codes.h
parentdfcacc87bec544ab7b4ed8645f65876b471a1cd3 (diff)
downloadvboot-f182401b974b85bc4bc641d8ec43719a99777b1b.tar.gz
vboot: Split partition and vblock verification from LoadKernel()stabilize-8992.B
LoadKernel() was a big function which did everything from looping over partitions on a drive to loading the data within them to calling the low-level verification functions on that data. Split it apart into more manageable chunks. This also reduces indentation of the inner parts of the code, whic increases readability. No outwardly-visible functionality changes. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: Iea79e70163f5d9f1a9d0d897e4a9bacc925a742d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404919 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r--firmware/2lib/include/2return_codes.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index d03b0739..75484783 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -446,6 +446,48 @@ enum vb2_return_code {
/* Kernel preamble not loaded before calling vb2api_get_kernel_size() */
VB2_ERROR_API_GET_KERNEL_SIZE_PREAMBLE,
+ /* Unable to unpack kernel subkey in vb2_verify_vblock() */
+ VB2_ERROR_VBLOCK_KERNEL_SUBKEY,
+
+ /*
+ * Got a self-signed kernel in vb2_verify_vblock(), but need an
+ * officially signed one.
+ */
+ VB2_ERROR_VBLOCK_SELF_SIGNED,
+
+ /* Invalid keyblock hash in vb2_verify_vblock() */
+ VB2_ERROR_VBLOCK_KEYBLOCK_HASH,
+
+ /* Invalid keyblock in vb2_verify_vblock() */
+ VB2_ERROR_VBLOCK_KEYBLOCK,
+
+ /* Wrong developer key hash in vb2_verify_vblock() */
+ VB2_ERROR_VBLOCK_DEV_KEY_HASH,
+
+ /* Work buffer too small in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_WORKBUF,
+
+ /* Unable to read vblock in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_READ_VBLOCK,
+
+ /* Unable to verify vblock in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_VERIFY_VBLOCK,
+
+ /* Kernel body offset too large in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_BODY_OFFSET,
+
+ /* Kernel body too big in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_BODY_SIZE,
+
+ /* Unable to read kernel body in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_READ_BODY,
+
+ /* Unable to unpack data key in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_DATA_KEY,
+
+ /* Unable to verify body in vb2_load_partition() */
+ VB2_ERROR_LOAD_PARTITION_VERIFY_BODY,
+
/**********************************************************************
* API-level errors
*/