diff options
Diffstat (limited to 'hw/r2d.c')
-rw-r--r-- | hw/r2d.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -22,20 +22,30 @@ * THE SOFTWARE. */ -#include "vl.h" +#include "hw.h" +#include "sh.h" +#include "sysemu.h" +#include "boards.h" #define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */ #define SDRAM_SIZE 0x04000000 -void r2d_init(int ram_size, int vga_ram_size, int boot_device, - DisplayState * ds, const char **fd_filename, int snapshot, +static void r2d_init(int ram_size, int vga_ram_size, + const char *boot_device, DisplayState * ds, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { CPUState *env; struct SH7750State *s; - env = cpu_init(); + if (!cpu_model) + cpu_model = "any"; + + env = cpu_init(cpu_model); + if (!env) { + fprintf(stderr, "Unable to find CPU definition\n"); + exit(1); + } /* Allocate memory space */ cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, 0); |