diff mbox series

[v2,03/17] target/ppc: Correct the e500mc and e5500 cache block size fields

Message ID 20261104173329.706635-4-bin.meng@processmission.com
State New
Headers show
Series target/ppc: Correct Freescale Book E CPU models | expand

Commit Message

Bin Meng Nov. 4, 2026, 5:33 p.m. UTC
The L1 configuration registers encode a 64-byte cache block with
CBSIZE=1. The models instead set CBSIZE=2, advertising 128 bytes
despite using 64 bytes for cache operations.

Use the correct field value for both caches.

Reference:
- E500MCRM (Rev.3), sections 2.14.4 and 2.14.5
  https://www.nxp.com/docs/en/reference-manual/E500MCRM.pdf
- E5500RM (Rev.4), sections 2.14.4 and 2.14.5
  https://www.nxp.com/webapp/Download?colCode=E5500RM

Fixes: a496e8eeba51 ("PPC: E500: Populate L1CFG0 SPR")
Fixes: d2ea2bf740c5 ("PPC: Add L1CFG1 SPR emulation")
Cc: qemu-stable@nongnu.org
Signed-off-by: Bin Meng <bin.meng@processmission.com>
---

(no changes since v1)

 target/ppc/cpu_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 9731bc0bfa..2de2684c69 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -2886,8 +2886,8 @@  static void init_proc_e500(CPUPPCState *env, int version)
     case fsl_e5500:
         env->dcache_line_size = 64;
         env->icache_line_size = 64;
-        l1cfg0 |= 0x1000000; /* 64 byte cache block size */
-        l1cfg1 |= 0x1000000; /* 64 byte cache block size */
+        l1cfg0 |= 0x00800000; /* 64 byte cache block size */
+        l1cfg1 |= 0x00800000; /* 64 byte cache block size */
         break;
     case fsl_e6500:
         env->dcache_line_size = 32;