Message ID | 20191218044911.26983-3-jniethe5@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | A few kernel loading tidy ups | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
diff --git a/core/init.c b/core/init.c index 80222c6a9fc6..5e9306126204 100644 --- a/core/init.c +++ b/core/init.c @@ -397,8 +397,7 @@ static bool load_kernel(void) sync_icache(); } /* Hack for STB in Mambo, assume at least 4kb in mem */ - if (!kernel_size) - kernel_size = SECURE_BOOT_HEADERS_SIZE; + kernel_size = SECURE_BOOT_HEADERS_SIZE; if (stb_is_container((void *)kernel_entry, kernel_size)) { stb_container = (void *)kernel_entry; kh = (struct elf_hdr *) (kernel_entry + SECURE_BOOT_HEADERS_SIZE);
At the point of checking if the DT has a kernel-base-address that should be used for loading the kernel from, kernel_size might already have a value (e.g., from the embedded kernel). There is no connection between this size and the size of the preloaded kernel whose address is in the DT - so simply always set the preloaded kernel size to SECURE_BOOT_HEADERS_SIZE. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> --- core/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)