Commit bef444a3 authored by Vineet Gupta's avatar Vineet Gupta

ARC: optimize kernel bss clearing in early boot code

using ARC ZOL which reduces tot num of instructions by half
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent ba25915f
...@@ -77,10 +77,11 @@ stext: ...@@ -77,10 +77,11 @@ stext:
; Clear BSS before updating any globals ; Clear BSS before updating any globals
; XXX: use ZOL here ; XXX: use ZOL here
mov r5, __bss_start mov r5, __bss_start
mov r6, __bss_stop sub r6, __bss_stop, r5
lsr.f lp_count, r6, 2
lpnz 1f
st.ab 0, [r5, 4]
1: 1:
st.ab 0, [r5,4]
brlt r5, r6, 1b
; Uboot - kernel ABI ; Uboot - kernel ABI
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
......
...@@ -116,7 +116,7 @@ SECTIONS ...@@ -116,7 +116,7 @@ SECTIONS
_edata = .; _edata = .;
BSS_SECTION(0, 0, 0) BSS_SECTION(4, 4, 4)
#ifdef CONFIG_ARC_DW2_UNWIND #ifdef CONFIG_ARC_DW2_UNWIND
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment