Commit fe3d7285 authored by Ralf Baechle's avatar Ralf Baechle

[MIPS] Qemu: Accept kernel command line passed by the Emulator.

    
From Daniel Jacobowitz <dan@debian.org>.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e76beeeb
#include <linux/init.h>
#include <linux/string.h>
#include <asm/addrspace.h>
#include <asm/bootinfo.h>
void __init prom_init(void)
{
add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM);
int *cmdline;
cmdline = (int *) (CKSEG0 + (0x10 << 20) - 260);
if (*cmdline == 0x12345678) {
if (*(char *)(cmdline + 1))
strcpy (arcs_cmdline, (char *)(cmdline + 1));
add_memory_region(0x0<<20, cmdline[-1], BOOT_MEM_RAM);
} else {
add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment