aboutsummaryrefslogtreecommitdiff
path: root/hw/r2d.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/r2d.c')
-rw-r--r--hw/r2d.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index 33d03cbbf..b6cc31c54 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -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);