Commit f134ed7df1167c6b2f0a62e3765abedced3feacc
1 parent
9b2174984e
Exists in
v2017.01-smarct4x
and in
30 other branches
efi: Display the correct initcall pre-relocation values
With EFI the start address of U-Boot is specified differently. We could consider just setting GD_FLG_RELOC and then setting up reloc_off. But that flag has other implementations and we are not able to use U-Boot relocation which this flag implies. Instead, just add a special case for EFI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
lib/initcall.c
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | |
7 | 7 | #include <common.h> |
8 | 8 | #include <initcall.h> |
9 | +#include <efi.h> | |
9 | 10 | |
10 | 11 | DECLARE_GLOBAL_DATA_PTR; |
11 | 12 | |
... | ... | @@ -19,6 +20,9 @@ |
19 | 20 | |
20 | 21 | if (gd->flags & GD_FLG_RELOC) |
21 | 22 | reloc_ofs = gd->reloc_off; |
23 | +#ifdef CONFIG_EFI_APP | |
24 | + reloc_ofs = (unsigned long)image_base; | |
25 | +#endif | |
22 | 26 | debug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs); |
23 | 27 | if (gd->flags & GD_FLG_RELOC) |
24 | 28 | debug(" (relocated to %p)\n", (char *)*init_fnc_ptr); |