]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: efi: Don't set up global_data again with EFI
authorSimon Glass <sjg@chromium.org>
Wed, 29 Dec 2021 18:57:54 +0000 (11:57 -0700)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 31 Dec 2021 06:37:48 +0000 (07:37 +0100)
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>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
common/board_r.c

index 6d520662dbb050eef164dbc942b1fa89379ce547..760c2d05ed00b75956999790d6e199f294459ebf 100644 (file)
@@ -841,9 +841,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;