diff options
author | Simon Glass <sjg@chromium.org> | 2015-08-04 12:33:39 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-05 08:43:46 -0600 |
commit | f05ad9ba4c22b5c5929406394a0889791c2778da (patch) | |
tree | a240191c7acd2c21b25a78ffed724524b32732b7 /common/board_f.c | |
parent | 7bea52716020d5aa2298fff871b8a7f1361ad2b0 (diff) |
Add a way to skip relocation
When running U-Boot as an EFI application we cannot relocate since we do not
have relocation information. U-Boot has already been relocated to a suitable
address.
Add a global_data flag to control skipping relocation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c index 6d922b8c86b..c7cc67c7a48 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -654,6 +654,8 @@ static int setup_dram_config(void) static int reloc_fdt(void) { + if (gd->flags & GD_FLG_SKIP_RELOC) + return 0; if (gd->new_fdt) { memcpy(gd->new_fdt, gd->fdt_blob, gd->fdt_size); gd->fdt_blob = gd->new_fdt; @@ -664,6 +666,11 @@ static int reloc_fdt(void) static int setup_reloc(void) { + if (gd->flags & GD_FLG_SKIP_RELOC) { + debug("Skipping relocation due to flag\n"); + return 0; + } + #ifdef CONFIG_SYS_TEXT_BASE gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; #ifdef CONFIG_M68K @@ -689,6 +696,8 @@ static int setup_reloc(void) static int jump_to_copy(void) { + if (gd->flags & GD_FLG_SKIP_RELOC) + return 0; /* * x86 is special, but in a nice way. It uses a trampoline which * enables the dcache if possible. |