Skip to contentSkip to conversation

85xx: Fix the wrong CSIZE mask bit

PATCH New Dave Liu 2 participants 5 messages Dec 16, 2008 – Dec 18, 2008

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH 2/3 85xx: Fix the wrong CSIZE mask bit

The CSIZE is L1CFG0[56-63] in the e500 and e500mc core, so we should mask 0xff, not 0x1ff.

---
 cpu/mpc85xx/start.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
cpu/mpc85xx/start.S +2 -2
index 80f9677..cfa53c0 100644
@@ -244,7 +244,7 @@ switch_as:
 	lis	r3,CONFIG_SYS_INIT_RAM_ADDR at h
 	ori	r3,r3,CONFIG_SYS_INIT_RAM_ADDR at l
 	mfspr	r2, L1CFG0
-	andi.	r2, r2, 0x1ff
+	andi.	r2, r2, 0xff
 	/* cache size * 1024 / (2 * L1 line size) */
 	slwi	r2, r2, (10 - 1 - L1_CACHE_SHIFT)
 	mtctr	r2
@@ -1004,7 +1004,7 @@ unlock_ram_in_cache:
 	lis	r3,(CONFIG_SYS_INIT_RAM_ADDR & ~(CONFIG_SYS_CACHELINE_SIZE-1))@h
 	ori	r3,r3,(CONFIG_SYS_INIT_RAM_ADDR & ~(CONFIG_SYS_CACHELINE_SIZE-1))@l
 	mfspr	r4,L1CFG0
-	andi.	r4,r4,0x1ff
+	andi.	r4,r4,0xff
 	slwi	r4,r4,(10 - 1 - L1_CACHE_SHIFT)
 	mtctr	r4
 1:	dcbi	r0,r3
Signature · 1 line
1.5.4
#1 lore raw

PATCH 2/3 85xx: Fix the wrong CSIZE mask bit

Quoted 7 lines · Dave Liu

The CSIZE is L1CFG0[56-63] in the e500 and e500mc core, so we should mask 0xff, not 0x1ff.

---
cpu/mpc85xx/start.S | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)

was code breaking or just fixing it up to match the docs?

- k

author
#2 lore raw

PATCH 2/3 85xx: Fix the wrong CSIZE mask bit

Quoted 1 line

was code breaking or just fixing it up to match the docs?

not break the system, because the bit[55] is reserved zero for e500/e500mc.
so just fixied it to match the e500/e500mc docs.

#3 lore raw

PATCH 2/3 85xx: Fix the wrong CSIZE mask bit

Quoted 5 lines · Liu Dave
Quoted 1 line

was code breaking or just fixing it up to match the docs?

not break the system, because the bit[55] is reserved zero for e500/e500mc.
so just fixied it to match the e500/e500mc docs.

Ok. I'd prefer we just expand the field to 0x3ff to match the EREF spec since the upper bits are reserved we'll always read them as 0 so no harm. And we dont have to change the code again in the future if we expand into those upper bits.

- k

author
#4 lore raw

PATCH 2/3 85xx: Fix the wrong CSIZE mask bit

Quoted 4 lines

Ok. I'd prefer we just expand the field to 0x3ff to match the EREF spec since the upper bits are reserved we'll always read them as 0 so no harm. And we dont have to change the code again in the future if we expand into those upper bits.

If match the EREF, it should be 0x7ff.
and it also cause our customers confuse why not use the mask in e500UM.
Anyway, it is easy to change them to 0x7ff for me.