Skip to contentSkip to conversation

s3c44b0/start.S: should clear .bss

PATCH New Ender Dai 2 participants 2 messages May 10, 2010 – Dec 22, 2010 Arm (32-bit)

lore
Share & tools
lore

Ender Dai

author
#0 lore raw

PATCH 1/1 s3c44b0/start.S: should clear .bss

.bss section should be zeroed out after relocat to ram.

---
 arch/arm/cpu/s3c44b0/start.S |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/cpu/s3c44b0/start.S +9 -0
index fe6b349..08722c1 100644
@@ -164,6 +164,15 @@ stack_setup:
 #endif
 	sub	sp, r0, #12		/* leave 3 words for abort-stack    */
 
+clear_bss:	
+	ldr	r0, _bss_start		/* find start of bss segment        */
+	ldr	r1, _bss_end		/* stop here                        */
+	mov	r2, #0x00000000		/* clear                            */
+clbss_l:str	r2, [r0]		/* clear loop...                    */
+	add	r0, r0, #4
+	cmp	r0, r1
+	blt	clbss_l
+
 	ldr	pc, _start_armboot
 
 _start_armboot:	.word start_armboot
Signature · 1 line
1.5.6
#1 lore raw

PATCH 1/1 s3c44b0/start.S: should clear .bss

Dear Ender Dai,

arch/arm/cpu/s3c44b0/start.S

Quoted 11 lines · Ender Dai

.bss section should be zeroed out after relocat to ram.

---
?arch/arm/cpu/s3c44b0/start.S | ? ?9 +++++++++
?1 files changed, 9 insertions(+), 0 deletions(-)

arch/arm/cpu/s3c44b0/start.S +0 -0
index fe6b349..08722c1 100644

Now, clear_bss function is applied by other patch. Sorry to late review.
Thanks.

Minkyu Kang

Signature · 2 lines
from. prom.
www.promsoft.net