summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/include/load_kernel_fw.h3
-rw-r--r--firmware/include/vboot_struct.h2
-rw-r--r--firmware/lib/vboot_kernel.c8
-rw-r--r--utility/load_kernel_test.c4
4 files changed, 4 insertions, 13 deletions
diff --git a/firmware/include/load_kernel_fw.h b/firmware/include/load_kernel_fw.h
index 406691ff..0040e56d 100644
--- a/firmware/include/load_kernel_fw.h
+++ b/firmware/include/load_kernel_fw.h
@@ -20,7 +20,8 @@
#define BOOT_FLAG_DEVELOPER UINT64_C(0x01)
/* In recovery mode */
#define BOOT_FLAG_RECOVERY UINT64_C(0x02)
-/* Skip check of kernel buffer address */
+/* Skip check of kernel buffer address. Since body load address check is
+ * omitted; this flag is deprecated and not used anywhere in the codebase. */
#define BOOT_FLAG_SKIP_ADDR_CHECK UINT64_C(0x04)
typedef struct LoadKernelParams {
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index 3374d4cc..48a4f6b1 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -232,6 +232,8 @@ typedef struct VbKernelPreambleHeader {
#define VBSD_LKP_CHECK_VERIFY_PREAMBLE 9
#define VBSD_LKP_CHECK_KERNEL_ROLLBACK 10
#define VBSD_LKP_CHECK_PREAMBLE_VALID 11
+/* Body load address check is omitted; this result code is deprecated and not
+ * used anywhere in the codebase. */
#define VBSD_LKP_CHECK_BODY_ADDRESS 12
#define VBSD_LKP_CHECK_BODY_OFFSET 13
#define VBSD_LKP_CHECK_SELF_SIGNED 14
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 8a138242..9573e6ec 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -401,14 +401,6 @@ VbError_t LoadKernel(LoadKernelParams* params) {
if (-1 != good_partition)
continue;
- /* Verify body load address matches what we expect */
- if ((preamble->body_load_address != (size_t)params->kernel_buffer) &&
- !(params->boot_flags & BOOT_FLAG_SKIP_ADDR_CHECK)) {
- VBDEBUG(("Wrong body load address.\n"));
- shpart->check_result = VBSD_LKP_CHECK_BODY_ADDRESS;
- goto bad_kernel;
- }
-
/* Verify kernel body starts at a multiple of the sector size. */
body_offset = key_block->key_block_size + preamble->preamble_size;
if (0 != body_offset % blba) {
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index c36c3357..f5585c38 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -190,10 +190,6 @@ int main(int argc, char* argv[]) {
/* Free the key blob, now that we're done with it */
free(key_blob);
- /* Needs to skip the address check, since we're putting it somewhere on the
- * heap instead of its actual target address in the firmware. */
- lkp.boot_flags |= BOOT_FLAG_SKIP_ADDR_CHECK;
-
printf("bootflags = %" PRIu64 "\n", lkp.boot_flags);
/* Get image size */