From 2f462816ac343a804d51e157dad6b5d91426d3e1 Mon Sep 17 00:00:00 2001 From: j_mayer Date: Thu, 25 Oct 2007 23:14:50 +0000 Subject: Implement power-management for all defined PowerPC CPUs. Fix PowerPC 970MP definition. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3440 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-ppc/helper_regs.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'target-ppc/helper_regs.h') diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h index 75a3dddd52..2a5de2ed15 100644 --- a/target-ppc/helper_regs.h +++ b/target-ppc/helper_regs.h @@ -82,7 +82,7 @@ static always_inline void hreg_compute_hflags (CPUPPCState *env) static always_inline int hreg_store_msr (CPUPPCState *env, target_ulong value) { - int enter_pm, excp; + int excp; excp = 0; value &= env->msr_mask; @@ -106,30 +106,9 @@ static always_inline int hreg_store_msr (CPUPPCState *env, target_ulong value) #endif env->msr = value; hreg_compute_hflags(env); - enter_pm = 0; #if !defined (CONFIG_USER_ONLY) if (unlikely(msr_pow == 1)) { - switch (env->excp_model) { - case POWERPC_EXCP_603: - case POWERPC_EXCP_603E: - case POWERPC_EXCP_G2: - /* Don't handle SLEEP mode: we should disable all clocks... - * No dynamic power-management. - */ - if ((env->spr[SPR_HID0] & 0x00C00000) != 0) - enter_pm = 1; - break; - case POWERPC_EXCP_604: - enter_pm = 1; - break; - case POWERPC_EXCP_7x0: - if ((env->spr[SPR_HID0] & 0x00E00000) != 0) - enter_pm = 1; - break; - default: - break; - } - if (enter_pm) { + if ((*env->check_pow)(env)) { env->halted = 1; excp = EXCP_HALTED; } -- cgit v1.2.3