]> git.proxmox.com Git - mirror_qemu.git/commitdiff
arm: cortex-a9: Fix cache-line size and associativity
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Tue, 19 Aug 2014 17:56:27 +0000 (18:56 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 19 Aug 2014 18:02:40 +0000 (19:02 +0100)
For A9, The cache associativity is 4 and the lines size is 32B.
Self identify in CCSIDR accordingly. Cache size remains at 16k.

QEMU doesn't emulate caches, but we should still report the correct
cache-line size to the guest. Some guests (like u-boot) complain if
the cache-line size mismatches a requested flush or invalidate
operation.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1de6bd40155a1d2f2e93e24b1b1d1d677a432641.1408346233.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/cpu.c

index e27cca28be51af679e688ce94194db17f6dffafe..8199f32e32679514e774bbb2c403269a3140c987 100644 (file)
@@ -715,8 +715,8 @@ static void cortex_a9_initfn(Object *obj)
     cpu->id_isar4 = 0x00111142;
     cpu->dbgdidr = 0x35141000;
     cpu->clidr = (1 << 27) | (1 << 24) | 3;
-    cpu->ccsidr[0] = 0xe00fe015; /* 16k L1 dcache. */
-    cpu->ccsidr[1] = 0x200fe015; /* 16k L1 icache. */
+    cpu->ccsidr[0] = 0xe00fe019; /* 16k L1 dcache. */
+    cpu->ccsidr[1] = 0x200fe019; /* 16k L1 icache. */
     define_arm_cp_regs(cpu, cortexa9_cp_reginfo);
 }