summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-19 17:44:56 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-20 16:09:48 +1000
commit817c21ad9a1f00926f080265493923ada3458c63 (patch)
tree84733af08a403e6f1c1846a2e9a21cf49276660d /arch/powerpc/kernel/prom_init.c
parent27f4488872d9ef2a4b9aa2be58fb0789d6c0ba84 (diff)
downloadblackbird-op-linux-817c21ad9a1f00926f080265493923ada3458c63.tar.gz
blackbird-op-linux-817c21ad9a1f00926f080265493923ada3458c63.zip
powerpc/powernv: Get kernel command line accross OPAL takeover
We stash it in boot_command_line which isn't in BSS and so won't be overwritten. We then use that as a default cmd_line before we walk the device-tree. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 9369287aa8c2..e3f390427216 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1449,6 +1449,10 @@ static void prom_opal_takeover(void)
opal_addr = top_addr;
args->hal_addr = opal_addr;
+ /* Copy the command line to the kernel image */
+ strlcpy(RELOC(boot_command_line), RELOC(prom_cmd_line),
+ COMMAND_LINE_SIZE);
+
prom_debug(" k_image = 0x%lx\n", args->k_image);
prom_debug(" k_size = 0x%lx\n", args->k_size);
prom_debug(" k_entry = 0x%lx\n", args->k_entry);
OpenPOWER on IntegriCloud