mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
PPC: Record U-Boot's relocated address in RAM and show in bdinfo.
This patch uses gd->relocaddr variable to store uboot's relocated address in RAM and shows it in bdinfo command. This patch moves CONFIG_AMIGAONEG3SE style copying of the address in board_init_f to just before relocation is actually done. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Tested-by: Detlev Zundel <dzu@denx.de>
This commit is contained in:
parent
8c4444ff5e
commit
4b99327a41
@ -115,6 +115,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
printf ("IP addr = %pI4\n", &bd->bi_ip_addr);
|
printf ("IP addr = %pI4\n", &bd->bi_ip_addr);
|
||||||
printf ("baudrate = %6ld bps\n", bd->bi_baudrate );
|
printf ("baudrate = %6ld bps\n", bd->bi_baudrate );
|
||||||
|
print_num ("relocaddr", gd->relocaddr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,9 +152,7 @@ typedef struct global_data {
|
|||||||
defined(CONFIG_SANDPOINT)
|
defined(CONFIG_SANDPOINT)
|
||||||
void * console_addr;
|
void * console_addr;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_AMIGAONEG3SE
|
|
||||||
unsigned long relocaddr; /* Start address of U-Boot in RAM */
|
unsigned long relocaddr; /* Start address of U-Boot in RAM */
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
|
#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
|
||||||
unsigned long fb_base; /* Base address of framebuffer memory */
|
unsigned long fb_base; /* Base address of framebuffer memory */
|
||||||
#endif
|
#endif
|
||||||
|
@ -477,10 +477,6 @@ void board_init_f (ulong bootflag)
|
|||||||
|
|
||||||
debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
|
debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
|
||||||
|
|
||||||
#ifdef CONFIG_AMIGAONEG3SE
|
|
||||||
gd->relocaddr = addr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* reserve memory for malloc() arena
|
* reserve memory for malloc() arena
|
||||||
*/
|
*/
|
||||||
@ -612,6 +608,8 @@ void board_init_f (ulong bootflag)
|
|||||||
|
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
|
||||||
|
gd->relocaddr = addr; /* Record relocation address, useful for debug */
|
||||||
|
|
||||||
memcpy (id, (void *)gd, sizeof (gd_t));
|
memcpy (id, (void *)gd, sizeof (gd_t));
|
||||||
|
|
||||||
relocate_code (addr_sp, id, addr);
|
relocate_code (addr_sp, id, addr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user