Skip to content
Snippets Groups Projects
Commit 2f462816 authored by Jocelyn Mayer's avatar Jocelyn Mayer
Browse files

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
parent e494ead5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment