summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2return_codes.h
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-05-23 15:33:54 +0800
committerCommit Bot <commit-bot@chromium.org>2019-06-07 22:40:03 +0000
commit3eb00efa4eb30e02d1b3197dafc5975fdcbe5914 (patch)
treea60cece3b500976279a32bb7e71d4ba993d4400e /firmware/2lib/include/2return_codes.h
parent96d5a58cbe65d762c64dc0e8f5ecc7af397015a4 (diff)
downloadvboot-3eb00efa4eb30e02d1b3197dafc5975fdcbe5914.tar.gz
vboot: rewrite GBB functions and API
Old vboot1-style GBB accessor functions were awkwardly located within region-init.c. Rewrite GBB accessor functions for vboot2, and formally expose HWID retrieval function via vboot2 API. workbuf is used for key retrieval functions, while a buffer provided by the caller is used for HWID retrieval function. Reintroduce vboot_display_tests to `make runtests` test suite. Move GBB tests from vboot_display_tests to vb2_gbb_tests. Properly propagate vb2_workbuf objects within the function call stack (vb2_load_partition). BUG=b:124141368, chromium:954774 TEST=Build and flash to eve, check that Chrome OS boots TEST=Build with CL:1627469 applied, check HWID TEST=make clean && make runtests BRANCH=none Change-Id: I398d1329f0b092de35aac73d98dfd9aee6e4e7de Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1584488 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Jason Clinton <jclinton@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r--firmware/2lib/include/2return_codes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 5992806d..15ec97f6 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -361,7 +361,7 @@ enum vb2_return_code {
/* Work buffer unaligned in vb2_init_context() */
VB2_ERROR_INITCTX_WORKBUF_ALIGN,
- /* Work buffer too small in vb2_fw_parse_gbb() */
+ /* Work buffer too small in GBB-related function */
VB2_ERROR_GBB_WORKBUF,
/* Bad magic number in vb2_read_gbb_header() */
@@ -503,6 +503,12 @@ enum vb2_return_code {
/* Bad magic number in vb2_shared_data structure */
VB2_ERROR_SHARED_DATA_MAGIC,
+ /* Some part of GBB data is invalid */
+ VB2_ERROR_GBB_INVALID,
+
+ /* Invalid parameter */
+ VB2_ERROR_INVALID_PARAMETER,
+
/**********************************************************************
* API-level errors
*/