diff options
| author | Simon Glass <[email protected]> | 2025-01-15 18:27:20 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-22 09:47:50 -0600 |
| commit | ca055155f4179e92caae47ff21ee858884b47b21 (patch) | |
| tree | ed50e57837732ba83c300ed8e8d0befbc61a9a9f /common | |
| parent | 20ad3fa0e1af3982ddfe824aae1b8221c1f1fa0c (diff) | |
spl: Plumb in the relocating loader
This is fairly easy to use. The SPL loader sets up some fields in the
spl_image_info struct and calls spl_reloc_prepare(). When SPL is ready
to do the jump it must call spl_reloc_jump() instead of jump_to_image().
Add this logic.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/spl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 09e6dc26f5e..7cfbab06419 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -826,6 +826,18 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } spl_board_prepare_for_boot(); + + if (CONFIG_IS_ENABLED(RELOC_LOADER)) { + int ret; + + ret = spl_reloc_jump(&spl_image, jump_to_image); + if (ret) { + if (xpl_phase() == PHASE_VPL) + printf("jump failed %d\n", ret); + hang(); + } + } + jump_to_image(&spl_image); } |
