cortexa8, beagle: add relocation support
RFC PATCH 11/19 cortexa8, beagle: add relocation support
Signed-off-by Heiko Schocher <[email protected]>
--- arch/arm/cpu/armv7/omap3/sdrc.c | 14 +++- arch/arm/cpu/armv7/start.S | 174 +++++++++++++++++++++++++++----------- arch/arm/cpu/armv7/u-boot.lds | 14 +++- board/ti/beagle/config.mk | 2 +- include/configs/omap3_beagle.h | 4 + 5 files changed, 153 insertions(+), 55 deletions(-)
arch/arm/cpu/armv7/omap3/sdrc.c +12 -2
@@ -181,13 +181,23 @@ int dram_init(void) size1 =get_sdr_cs_size (CS1 ); } + gd->ram_size = size0 + size1; + +return 0 ; +} + +void dram_init_banksize (void ) +{ +DECLARE_GLOBAL_DATA_PTR ; +unsigned int size0 =0 , size1 =0 ; + + size0 =get_sdr_cs_size (CS0 ); + size1 =get_sdr_cs_size (CS1 ); gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; gd->bd->bi_dram[0 ].size = size0; gd->bd->bi_dram[1 ].start =PHYS_SDRAM_1 +get_sdr_cs_offset (CS1 ); gd->bd->bi_dram[1 ].size = size1; - -return 0 ; }/*
arch/arm/cpu/armv7/start.S +123 -51
222 lines not on this page · raw message
arch/arm/cpu/armv7/u-boot.lds +13 -1
@@ -42,10 +42,22 @@ SECTIONS .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } . = ALIGN(4); - .data : { *(.data) } + .data : { + *(.data) + __datarel_start = .; + *(.data.rel) + __datarelrolocal_start = .; + *(.data.rel.ro.local) + __datarellocal_start = .; + *(.data.rel.local) + __datarelro_start = .; + *(.data.rel.ro) + } + __got_start = .; . = ALIGN(4); .got : { *(.got) } + __got_end = .; __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) }
board/ti/beagle/config.mk +1 -1
@@ -30,4 +30,4 @@ # (mem base + reserved) # For use with external or internal boots. -TEXT_BASE = 0x80e80000 +TEXT_BASE = 0x80008000
include/configs/omap3_beagle.h +4 -0
@@ -335,4 +335,8 @@ extern unsigned int boot_flash_sec;extern unsigned int boot_flash_type;#endif +/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - CONFIG_SYS_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 5 lines
1.6.2.5 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany