Signed-off-by: Franck Bui-Huu <fbuihuu@xxxxxxxxx> --- arch/mips/kernel/head.S | 5 +++++ arch/mips/kernel/vmlinux.lds.S | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index e46782b..e8245cd 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -183,6 +183,11 @@ NESTED(kernel_entry, 16, sp) # kernel entry point LONG_S zero, (t0) bne t0, t1, 1b + PTR_LA a0, _sinitbss + PTR_LA a1, _einitbss + PTR_SUBU a1, a0 + jal __bzero + LONG_S a0, fw_arg0 # firmware arguments LONG_S a1, fw_arg1 LONG_S a2, fw_arg2 diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 84f9a4c..30e0d65 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -100,7 +100,7 @@ SECTIONS _edata = .; /* End of data section */ /* will be freed after init */ - . = ALIGN(_PAGE_SIZE); /* Init code and data */ + . = ALIGN(_PAGE_SIZE); /* Init code, data and bss */ __init_begin = .; .init.text : { _sinittext = .; @@ -110,6 +110,11 @@ SECTIONS .init.data : { *(.init.data) } + .init.bss (NOLOAD) : { + _sinitbss = .; + *(.init.bss) + _einitbss = .; + } . = ALIGN(16); .init.setup : { __setup_start = .; -- 1.5.3.3