[U-Boot-Users] [PATCH] Make MPC83xx one step closer to full relocation.

Remove a few absolute references to CFG_MONITOR_BASE for ppc/mpc83xx and use GOT relative reference. --- cpu/mpc83xx/start.S | 11 +++++++---- lib_ppc/board.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/cpu/mpc83xx/start.S b/cpu/mpc83xx/start.S index 1dfbf62..56fd7ec 100644 --- a/cpu/mpc83xx/start.S +++ b/cpu/mpc83xx/start.S @@ -172,8 +172,11 @@ boot_warm: /* time t 5 */ /* there and deflate the flash size back to minimal size */ /*------------------------------------------------------------*/ bl map_flash_by_law1 - lis r4, (CFG_MONITOR_BASE)@h - ori r4, r4, (CFG_MONITOR_BASE)@l + + GET_GOT /* initialize GOT access */ + lwz r4, GOT(_start) + addi r4, r4, -EXC_OFF_SYS_RESET + addi r5, r4, in_flash - _start + EXC_OFF_SYS_RESET mtlr r5 blr @@ -906,8 +909,8 @@ relocate_code: mr r10, r5 /* Save copy of Destination Address */
mr r3, r5 /* Destination Address */ - lis r4, CFG_MONITOR_BASE@h /* Source Address */ - ori r4, r4, CFG_MONITOR_BASE@l + lwz r4, GOT(_start) + addi r4, r4, -EXC_OFF_SYS_RESET lwz r5, GOT(__init_end) sub r5, r5, r4 li r6, CFG_CACHELINE_SIZE /* Cache Line Size */ diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 45d1328..8a18350 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -117,6 +117,7 @@ DECLARE_GLOBAL_DATA_PTR; #define TOTAL_MALLOC_LEN CFG_MALLOC_LEN #endif
+extern ulong _start; extern ulong __init_end; extern ulong _end; ulong monitor_flash_len; @@ -417,7 +418,7 @@ void board_init_f (ulong bootflag) * - monitor code * - board info struct */ - len = (ulong)&_end - CFG_MONITOR_BASE; + len = (ulong)&_end - (ulong)&_start + EXC_OFF_SYS_RESET;
#ifndef CONFIG_VERY_BIG_RAM addr = CFG_SDRAM_BASE + gd->ram_size;

On Fri, 28 Mar 2008 15:41:25 +0100 Joakim Tjernlund Joakim.Tjernlund@transmode.se wrote:
Remove a few absolute references to CFG_MONITOR_BASE for ppc/mpc83xx and use GOT relative reference.
cpu/mpc83xx/start.S | 11 +++++++---- lib_ppc/board.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-)
Joakim,
this patch is missing your signoff, and doesn't apply cleanly (even adds whitespace).
btw, shouldn't it fix up the other ppc start.S files?
Kim

-----Original Message----- From: Kim Phillips [mailto:kim.phillips@freescale.com] Sent: den 29 mars 2008 00:33 To: Joakim Tjernlund Cc: u-boot-users@lists.sourceforge.net Subject: Re: [PATCH] Make MPC83xx one step closer to full relocation.
On Fri, 28 Mar 2008 15:41:25 +0100 Joakim Tjernlund Joakim.Tjernlund@transmode.se wrote:
Remove a few absolute references to CFG_MONITOR_BASE for ppc/mpc83xx and use GOT relative reference.
cpu/mpc83xx/start.S | 11 +++++++---- lib_ppc/board.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-)
Joakim,
this patch is missing your signoff, and doesn't apply cleanly (even adds whitespace).
It doesn't apply because you have been sitting on it for too long :) I sent long ago and you said would apply it in the next merge window, but seems to have forgotten about it. Sorry for the whitespace. I am still on the last u-boot release so I am afraid I can't do much about it ATM. I hope you can clean up the WS.
Signed-off-by: Joakim Tjernlund Joakim.Tjernlund@transmode.se
btw, shouldn't it fix up the other ppc start.S files?
The other ppc's won't break and I only got a 83xx, hence I only did it for 83xx, hoping it would serve as a guide for the rest.
Jocke
Kim
participants (2)
-
Joakim Tjernlund
-
Kim Phillips