]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
More cache tuning fixes:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 4 Oct 2007 01:50:03 +0000 (01:50 +0000)
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 4 Oct 2007 01:50:03 +0000 (01:50 +0000)
* 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

target-ppc/op_helper_mem.h
target-ppc/translate_init.c

index f5cb6970c419a031cf0d5784c9081d6f58723178..4b0bb841e573ae80a5d841ef08fef0cfa7b0412a 100644 (file)
@@ -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);
index 445cb58186dd28c15610748ddb78bf44d2a7d140..606a04f254689fb12c3a0fec4da521b6399078f5 100644 (file)
@@ -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);