diff options
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 2be3e938..5d4c7c09 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -261,6 +261,7 @@ static VbError_t vb2_kernel_setup(struct vb2_context *ctx, vb2_nv_init(ctx); struct vb2_shared_data *sd = vb2_get_sd(ctx); + struct vb2_gbb_header *gbb = vb2_get_gbb(ctx); sd->recovery_reason = shared->recovery_reason; /* @@ -294,11 +295,6 @@ static VbError_t vb2_kernel_setup(struct vb2_context *ctx, kparams->flags = 0; memset(kparams->partition_guid, 0, sizeof(kparams->partition_guid)); - /* Point to GBB data from cparams */ - sd->gbb = cparams->gbb_data; - sd->gbb_size = cparams->gbb_size; - sd->gbb_flags = sd->gbb->flags; - /* Read kernel version from the TPM. Ignore errors in recovery mode. */ if (RollbackKernelRead(&shared->kernel_version_tpm)) { VB2_DEBUG("Unable to get kernel versions from TPM\n"); @@ -311,7 +307,7 @@ static VbError_t vb2_kernel_setup(struct vb2_context *ctx, shared->kernel_version_tpm_start = shared->kernel_version_tpm; /* Read FWMP. Ignore errors in recovery mode. */ - if (sd->gbb_flags & VB2_GBB_FLAG_DISABLE_FWMP) { + if (gbb->flags & VB2_GBB_FLAG_DISABLE_FWMP) { memset(&fwmp, 0, sizeof(fwmp)); } else if (RollbackFwmpRead(&fwmp)) { VB2_DEBUG("Unable to get FWMP from TPM\n"); @@ -473,6 +469,7 @@ VbError_t VbVerifyMemoryBootImage( goto fail; struct vb2_shared_data *sd = vb2_get_sd(ctx); + struct vb2_gbb_header *gbb = vb2_get_gbb(ctx); VbSharedDataHeader *shared = sd->vbsd; if ((boot_image == NULL) || (image_size == 0)) { @@ -495,7 +492,7 @@ VbError_t VbVerifyMemoryBootImage( vb2_nv_get(ctx, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP); if (0 == allow_fastboot_full_cap) { - allow_fastboot_full_cap = !!(sd->gbb_flags & + allow_fastboot_full_cap = !!(gbb->flags & VB2_GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP); } |