summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2019-03-25 15:29:28 +1100
committerStewart Smith <stewart@linux.ibm.com>2019-03-28 15:24:12 +1100
commit8d8a9ca30453bc92977409966e6006f8c18f4be5 (patch)
treedf24e006fc9f4900c1578336ae31a0ec65650836 /core
parentcccf5d79de07844cf095b8f45146b92944d15c2e (diff)
downloadtalos-skiboot-8d8a9ca30453bc92977409966e6006f8c18f4be5.tar.gz
talos-skiboot-8d8a9ca30453bc92977409966e6006f8c18f4be5.zip
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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c
index 29a6bf49..eeee2d9e 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) {
OpenPOWER on IntegriCloud