Skip to content

Commit

Permalink
[MIPS] Qemu: Accept kernel command line passed by the Emulator.
Browse files Browse the repository at this point in the history
    
From Daniel Jacobowitz <dan@debian.org>.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Dec 1, 2005
1 parent e76beee commit fe3d728
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/mips/qemu/q-firmware.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#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);
}
}

0 comments on commit fe3d728

Please sign in to comment.