From e7ac009b0063b8e9bafa5c39cacab4948ae8238d Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 10 Apr 2019 00:32:07 +0200 Subject: 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 --- lib/efi_loader/efi_setup.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/efi_loader') diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index a908843d87..6e9d5fe5b7 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -20,13 +20,6 @@ efi_status_t efi_init_obj_list(void) { efi_status_t ret = EFI_SUCCESS; - /* - * On the ARM architecture gd is mapped to a fixed register (r9 or x18). - * As this register may be overwritten by an EFI payload we save it here - * and restore it on every callback entered. - */ - efi_save_gd(); - /* * Variable PlatformLang defines the language that the machine has been * configured for. -- cgit