Use the newly introduced symbols __image_copy_end and __bss_end
for setting up the memory area for the relocated U-Boot.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
gd_t gd_data, *id;
bd_t *bd;
init_fnc_t **init_fnc_ptr;
gd_t gd_data, *id;
bd_t *bd;
init_fnc_t **init_fnc_ptr;
- ulong addr, addr_sp, len = (ulong)&uboot_end - CONFIG_SYS_MONITOR_BASE;
+ ulong addr, addr_sp, len;
ulong *s;
/* Pointer is writable since we allocated a register for it.
ulong *s;
/* Pointer is writable since we allocated a register for it.
/* Reserve memory for U-Boot code, data & bss
* round down to next 16 kB limit
*/
/* Reserve memory for U-Boot code, data & bss
* round down to next 16 kB limit
*/
+ len = bss_end() - CONFIG_SYS_MONITOR_BASE;
addr -= len;
addr &= ~(16 * 1024 - 1);
addr -= len;
addr &= ~(16 * 1024 - 1);
gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE;
gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE;
- monitor_flash_len = (ulong)&uboot_end_data - dest_addr;
+ monitor_flash_len = image_copy_end() - dest_addr;