aboutsummaryrefslogtreecommitdiff
path: root/hw/sun4m.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r--hw/sun4m.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 7174c23cb5..3ac0886a40 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -210,12 +210,19 @@ void qemu_system_powerdown(void)
slavio_set_power_fail(slavio_misc, 1);
}
+static void main_cpu_reset(void *opaque)
+{
+ CPUState *env = opaque;
+ cpu_reset(env);
+}
+
/* Sun4m hardware initialisation */
static void sun4m_init(int ram_size, int vga_ram_size, int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename)
{
+ CPUState *env;
char buf[1024];
int ret, linux_boot;
unsigned int i;
@@ -223,6 +230,10 @@ static void sun4m_init(int ram_size, int vga_ram_size, int boot_device,
linux_boot = (kernel_filename != NULL);
+ env = cpu_init();
+ register_savevm("cpu", 0, 3, cpu_save, cpu_load, env);
+ qemu_register_reset(main_cpu_reset, env);
+
/* allocate RAM */
cpu_register_physical_memory(0, ram_size, 0);