From 7d314992a82cea41bb5de596421100ddce9d9c17 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 5 Oct 2005 00:00:54 +0200 Subject: [PATCH] E500 update: repoint IVPR to RAM when code is relocated Patch by Kylo Ginsberg, 13 Apr 2005 --- CHANGELOG | 3 +++ cpu/mpc85xx/start.S | 5 +++++ lib_ppc/board.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1aec75d953..2b446015de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.4: ====================================================================== +* E500 update: repoint IVPR to RAM when code is relocated + Patch by Kylo Ginsberg, 13 Apr 2005 + * Fix loop end test in lib_generic/string.c:strswab() Patch by Andrew Dyer, October 10, 2005 Signed-off-by: Andrew Dyer diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S index 5f75bc1aff..2f2bd3ad52 100644 --- a/cpu/mpc85xx/start.S +++ b/cpu/mpc85xx/start.S @@ -995,6 +995,11 @@ relocate_code: 7: sync /* Wait for all icbi to complete on bus */ isync + /* + * Re-point the IVPR at RAM + */ + mtspr IVPR,r10 + /* * We are done. Do not return, instead branch to second part of board * initialization, now running from RAM. diff --git a/lib_ppc/board.c b/lib_ppc/board.c index d1e294f23b..b1c6ab0e4e 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -429,6 +429,10 @@ void board_init_f (ulong bootflag) */ addr -= len; addr &= ~(4096 - 1); +#ifdef CONFIG_E500 + /* round down to next 64 kB limit so that IVPR stays aligned */ + addr &= ~(65536 - 1); +#endif debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr); -- 2.39.5