diff options
-rw-r--r-- | target-ppc/op_helper_mem.h | 2 | ||||
-rw-r--r-- | target-ppc/translate_init.c | 24 |
2 files changed, 23 insertions, 3 deletions
diff --git a/target-ppc/op_helper_mem.h b/target-ppc/op_helper_mem.h index f5cb6970c4..4b0bb841e5 100644 --- a/target-ppc/op_helper_mem.h +++ b/target-ppc/op_helper_mem.h @@ -324,7 +324,7 @@ void glue(do_dcbz_64, MEMSUFFIX) (void) int dcache_line_size = env->dcache_line_size; /* XXX: should be 970 specific (?) */ - if (((env->spr[SPR_970_HID5] >> 7) & 0x3) == 1) + if (((env->spr[SPR_970_HID5] >> 6) & 0x3) == 0x2) dcache_line_size = 32; glue(stl, MEMSUFFIX)((uint64_t)(T0 + 0x00), 0); glue(stl, MEMSUFFIX)((uint64_t)(T0 + 0x04), 0); diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 445cb58186..606a04f254 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -4063,6 +4063,16 @@ static void init_proc_970 (CPUPPCState *env) SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); + /* XXX : not implemented */ + spr_register(env, SPR_970_HID5, "HID5", + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_generic, +#if defined(CONFIG_USER_ONLY) + 0x00000080 +#else + 0x00000000 +#endif + ); /* Memory management */ /* XXX: not correct */ gen_low_BATs(env); @@ -4116,7 +4126,12 @@ static void init_proc_970FX (CPUPPCState *env) spr_register(env, SPR_970_HID5, "HID5", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, - 0x00000000); +#if defined(CONFIG_USER_ONLY) + 0x00000080 +#else + 0x00000000 +#endif + ); /* Memory management */ /* XXX: not correct */ gen_low_BATs(env); @@ -4170,7 +4185,12 @@ static void init_proc_970GX (CPUPPCState *env) spr_register(env, SPR_970_HID5, "HID5", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, - 0x00000000); +#if defined(CONFIG_USER_ONLY) + 0x00000080 +#else + 0x00000000 +#endif + ); /* Memory management */ /* XXX: not correct */ gen_low_BATs(env); |