summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/reloc.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2019-10-21 13:50:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-23 09:05:54 +0200
commit1e5aef61fc6a4442feaf4416ae7b2b726a66bee6 (patch)
tree83cfcb20be1748f297a172d446a8be8fd9f366c7 /arch/mips/lib/reloc.c
parent9305f5c09159d8488014a8619f0af4ffdfb71003 (diff)
downloadbarebox-1e5aef61fc6a4442feaf4416ae7b2b726a66bee6.tar.gz
MIPS: reloc: init bss and cpu
We need it to make flush_cache_all() work properly. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/lib/reloc.c')
-rw-r--r--arch/mips/lib/reloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 798a686..df9760e 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -115,6 +115,8 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
long off;
bss_len = (unsigned long)&__bss_stop - (unsigned long)__bss_start;
+ memset(__bss_start, 0, bss_len);
+ cpu_probe();
length = barebox_image_size + bss_len;
relocaddr = ALIGN_DOWN(ram_size - length, SZ_64K);