* [U-Boot] [PATCH] ppc4xx: Fix TLB reset problem with recent 44x images
@ 2009-07-14 13:53 Stefan Roese
2009-07-24 8:05 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2009-07-14 13:53 UTC (permalink / raw)
To: u-boot
Patch d873133f [ppc4xx: Add Sequoia RAM-booting target] broke "normal"
booting on some 44x platforms. This breakage is only noticed in some
cases while powercycling. As it seems, the code in question in start.S
didn't invalidate TLB #0. This makes sense since this TLB is used for
the bootrom mapping. With the patch mentioned above even TLB #0 got
invalidated resulting in an error later on.
This patch now fixes this issue by only invalidating TLB #0 in the RAM-
booting case.
Tested succesfully on Sequoia and Canyonlands.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <Eibach@gdsys.de>
---
cpu/ppc4xx/start.S | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index 582c781..2f06914 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -450,9 +450,14 @@ skip_debug_init:
/* Clear all TLB entries -- TID = 0, TS = 0 */
/*----------------------------------------------------------------*/
addis r0,0,0x0000
- li r1,0x003f /* 64 TLB entries */
- mtctr r1
+#ifdef CONFIG_SYS_RAMBOOT
li r4,0 /* Start with TLB #0 */
+#else
+ li r4,1 /* Start with TLB #1 */
+#endif
+ li r1,64 /* 64 TLB entries */
+ sub r1,r1,r4 /* calculate last TLB # */
+ mtctr r1
rsttlb:
#ifdef CONFIG_SYS_RAMBOOT
tlbre r3,r4,0 /* Read contents from TLB word #0 to get EPN */
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] ppc4xx: Fix TLB reset problem with recent 44x images
2009-07-14 13:53 [U-Boot] [PATCH] ppc4xx: Fix TLB reset problem with recent 44x images Stefan Roese
@ 2009-07-24 8:05 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-07-24 8:05 UTC (permalink / raw)
To: u-boot
On Tuesday 14 July 2009 15:53:58 Stefan Roese wrote:
> Patch d873133f [ppc4xx: Add Sequoia RAM-booting target] broke "normal"
> booting on some 44x platforms. This breakage is only noticed in some
> cases while powercycling. As it seems, the code in question in start.S
> didn't invalidate TLB #0. This makes sense since this TLB is used for
> the bootrom mapping. With the patch mentioned above even TLB #0 got
> invalidated resulting in an error later on.
>
> This patch now fixes this issue by only invalidating TLB #0 in the RAM-
> booting case.
>
> Tested succesfully on Sequoia and Canyonlands.
Applied to ppc4xx/master. Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-24 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 13:53 [U-Boot] [PATCH] ppc4xx: Fix TLB reset problem with recent 44x images Stefan Roese
2009-07-24 8:05 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox