From 858290178f222d998b6425d85cf06822467918f3 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:25 -0500 Subject: ppc: Enable full relocation to RAM The following changes allow U-Boot to fully relocate from flash to RAM: - Remove linker scripts' .fixup sections from the .text section - Add -mrelocatable to PLATFORM_RELFLAGS for all boards - Define CONFIG_RELOC_FIXUP_WORKS for all boards Previously, U-Boot would partially relocate, but statically initialized pointers needed to be manually relocated. Signed-off-by: Peter Tyser --- include/asm-ppc/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/asm-ppc') diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h index e35b0b77f..eba79010b 100644 --- a/include/asm-ppc/config.h +++ b/include/asm-ppc/config.h @@ -47,4 +47,7 @@ #define CONFIG_MAX_CPUS 1 #endif +/* Relocation to SDRAM works on all PPC boards */ +#define CONFIG_RELOC_FIXUP_WORKS + #endif /* _ASM_CONFIG_H_ */ -- cgit v1.2.3 From 3469424cb6d939c7aedf1e0efdec44a797c0a18c Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:37 -0500 Subject: ppc: Remove reloc_off field from global_data structure Now that proper relocation is supported, the reloc_off field is no longer necessary. Note that the location of the standalone application jump table pointer in the global data structure is affected by this change, breaking execution of standalone applications compiled for previous versions of U-Boot. We therefore increment XF_VERSION to 6 Signed-off-by: Peter Tyser Signed-off-by: Wolfgang Denk --- include/asm-ppc/global_data.h | 2 +- include/exports.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-ppc') diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h index db4b1eaa1..55e7e2066 100644 --- a/include/asm-ppc/global_data.h +++ b/include/asm-ppc/global_data.h @@ -24,6 +24,7 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H +#include "config.h" #include "asm/types.h" /* @@ -124,7 +125,6 @@ typedef struct global_data { unsigned long flb_clk; #endif phys_size_t ram_size; /* RAM size */ - unsigned long reloc_off; /* Relocation Offset */ unsigned long reset_status; /* reset status register at boot */ #if defined(CONFIG_MPC83xx) unsigned long arbiter_event_attributes; diff --git a/include/exports.h b/include/exports.h index 16ea03a6b..2e8fd8b8b 100644 --- a/include/exports.h +++ b/include/exports.h @@ -47,7 +47,7 @@ enum { XF_MAX }; -#define XF_VERSION 5 +#define XF_VERSION 6 #if defined(CONFIG_I386) extern gd_t *global_data; -- cgit v1.2.3