summaryrefslogtreecommitdiffstats
path: root/hw/sun4u.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
commitc68ea7043f2ed4c631d1e3a4f35afe247d5ca063 (patch)
tree64b42bfd3fe62caf019e384cee26e80b98da831d /hw/sun4u.c
parent173d6cfe5129301a3a8f2570223aaa47a815f343 (diff)
downloadhqemu-c68ea7043f2ed4c631d1e3a4f35afe247d5ca063.zip
hqemu-c68ea7043f2ed4c631d1e3a4f35afe247d5ca063.tar.gz
cpu_single_env usage fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r--hw/sun4u.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 40d70a9..51db1f9 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -235,6 +235,12 @@ void qemu_system_powerdown(void)
{
}
+static void main_cpu_reset(void *opaque)
+{
+ CPUState *env = opaque;
+ cpu_reset(env);
+}
+
static const int ide_iobase[2] = { 0x1f0, 0x170 };
static const int ide_iobase2[2] = { 0x3f6, 0x376 };
static const int ide_irq[2] = { 14, 15 };
@@ -253,6 +259,7 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename)
{
+ CPUState *env;
char buf[1024];
m48t59_t *nvram;
int ret, linux_boot;
@@ -262,6 +269,10 @@ static void sun4u_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);
OpenPOWER on IntegriCloud