diff options
author | Russell Currey <ruscur@russell.cc> | 2019-03-25 15:29:28 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-03-28 15:24:12 +1100 |
commit | 8d8a9ca30453bc92977409966e6006f8c18f4be5 (patch) | |
tree | df24e006fc9f4900c1578336ae31a0ec65650836 /core | |
parent | cccf5d79de07844cf095b8f45146b92944d15c2e (diff) | |
download | skiboot-8d8a9ca30453bc92977409966e6006f8c18f4be5.zip skiboot-8d8a9ca30453bc92977409966e6006f8c18f4be5.tar.gz skiboot-8d8a9ca30453bc92977409966e6006f8c18f4be5.tar.bz2 |
external/mambo: Populate kernel-base-address in the DT
skiboot.tcl defines PAYLOAD_ADDR as 0x20000000, which is the default in
skiboot. This is also the default in skiboot unless kernel-base-address
is set in the device tree.
If you change PAYLOAD_ADDR to something else for mambo, skiboot won't
see it because it doesn't set that DT property, so fix it so that it does.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Acked-by: Michael Neuling <mikey@neuling.org>
[stewart: fix up mambo hacks for STB]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c index 29a6bf4..eeee2d9 100644 --- a/core/init.c +++ b/core/init.c @@ -387,6 +387,15 @@ static bool load_kernel(void) cpu_set_sreset_enable(false); memcpy(NULL, old_vectors, EXCEPTION_VECTORS_END); sync_icache(); + } else { + /* Hack for STB in Mambo, assume at least 4kb in mem */ + if (!kernel_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); + } else + kh = (struct elf_hdr *) (kernel_entry); } } else { if (!kernel_size) { |