[U-Boot-Users] PPC U-boot Don't Want to Relocated

Sebastien Douheret s.douheret at laposte.net
Thu Jul 13 09:52:34 CEST 2006


Hello Jason,

you must have previously initialized RAM with another way to have an writable area to set stack, data segment, BSS and so on (see remark in Wolfgang Denk email).
If you have it, you can skip relocation by setting TEXT_BASE to a RAM address and patch code in some files. What is your CPU ?
As for me, i have a board based on MPC7447/MPC7448 and i use this method (not relocate code) to simplify debug with JTAG probe.
I have patch boot code in cpu/74xx_7xx/start.s file and relocation offset in lib_ppc/board.c file :
	/*
	 * Now that we have DRAM mapped and working, we can
	 * relocate the code and continue running from DRAM.
	 *
	 * Reserve memory at end of RAM for (top down in that order):
	 *  - kernel log buffer
	 *  - protected RAM
	 *  - LCD framebuffer
	 *  - monitor code
	 *  - board info struct
	 */
	len = (ulong)&_end - CFG_MONITOR_BASE;

#ifdef DEBUG_JTAG_PROBE
	/* IC-PATCH : Skip relocation to debug facilities */
	addr = TEXT_BASE + len + (4096-1);
#else

#ifndef	CONFIG_VERY_BIG_RAM
	addr = CFG_SDRAM_BASE + gd->ram_size;
#else
	/* only allow stack below 256M */
	addr = CFG_SDRAM_BASE +
	       (gd->ram_size > 256 << 20) ? 256 << 20 : gd->ram_size;
#endif
#endif /* DEBUG_JTAG_PROBE */


Best regards,

Sebastien.


Cet été, pensez aux cartes postales de laposte.net !






More information about the U-Boot mailing list