From b57d9505c0922c565d82b82b6229e80adb36cc6f Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 27 Oct 2016 13:01:33 -0700 Subject: vboot: Clean up headers Minor tidying; no functional changes. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I44c816de67025b83c9e46db54fb5427c684bbfef Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/404921 Reviewed-by: Stefan Reinauer --- firmware/2lib/include/2misc.h | 2 +- firmware/include/vboot_api.h | 100 +++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/firmware/2lib/include/2misc.h b/firmware/2lib/include/2misc.h index f562fade..d937b8df 100644 --- a/firmware/2lib/include/2misc.h +++ b/firmware/2lib/include/2misc.h @@ -68,7 +68,7 @@ void vb2_fail(struct vb2_context *ctx, uint8_t reason, uint8_t subcode); * Set up the verified boot context data, if not already set up. * * This uses ctx->workbuf_used=0 as a flag to indicate that the data has not - * yet been set up. Caller must set that before calling any voot functions; + * yet been set up. Caller must set that before calling any vboot functions; * see 2api.h. * * @param ctx Vboot context to initialize diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index 950c1e22..cfb1d7ef 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -372,6 +372,56 @@ typedef struct VbSelectAndLoadKernelParams { VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams, VbSelectAndLoadKernelParams *kparams); +/** + * Verify Kernel Image loaded in memory. + * + * This routine is used by fastboot boot command to verify the kernel image in + * memory sent by the host device using fastboot protocol. It checks if the + * image in memory is signed using official recovery keys. In case of GBB + * override to allow full fastboot functionality, it checks image integrity, but + * does not check the image signature. + * + * @param cparams Common parameters, e.g. use member caller_context + * to point to useful context data + * @param kparams kernel params + * @param boot_image Image in memory that needs to be verified + * @param image_size Size of the image in memory + * @return VBERROR_... error, VBERROR_SUCCESS on success. + */ +VbError_t VbVerifyMemoryBootImage(VbCommonParams *cparams, + VbSelectAndLoadKernelParams *kparams, + void *boot_image, + size_t image_size); + +/** + * Fastboot API to enter dev mode. + * + * This routine is used by fastboot oem unlock command to switch the device into + * dev mode. + * + * NOTE: The caller MUST be in read-only firmware, and MUST have just obtained + * explicit physical confirmation from the user via a trusted input method + * before calling this function! Also, on successful return from this function, + * the caller needs to reboot the device immediately for changes to take effect. + * + * @return VBERROR_... error, VBERROR_SUCCESS on success. + */ +VbError_t VbUnlockDevice(void); + +/** + * Fastboot API to enter normal mode. + * + * This routine is used by fastboot oem lock command to switch the device into + * normal mode. + * + * NOTE: On successful return from this function, the caller needs to reboot the + * device immediately for changes to take effect. This routine just stores a + * request, which will be handled by RO firmware on next reboot. + * + * @return VBERROR_... error, VBERROR_SUCCESS on success. + */ +VbError_t VbLockDevice(void); + /*****************************************************************************/ /* Debug output (from utility.h) */ @@ -995,56 +1045,6 @@ VbError_t VbExRegionRead(VbCommonParams *cparams, enum vb_firmware_region region, uint32_t offset, uint32_t size, void *buf); -/** - * Verify Kernel Image loaded in memory. - * - * This routine is used by fastboot boot command to verify the kernel image in - * memory sent by the host device using fastboot protocol. It checks if the - * image in memory is signed using official recovery keys. In case of GBB - * override to allow full fastboot functionality, it checks image integrity, but - * does not check the image signature. - * - * @param cparams Common parameters, e.g. use member caller_context - * to point to useful context data - * @param kparams kernel params - * @param boot_image Image in memory that needs to be verified - * @param image_size Size of the image in memory - * @return VBERROR_... error, VBERROR_SUCCESS on success. - */ -VbError_t VbVerifyMemoryBootImage(VbCommonParams *cparams, - VbSelectAndLoadKernelParams *kparams, - void *boot_image, - size_t image_size); - -/** - * Fastboot API to enter dev mode. - * - * This routine is used by fastboot oem unlock command to switch the device into - * dev mode. - * - * NOTE: The caller MUST be in read-only firmware, and MUST have just obtained - * explicit physical confirmation from the user via a trusted input method - * before calling this function! Also, on successful return from this function, - * the caller needs to reboot the device immediately for changes to take effect. - * - * @return VBERROR_... error, VBERROR_SUCCESS on success. - */ -VbError_t VbUnlockDevice(void); - -/** - * Fastboot API to enter normal mode. - * - * This routine is used by fastboot oem lock command to switch the device into - * normal mode. - * - * NOTE: On successful return from this function, the caller needs to reboot the - * device immediately for changes to take effect. This routine just stores a - * request, which will be handled by RO firmware on next reboot. - * - * @return VBERROR_... error, VBERROR_SUCCESS on success. - */ -VbError_t VbLockDevice(void); - /** * Check if the firmware wants to override GPT entry priority. * -- cgit v1.2.1