提交 e57448f1 编写于 作者: J j_mayer

More cache tuning fixes:

* fix the tunable cache line size probe for PowerPC 970.
* initialize HID5 so cache line is 32 bytes long when running in user-mode only


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3322 c046a42c-6fe2-441c-8c8c-71466251a162
上级 d63001d1
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册