From 967ba853d88b7803c73f3adb94b8717d001a077b Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Wed, 28 Aug 2019 17:45:05 +0800 Subject: vboot/secdata: implement vboot2 FWMP support Implement FWMP support in vboot2. Currently, the data structure is just accessed directly, checking to see whether its `flags` member contains particular flags. We'd like to change this to follow the same scheme as secdata_firmware and secdata_kernel. This CL also updates some functions, comments, and tests related to secdata_firmware and secdata_kernel to ensure consistency between code for the secdata spaces. BUG=b:124141368, chromium:972956 TEST=make clean && make runtests BRANCH=none Change-Id: Ia0d67532cc6e077e170ffb25d0bc587b1d53edf3 Signed-off-by: Joel Kitching Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1773088 Reviewed-by: Joel Kitching Tested-by: Joel Kitching Commit-Queue: Joel Kitching --- firmware/2lib/include/2return_codes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'firmware/2lib/include/2return_codes.h') diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index 865ea7cf..bc612344 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -197,6 +197,18 @@ enum vb2_return_code { /* Called vb2_secdata_kernel_set() with uninitialized secdata_kernel */ VB2_ERROR_SECDATA_KERNEL_SET_UNINITIALIZED, + /* Bad size in vb2api_secdata_fwmp_check() */ + VB2_ERROR_SECDATA_FWMP_SIZE, + + /* Incomplete structure in vb2api_secdata_fwmp_check() */ + VB2_ERROR_SECDATA_FWMP_INCOMPLETE, + + /* Bad CRC in vb2api_secdata_fwmp_check() */ + VB2_ERROR_SECDATA_FWMP_CRC, + + /* Bad struct version in vb2_secdata_fwmp_check() */ + VB2_ERROR_SECDATA_FWMP_VERSION, + /********************************************************************** * Common code errors */ -- cgit v1.2.1