]> git.ozlabs.org Git - yaboot.git/commitdiff
Remove second zero of BSS
authorAnton Blanchard <anton@samba.org>
Thu, 8 Jul 2010 19:03:34 +0000 (19:03 +0000)
committerTony Breeds <tony@bakeyournoodle.com>
Fri, 16 Jul 2010 05:51:57 +0000 (15:51 +1000)
We zero the BSS in two places: once in _start() and then
again in yaboot_start(). The second time we actually get
it wrong and zero 1/4 of the BSS (since we subtract two
pointers).

Since this second zeroing is superfluous and buggy, remove
it.

While here, fix the comments in _start. It claims we aren't
clearing the BSS when we are.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/crt0.S
second/yaboot.c

index f06fe544fabd7dfe1dacca47971b97cac7276d71..10a82738e7833b654cca20d84145b04f47dc8fae 100644 (file)
@@ -2,7 +2,7 @@
 #include "asm/processor.h"
 
 /*
- * Main entry point. should add code to clear BSS and more ...
+ * Main entry point. We zero the BSS then jump to yaboot_start.
  */
 _GLOBAL(_start)
        lis     r10,edata@h
index 765c7bf46618d47a4d67872349360ac70461c147..b02070e5c60ca80b539cdb1170d690b4eb210072 100644 (file)
@@ -167,11 +167,6 @@ extern unsigned char linux_logo_blue[];
 
 #define DEFAULT_TIMEOUT                -1
 
-/* Entry, currently called directly by crt0 (bss not inited) */
-
-extern char* __bss_start;
-extern char* _end;
-
 int
 yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
 {
@@ -179,9 +174,6 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5)
      void* malloc_base = NULL;
      prom_handle root;
 
-     /* OF seems to do it, but I'm not very confident */
-     memset(&__bss_start, 0, &_end - &__bss_start);
-
      /* Initialize OF interface */
      prom_init ((prom_entry) r5);