Patchwork [U-Boot,v1,2/7] MIPS: u-boot.lds: introduce symbol __image_copy_end

login
register
mail settings
Submitter Daniel Schwierzeck
Date Feb. 9, 2013, 8:33 p.m.
Message ID <1360442010-7520-3-git-send-email-daniel.schwierzeck@gmail.com>
Download mbox | patch
Permalink /patch/219438/
State Accepted
Delegated to: Daniel Schwierzeck
Headers show

Comments

Daniel Schwierzeck - Feb. 9, 2013, 8:33 p.m.
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

This symbol is used in later patches as end address
for relocation of the U-Boot image into RAM.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
 arch/mips/cpu/u-boot.lds            | 2 ++
 arch/mips/include/asm/u-boot-mips.h | 6 ++++++
 2 files changed, 8 insertions(+)

Patch

diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds
index 6980b86..7b5fca0 100644
--- a/arch/mips/cpu/u-boot.lds
+++ b/arch/mips/cpu/u-boot.lds
@@ -70,6 +70,8 @@  SECTIONS
 	uboot_end_data = .;
 
 	. = ALIGN(4);
+	__image_copy_end = .;
+
 	.bss : {
 		__bss_start = .;
 		*(.sbss.*)
diff --git a/arch/mips/include/asm/u-boot-mips.h b/arch/mips/include/asm/u-boot-mips.h
index eda0498..bfb6a4a 100644
--- a/arch/mips/include/asm/u-boot-mips.h
+++ b/arch/mips/include/asm/u-boot-mips.h
@@ -20,4 +20,10 @@  static inline unsigned long bss_end(void)
 	return (unsigned long) &__bss_end;
 }
 
+static inline unsigned long image_copy_end(void)
+{
+	extern ulong __image_copy_end;
+	return (unsigned long) &__image_copy_end;
+}
+
 extern int incaip_set_cpuclk(void);