efi_loader: move efi_save_gd() call to board_r.c
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 9 Apr 2019 22:32:07 +0000 (00:32 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 12 Apr 2019 20:00:42 +0000 (22:00 +0200)
commite7ac009b0063b8e9bafa5c39cacab4948ae8238d
treea18f4661bcd7a4329b9494a64977d53111f9d343
parent2337741fb4379754340149f2d4fdaf8071274826
efi_loader: move efi_save_gd() call to board_r.c

The first functions of the UEFI sub-system are invoked before reaching the
U-Boot shell, e.g. efi_set_bootdev(), efi_dp_from_name(),
efi_dp_from_file(). We should be able to print out device paths for
debugging purposes here.

When printing device paths via printf("%pD\n", dp) this invokes functions
defined as EFIAPI. So efi_save_gd() must be called beforehand.

So let's move the efi_save_gd() call to function initr_reloc_global_data(()
in board_r.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
common/board_r.c
lib/efi_driver/efi_uclass.c
lib/efi_loader/efi_setup.c