From f6e20fc6ca5a45316f94743d8b60dce4d9766bc8 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 8 Feb 2004 19:38:38 +0000 Subject: Patch by Anders Larsen, 09 Jan 2004: ARM memory layout fixes: the abort-stack is now set up in the correct RAM area, and the BSS is zeroed out as it should be. Furthermore, the magic variables 'armboot_end' and 'armboot_end_data' of the linker scripts are replaced by '__bss_start' and '_end', resp., which is a further step to eliminate unnecessary differences between the implementation of the CPU architectures. --- lib_arm/board.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib_arm/board.c') diff --git a/lib_arm/board.c b/lib_arm/board.c index 08679d32f0..314126af5e 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -117,7 +117,7 @@ static int display_banner (void) { printf ("\n\n%s\n\n", version_string); printf ("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n", - _armboot_start, _armboot_end_data, _armboot_end); + _armboot_start, _bss_start, _bss_end); #ifdef CONFIG_MODEM_SUPPORT puts ("Modem Support enabled\n"); #endif @@ -173,7 +173,7 @@ static void display_flash_config (ulong size) * All attempts to come up with a "common" initialization sequence * that works for all boards and architectures failed: some of the * requirements are just _too_ different. To get rid of the resulting - * mess of board dependend #ifdef'ed code we now make the whole + * mess of board dependent #ifdef'ed code we now make the whole * initialization sequence configurable to the user. * * The requirements for any new initalization function is simple: it @@ -217,7 +217,7 @@ void start_armboot (void) gd->bd = (bd_t*)((char*)gd - sizeof(bd_t)); memset (gd->bd, 0, sizeof (bd_t)); - monitor_flash_len = _armboot_end_data - _armboot_start; + monitor_flash_len = _bss_start - _armboot_start; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { @@ -237,7 +237,7 @@ void start_armboot (void) * reserve memory for VFD display (always full pages) */ /* armboot_end is defined in the board-specific linker script */ - addr = (_armboot_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); + addr = (_bss_start + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); size = vfd_setmem (addr); gd->fb_base = addr; #endif /* CONFIG_VFD */ -- cgit v1.2.3