ppc4xx: Fix crash on sequoia with cache enabled
PATCH 1/1 ppc4xx: Fix crash on sequoia with cache enabled
Currently U-Boot crashes on sequoia board in CPU POST if cache is enabled (CONFIG_4xx_DCACHE defined). The cache won't be disabled by change_tlb before CPU POST because there is an insufficient adress range check since CFG_MEM_TOP_HIDE was introduced. This patch tries to fix this problem.
Signed-off-by Anatolij Gustschin <[email protected]>
--- cpu/ppc4xx/tlb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
cpu/ppc4xx/tlb.c +3 -1
@@ -149,7 +149,9 @@ void change_tlb(u32 vaddr, u32 size, u32 tlb_word2_i_value)/* * Now check the end-address if it's in the range */ -if ((tlb_vaddr + tlb_size -1 ) <= (vaddr + size -1 )) { +if (((tlb_vaddr + tlb_size -1 ) <= (vaddr + size -1 )) || + ((tlb_vaddr < (vaddr + size -1 )) && + ((tlb_vaddr + tlb_size -1 ) > (vaddr + size -1 )))) {/* * Found a TLB in the range. * Change cache attribute in tlb2 word.
Signature · 1 line
1.5.3.3
Wolfgang Denk
AppliedPATCH 1/1 ppc4xx: Fix crash on sequoia with cache enabled
Quoted 11 lines · In message <[email protected]> you wrote:
Currently U-Boot crashes on sequoia board in CPU POST if cache is enabled (
CONFIG_4xx_DCACHEdefined). The cache won't be disabled bychange_tlbbefore CPU POST because there is an insufficient adress range check sinceCFG_MEM_TOP_HIDEwas introduced. This patch tries to fix this problem.Signed-off-by Anatolij Gustschin <[email protected]>--- cpu/ppc4xx/tlb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If it went on at this rate, in several billion years he'd be rich beyond his wildest dreams! - Terry Pratchett, _Soul Music_