summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2014-11-25 10:52:59 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-12-01 20:30:50 +0000
commit42a850059ca07f5e14fdf31990a35ad63e3f1bd8 (patch)
treeab65411dc63c7d86bf6ada386020873ea92bb80b /firmware
parent9328bbff521625e788396ef9c5b26b79e6d1a7cb (diff)
downloadvboot-42a850059ca07f5e14fdf31990a35ad63e3f1bd8.tar.gz
vboot2: Add host lib function to create a vb2-style firmware preamble
And associated unit tests BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I3bf6ff6c6e32dfd0dd737f9b04ff0546e9e0a463 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/231728 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/include/2return_codes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 7a59925a..3d1c611a 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -617,6 +617,20 @@ enum vb2_return_code {
VB2_KEYBLOCK_CREATE_SIGN,
/**********************************************************************
+ * Errors generated by host library firmware preamble functions
+ */
+ VB2_ERROR_HOST_FW_PREAMBLE = VB2_ERROR_HOST_BASE + 0x050000,
+
+ /* Unable to determine signature sizes for vb2_create_fw_preamble() */
+ VB2_FW_PREAMBLE_CREATE_SIG_SIZE,
+
+ /* Unable to allocate buffer in vb2_create_fw_preamble() */
+ VB2_FW_PREAMBLE_CREATE_ALLOC,
+
+ /* Unable to sign preamble in vb2_create_fw_preamble() */
+ VB2_FW_PREAMBLE_CREATE_SIGN,
+
+ /**********************************************************************
* 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.