summaryrefslogtreecommitdiff
path: root/arch/arc/lib/relocate.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-04-10 14:22:23 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-04-10 14:22:23 +0200
commitb491d9757d14415edcb1468ed896a704d0f0cfe7 (patch)
tree477707170048989accc9ea69cd6ac5edae7b1aec /arch/arc/lib/relocate.c
parent79d75d752717fb4106ec49abaddbd7744c775a35 (diff)
parent385a08a60f042061b004642d6b9bb6cfb794ad5a (diff)
downloadu-boot-b491d9757d14415edcb1468ed896a704d0f0cfe7.tar.gz
Merge branch 'u-boot/master'
Diffstat (limited to 'arch/arc/lib/relocate.c')
-rw-r--r--arch/arc/lib/relocate.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 7797782563..5c2c2d1930 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -10,6 +10,25 @@
DECLARE_GLOBAL_DATA_PTR;
+int copy_uboot_to_ram(void)
+{
+ size_t len = (size_t)&__image_copy_end - (size_t)&__image_copy_start;
+
+ memcpy((void *)gd->relocaddr, (void *)&__image_copy_start, len);
+
+ return 0;
+}
+
+int clear_bss(void)
+{
+ ulong dst_addr = (ulong)&__bss_start + gd->reloc_off;
+ size_t len = (size_t)&__bss_end - (size_t)&__bss_start;
+
+ memset((void *)dst_addr, 0x00, len);
+
+ return 0;
+}
+
/*
* Base functionality is taken from x86 version with added ARC-specifics
*/