dragon: Clear out .bss sections in crt0.s
authorTormod Volden <debian.tormod@gmail.com>
Mon, 9 Mar 2015 23:47:37 +0000 (00:47 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 9 Mar 2015 23:58:52 +0000 (23:58 +0000)
There is still some memory cleaning in setup.s but this
is where it belongs.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/platform-dragon/crt0.s
Kernel/platform-dragon/fuzix.link

index 5136c3a..d6e05a5 100644 (file)
@@ -21,6 +21,13 @@ bootme:
 main:          orcc #0x10              ; interrupts definitely off
                lds #kstack_top
 
+               ldx #__sectionbase_.bss__
+               ldy #__sectionlen_.bss__
+               clra
+bss_wipe:      sta ,x+
+               leay -1,y
+               bne bss_wipe
+
                jsr init_early
                jsr init_hardware
                jsr _fuzix_main
index a1a7dc6..def53cf 100644 (file)
@@ -1,3 +1,5 @@
+define basesympat __sectionbase_%s__
+define lensympat __sectionlen_%s__
 section .vectors load 0x0100
 section .udata load 0x7D00
 section .bss high 0x7D00