]> Git Repo - qemu.git/commitdiff
target-ppc: Init dcache and icache size for e500 user mode
authorMeador Inge <[email protected]>
Tue, 10 Apr 2012 20:04:23 +0000 (15:04 -0500)
committerAndreas Färber <[email protected]>
Sun, 15 Apr 2012 16:09:04 +0000 (18:09 +0200)
commit f7aa558396dd0f6b7a2b22c05cb503c655854102 pulled the dcache and icache
line size initialization inside of a '#if !defined(CONFIG_USER_ONLY)' block.
This is not correct because instructions like 'dcbz' need the dcache size
initialized even for user mode.

Signed-off-by: Meador Inge <[email protected]>
Cc: Varun Sethi <[email protected]>
[AF: Simplify #ifdefs by using cache line size 32 for *-user as before]
Suggested-by: Scott Wood <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
target-ppc/translate_init.c

index fdc0a5ff083b94ae94968f8aca61aa5b830e6dbc..ba4b84d86b80a1de18ba9c47d0d9791162632f98 100644 (file)
@@ -4462,7 +4462,10 @@ static void init_proc_e500 (CPUPPCState *env, int version)
                  &spr_read_spefscr, &spr_write_spefscr,
                  0x00000000);
     /* Memory management */
-#if !defined(CONFIG_USER_ONLY)
+#if defined(CONFIG_USER_ONLY)
+    env->dcache_line_size = 32;
+    env->icache_line_size = 32;
+#else /* !defined(CONFIG_USER_ONLY) */
     env->nb_pids = 3;
     env->nb_ways = 2;
     env->id_tlbs = 0;
This page took 0.037135 seconds and 4 git commands to generate.