diff options
Diffstat (limited to 'firmware/lib/vboot_kernel.c')
-rw-r--r-- | firmware/lib/vboot_kernel.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c index 722b74de..8118599d 100644 --- a/firmware/lib/vboot_kernel.c +++ b/firmware/lib/vboot_kernel.c @@ -439,7 +439,6 @@ vb2_error_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params) { struct vb2_shared_data *sd = vb2_get_sd(ctx); struct vb2_workbuf wb; - VbSharedDataHeader *shared = sd->vbsd; VbSharedDataKernelCall shcall; int found_partitions = 0; uint32_t lowest_version = LOWEST_TPM_VERSION; @@ -543,7 +542,7 @@ vb2_error_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params) kernel_subkey, lpflags, params, - shared->kernel_version_tpm, + sd->kernel_version, shpart, &wb); VbExStreamClose(stream); @@ -611,7 +610,7 @@ vb2_error_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params) * Otherwise, we'll check all the other headers to see if they * contain a newer key. */ - if (shpart->combined_version == shared->kernel_version_tpm) { + if (shpart->combined_version == sd->kernel_version) { VB2_DEBUG("Same kernel version\n"); break; } @@ -625,7 +624,6 @@ gpt_done: if (params->partition_number > 0) { VB2_DEBUG("Good partition %d\n", params->partition_number); shcall.check_result = VBSD_LKC_CHECK_GOOD_PARTITION; - shared->kernel_version_lowest = lowest_version; /* * Sanity check - only store a new TPM version if we found one. * If lowest_version is still at its initial value, we didn't @@ -633,8 +631,8 @@ gpt_done: * didn't look. */ if (lowest_version != LOWEST_TPM_VERSION && - lowest_version > shared->kernel_version_tpm) - shared->kernel_version_tpm = lowest_version; + lowest_version > sd->kernel_version) + sd->kernel_version = lowest_version; /* Success! */ rv = VB2_SUCCESS; |