summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_api_kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r--firmware/lib/vboot_api_kernel.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 9135085e..9202c6b8 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -68,7 +68,7 @@ uint32_t vb2_get_fwmp_flags(void)
uint32_t VbTryLoadKernel(struct vb2_context *ctx, uint32_t get_info_flags)
{
- VbError_t retval = VBERROR_UNKNOWN;
+ vb2_error_t retval = VBERROR_UNKNOWN;
VbDiskInfo* disk_info = NULL;
uint32_t disk_count = 0;
uint32_t i;
@@ -175,7 +175,7 @@ static int vb2_reset_nv_requests(struct vb2_context *ctx)
return need_reboot;
}
-VbError_t VbBootNormal(struct vb2_context *ctx)
+vb2_error_t VbBootNormal(struct vb2_context *ctx)
{
struct vb2_shared_data *sd = vb2_get_sd(ctx);
VbSharedDataHeader *shared = sd->vbsd;
@@ -190,7 +190,7 @@ VbError_t VbBootNormal(struct vb2_context *ctx)
return VBERROR_REBOOT_REQUIRED;
}
- VbError_t rv = VbTryLoadKernel(ctx, VB_DISK_FLAG_FIXED);
+ vb2_error_t rv = VbTryLoadKernel(ctx, VB_DISK_FLAG_FIXED);
VB2_DEBUG("Checking if TPM kernel version needs advancing\n");
@@ -248,9 +248,9 @@ VbError_t VbBootNormal(struct vb2_context *ctx)
return rv;
}
-static VbError_t vb2_kernel_setup(struct vb2_context *ctx,
- VbSharedDataHeader *shared,
- VbSelectAndLoadKernelParams *kparams)
+static vb2_error_t vb2_kernel_setup(struct vb2_context *ctx,
+ VbSharedDataHeader *shared,
+ VbSelectAndLoadKernelParams *kparams)
{
if (VB2_SUCCESS != vb2_init_context(ctx)) {
VB2_DEBUG("Can't init vb2_context\n");
@@ -346,8 +346,8 @@ static VbError_t vb2_kernel_setup(struct vb2_context *ctx,
return VBERROR_SUCCESS;
}
-static VbError_t vb2_kernel_phase4(struct vb2_context *ctx,
- VbSelectAndLoadKernelParams *kparams)
+static vb2_error_t vb2_kernel_phase4(struct vb2_context *ctx,
+ VbSelectAndLoadKernelParams *kparams)
{
struct vb2_shared_data *sd = vb2_get_sd(ctx);
@@ -385,12 +385,11 @@ static void vb2_kernel_cleanup(struct vb2_context *ctx)
sd->vbsd->timer_vb_select_and_load_kernel_exit = VbExGetTimer();
}
-VbError_t VbSelectAndLoadKernel(
- struct vb2_context *ctx,
- VbSharedDataHeader *shared,
- VbSelectAndLoadKernelParams *kparams)
+vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx,
+ VbSharedDataHeader *shared,
+ VbSelectAndLoadKernelParams *kparams)
{
- VbError_t retval = vb2_kernel_setup(ctx, shared, kparams);
+ vb2_error_t retval = vb2_kernel_setup(ctx, shared, kparams);
if (retval)
goto VbSelectAndLoadKernel_exit;
@@ -459,10 +458,10 @@ VbError_t VbSelectAndLoadKernel(
return retval;
}
-VbError_t VbVerifyMemoryBootImage(
- struct vb2_context *ctx, VbSharedDataHeader *shared,
- VbSelectAndLoadKernelParams *kparams, void *boot_image,
- size_t image_size)
+vb2_error_t VbVerifyMemoryBootImage(struct vb2_context *ctx,
+ VbSharedDataHeader *shared,
+ VbSelectAndLoadKernelParams *kparams,
+ void *boot_image, size_t image_size)
{
struct vb2_packed_key *kernel_subkey = NULL;
uint8_t *kbuf;
@@ -473,7 +472,7 @@ VbError_t VbVerifyMemoryBootImage(
int dev_switch;
uint32_t allow_fastboot_full_cap = 0;
struct vb2_workbuf wb;
- VbError_t retval;
+ vb2_error_t retval;
int rv;
/* Allocate work buffer */
@@ -615,7 +614,7 @@ VbError_t VbVerifyMemoryBootImage(
return retval;
}
-VbError_t VbUnlockDevice(void)
+vb2_error_t VbUnlockDevice(void)
{
VB2_DEBUG("Enabling dev-mode...\n");
if (TPM_SUCCESS != SetVirtualDevMode(1))