summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-03-12 17:04:00 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 13:20:08 -0700
commiteb0fc5749e6cca0b9ab22000fc5b53c43433e18e (patch)
tree9625fe171184b02d3f19463c754a043eab8ee881 /firmware/include
parentf9a2fa1f589acf1e436b6a494e647d0e4305fc2b (diff)
downloadvboot-eb0fc5749e6cca0b9ab22000fc5b53c43433e18e.tar.gz
vboot: pull vb2_context up to higher level in call stack
The original purpose of vb2_context is to provide one shared state object through the entirety of one particular application. Pull the creation of vb2_context up to a higher level in order to work towards this goal. BUG=b:124141368 TEST=/work/vboot/src/repohooks/pre-upload.py TEST=make clean && make runtests TEST=make clean && COV=1 make coverage && make coverage_html CQ-DEPEND=CL:1517179 BRANCH=none Change-Id: I7c454afddb2b525895d9945b081b14b29100892c Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/1517061 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_api.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 6202fe91..21ac36b4 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -30,6 +30,8 @@
extern "C" {
#endif /* __cplusplus */
+struct vb2_context;
+
/*****************************************************************************/
/* Error codes */
@@ -319,7 +321,8 @@ typedef struct VbSelectAndLoadKernelParams {
*
* Returns VBERROR_SUCCESS if success, non-zero if error; on error, caller
* should reboot. */
-VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
+VbError_t VbSelectAndLoadKernel(struct vb2_context *ctx,
+ VbCommonParams *cparams,
VbSelectAndLoadKernelParams *kparams);
/**
@@ -331,6 +334,7 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
* override to allow full fastboot functionality, it checks image integrity, but
* does not check the image signature.
*
+ * @param ctx Vboot context
* @param cparams Common parameters, e.g. use member caller_context
* to point to useful context data
* @param kparams kernel params
@@ -338,7 +342,8 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
* @param image_size Size of the image in memory
* @return VBERROR_... error, VBERROR_SUCCESS on success.
*/
-VbError_t VbVerifyMemoryBootImage(VbCommonParams *cparams,
+VbError_t VbVerifyMemoryBootImage(struct vb2_context *ctx,
+ VbCommonParams *cparams,
VbSelectAndLoadKernelParams *kparams,
void *boot_image,
size_t image_size);