
Since EFI does not relocate and uses the same global_data pointer throughout the board-init process, drop this unnecessary setup, to avoid a hang.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v5)
Changes in v5: - Add new patch to avoid setting up global_data again with EFI
common/board_r.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/board_r.c b/common/board_r.c index 31a59c585a8..8b5948100b1 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -817,9 +817,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) * TODO(sjg@chromium.org): Consider doing this for all archs, or * dropping the new_gd parameter. */ -#if CONFIG_IS_ENABLED(X86_64) - arch_setup_gd(new_gd); -#endif + if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP)) + arch_setup_gd(new_gd);
#ifdef CONFIG_NEEDS_MANUAL_RELOC int i;