2005-09-04 06:56:11 +08:00
|
|
|
#include <linux/init.h>
|
2005-11-28 21:15:08 +08:00
|
|
|
#include <linux/string.h>
|
|
|
|
#include <asm/addrspace.h>
|
2005-09-04 06:56:11 +08:00
|
|
|
#include <asm/bootinfo.h>
|
2007-11-04 12:49:44 +08:00
|
|
|
#include <asm/io.h>
|
|
|
|
|
|
|
|
#define QEMU_PORT_BASE 0xb4000000
|
2005-09-04 06:56:11 +08:00
|
|
|
|
|
|
|
void __init prom_init(void)
|
|
|
|
{
|
2005-11-28 21:15:08 +08:00
|
|
|
int *cmdline;
|
|
|
|
|
|
|
|
cmdline = (int *) (CKSEG0 + (0x10 << 20) - 260);
|
|
|
|
if (*cmdline == 0x12345678) {
|
|
|
|
if (*(char *)(cmdline + 1))
|
2007-10-12 06:46:15 +08:00
|
|
|
strcpy(arcs_cmdline, (char *)(cmdline + 1));
|
2005-11-28 21:15:08 +08:00
|
|
|
add_memory_region(0x0<<20, cmdline[-1], BOOT_MEM_RAM);
|
|
|
|
} else {
|
|
|
|
add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM);
|
|
|
|
}
|
2007-11-04 12:49:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
set_io_port_base(QEMU_PORT_BASE);
|
2005-09-04 06:56:11 +08:00
|
|
|
}
|