summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_setup.c
AgeCommit message (Collapse)Author
2019-05-07efi_loader: clean up UEFI sub-system initializationHeinrich Schuchardt
allow_unaligned(), switch_to_non_secure_mode(), and efi_init_obj_list() are called in sequence in multiple places. Move calls to allow_unaligned() and switch_to_non_secure_mode() to efi_init_obj_list(). Remove unused includes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02efi_loader: set OsIndicationsSupported at initAKASHI Takahiro
UEFI variables should be installed using well-defined API. Currently we don't support much, but the value of OsIndicationsSupported will be updated once some features are added in the future. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Add comments. Rename a variable. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-12efi_loader: fix setting PlatformLangHeinrich Schuchardt
The UEFI variables PlatformLang and PlatformLangCodes specify the current firmware language and the list of all available languages. Currently their values are hard coded. With the patch a new configuration variable EFI_PLATFORM_LANG_CODES is provided. When initializing the UEFI subsystem this configuration variable is used to initialize PlatformLangCodes. The value of variable PlatformLang is read. If it is not set, the first language specified in EFI_PLATFORM_LANG_CODES is used to initialize PlatformLang. Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-12efi_loader: move efi_save_gd() call to board_r.cHeinrich Schuchardt
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>
2019-04-07efi_loader: variables PlatformLang and PlatformLangCodesHeinrich Schuchardt
Since TianoCore EDK2 commit d65f2cea36d1 ("ShellPkg/CommandLib: Locate proper UnicodeCollation instance") in edk2 the UEFI Shell crashes if EFI variable PlatformLang is not defined. As this variable is anyway prescribed in the UEFI 2.7 spec let's define it to L"en-US". Use the same value for PlatformLangCodes that defines the list of all supported languages. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-02-13efi_loader: move efi_init_obj_list() to a new efi_setup.cAKASHI Takahiro
The function, efi_init_obj_list(), can be shared in different pseudo efi applications, like bootefi/bootmgr as well as my efishell. Moreover, it will be utilized to extend efi initialization, for example, my "removable disk support" patch and "capsule-on-disk support" patch in the future. So with this patch, it will be moved to a new file, efi_setup.c, under lib/efi_loader and exported, making no changes in functionality. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Remove lines deactivated by #if 1 #else Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>