*/
gd->env_addr += gd->reloc_off;
#endif
- /*
- * The fdt_blob needs to be moved to new relocation address
- * incase of FDT blob is embedded with in image
- */
- if (IS_ENABLED(CONFIG_OF_EMBED) && IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC))
- gd->fdt_blob += gd->reloc_off;
-
#ifdef CONFIG_EFI_LOADER
/*
* On the ARM architecture gd is mapped to a fixed register (r9 or x18).
return 0;
}
-#ifdef CONFIG_NEEDS_MANUAL_RELOC
-static int initr_manual_reloc_cmdtable(void)
-{
- fixup_cmdtable(ll_entry_start(struct cmd_tbl, cmd),
- ll_entry_count(struct cmd_tbl, cmd));
- return 0;
-}
-#endif
-
static int initr_binman(void)
{
int ret;
initr_watchdog,
#endif
INIT_FUNC_WATCHDOG_RESET
-#ifdef CONFIG_NEEDS_MANUAL_RELOC
- initr_manual_reloc_cmdtable,
-#endif
arch_initr_trap,
#if defined(CONFIG_BOARD_EARLY_INIT_R)
board_early_init_r,
#endif
gd->flags &= ~GD_FLG_LOG_READY;
- if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC))
- initcall_manual_reloc(init_sequence_r);
-
if (initcall_run_list(init_sequence_r))
hang();
*/
static inline void *manual_reloc(void *ptr)
{
-#ifndef USE_HOSTCC
- if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC))
- return ptr + gd->reloc_off;
-#endif
- return ptr;
+ return ptr;
}
-#if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC)
-#define MANUAL_RELOC(ptr) (ptr) = manual_reloc(ptr)
-#else
-#define MANUAL_RELOC(ptr) (void)(ptr)
-#endif
-
#endif /* _RELOCATE_H_ */
return 0;
}
-
-void initcall_manual_reloc(init_fnc_t init_sequence[])
-{
- init_fnc_t *ptr;
-
- for (ptr = init_sequence; *ptr; ptr++) {
- if (!initcall_is_event(*ptr))
- MANUAL_RELOC(*ptr);
- }
-}