summaryrefslogtreecommitdiff
path: root/target-ppc/helper_regs.h
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-25 23:14:50 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-25 23:14:50 +0000
commit2f462816ac343a804d51e157dad6b5d91426d3e1 (patch)
tree1453c7e3d2b44b151f5a81a319a94acf44e6cef4 /target-ppc/helper_regs.h
parente494ead52114e9d7baa9f33bca0e5b15b577c16b (diff)
downloadqemu-2f462816ac343a804d51e157dad6b5d91426d3e1.tar.gz
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
Diffstat (limited to 'target-ppc/helper_regs.h')
-rw-r--r--target-ppc/helper_regs.h25
1 files changed, 2 insertions, 23 deletions
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;
}