diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-02 14:31:34 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-07-02 14:31:34 +0000 |
commit | 3475187dd814be9b27c4632b59c1e3c76d966d63 (patch) | |
tree | d9936e5d6491dfd61627ab5c0134eb8910caa98d /vl.c | |
parent | 8979b2277d92d0acd0fd3be523a7515f86f79bec (diff) |
sparc64 marge (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1462 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -2375,12 +2375,14 @@ void cpu_save(QEMUFile *f, void *opaque) qemu_put_betls(f, &env->y); tmp = GET_PSR(env); qemu_put_be32(f, tmp); - qemu_put_be32s(f, &env->fsr); + qemu_put_betls(f, &env->fsr); + qemu_put_betls(f, &env->tbr); +#ifndef TARGET_SPARC64 qemu_put_be32s(f, &env->wim); - qemu_put_be32s(f, &env->tbr); /* MMU */ for(i = 0; i < 16; i++) qemu_put_be32s(f, &env->mmuregs[i]); +#endif } int cpu_load(QEMUFile *f, void *opaque, int version_id) @@ -2411,13 +2413,14 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) env->cwp = 0; /* needed to ensure that the wrapping registers are correctly updated */ PUT_PSR(env, tmp); - qemu_get_be32s(f, &env->fsr); + qemu_get_betls(f, &env->fsr); + qemu_get_betls(f, &env->tbr); +#ifndef TARGET_SPARC64 qemu_get_be32s(f, &env->wim); - qemu_get_be32s(f, &env->tbr); /* MMU */ for(i = 0; i < 16; i++) qemu_get_be32s(f, &env->mmuregs[i]); - +#endif tlb_flush(env, 1); return 0; } @@ -2577,6 +2580,7 @@ typedef struct QEMUResetEntry { static QEMUResetEntry *first_reset_entry; static int reset_requested; static int shutdown_requested; +static int powerdown_requested; void qemu_register_reset(QEMUResetHandler *func, void *opaque) { @@ -2614,6 +2618,12 @@ void qemu_system_shutdown_request(void) cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); } +void qemu_system_powerdown_request(void) +{ + powerdown_requested = 1; + cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); +} + static void main_cpu_reset(void *opaque) { #if defined(TARGET_I386) || defined(TARGET_SPARC) @@ -2728,20 +2738,25 @@ int main_loop(void) if (vm_running) { ret = cpu_exec(env); if (shutdown_requested) { - ret = EXCP_INTERRUPT; + ret = EXCP_INTERRUPT; break; } if (reset_requested) { reset_requested = 0; qemu_system_reset(); - ret = EXCP_INTERRUPT; + ret = EXCP_INTERRUPT; + } + if (powerdown_requested) { + powerdown_requested = 0; + qemu_system_powerdown(); + ret = EXCP_INTERRUPT; } if (ret == EXCP_DEBUG) { vm_stop(EXCP_DEBUG); } /* if hlt instruction, we wait until the next IRQ */ /* XXX: use timeout computed from timers */ - if (ret == EXCP_HLT) + if (ret == EXCP_HLT) timeout = 10; else timeout = 0; @@ -3044,8 +3059,12 @@ void register_machines(void) qemu_register_machine(&core99_machine); qemu_register_machine(&prep_machine); #elif defined(TARGET_SPARC) +#ifdef TARGET_SPARC64 + qemu_register_machine(&sun4u_machine); +#else qemu_register_machine(&sun4m_machine); #endif +#endif } #define NET_IF_TUN 0 |