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.
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 08679d3..314126a 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -117,7 +117,7 @@
 {
 	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 @@
  * 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 @@
 	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 @@
 	 * 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 */