
A limitation of the EFI loader at present is that it does not build with sandbox. This makes it hard to write tests, since sandbox is used for most testing in U-Boot.
This series enables the EFI loader feature. It allows sandbox to build and run a trivial function which calls the EFI API to output a message.
This series is at u-boot-dm/efi-working
Changes in v3: - Add new patch to init the 'rows' and 'cols' variables - Return error value of efi_allocate_pages() - Update function comment for write_smbios_table() - Add comments on aligment - Avoid adding a new call to efi_init_obj_list() - Fix spelling of initalized - Drop incorrect map_sysmem() in map_sysmem() - Init the 'rows' and 'cols' vars to avoid a compiler error (gcc 4.8.4) - Add new patch to split out test init/uninit into functions - Rebase to master - Add new patch to reorder code in do_bootefi_exec() - Add patch to create a function to set up for running EFI code - Add new patch to rename bootefi_test_finish() to bootefi_run_finish()
Changes in v2: - Update return type of efi_smbios_register() to efi_status_t - Use return value of efi_install_configuration_table - Change return type of efi_init_obj_list() to efi_status_t - Convert #ifdef CONFIG_GENERATE_SMBIOS_TABLE to if() - Update commit message to dropping libfdt_env.h - Update to use mapmem instead of a cast - Rebase to master
Simon Glass (21): efi: Init the 'rows' and 'cols' variables efi: Update efi_smbios_register() to return error code efi: Move the init check inside efi_init_obj_list() efi: Add error checking for efi_init_obj_list() efi: Add a TODO to efi_init_obj_list() efi: Correct header order in efi_memory efi: sandbox: Adjust memory usage for sandbox sandbox: smbios: Update to support sandbox sandbox: Add a setjmp() implementation efi: sandbox: Add required linker sections efi: sandbox: Add distroboot support Define board_quiesce_devices() in a shared location Add a comment for board_quiesce_devices() efi: sandbox: Add relocation constants efi: Add a comment about duplicated ELF constants efi: sandbox: Enable EFI loader builder for sandbox efi: Split out test init/uninit into functions efi: sandbox: Add a simple 'bootefi test' command efi: Reorder code in do_bootefi_exec() efi: Create a function to set up for running EFI code efi: Rename bootefi_test_finish() to bootefi_run_finish()
arch/arm/include/asm/u-boot-arm.h | 1 - arch/sandbox/cpu/cpu.c | 13 ++ arch/sandbox/cpu/os.c | 17 +++ arch/sandbox/cpu/u-boot.lds | 29 +++++ arch/sandbox/include/asm/setjmp.h | 21 ++++ arch/sandbox/lib/Makefile | 2 +- arch/sandbox/lib/sections.c | 12 ++ arch/x86/include/asm/u-boot-x86.h | 1 - arch/x86/lib/bootm.c | 4 - cmd/bootefi.c | 203 +++++++++++++++++++----------- common/bootm.c | 4 + include/bootm.h | 8 ++ include/config_distro_bootcmd.h | 2 +- include/efi_loader.h | 12 +- include/os.h | 21 ++++ include/smbios.h | 5 +- lib/efi_loader/Kconfig | 12 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_console.c | 2 +- lib/efi_loader/efi_memory.c | 36 +++--- lib/efi_loader/efi_runtime.c | 7 ++ lib/efi_loader/efi_smbios.c | 18 ++- lib/efi_loader/efi_test.c | 17 +++ lib/smbios.c | 32 +++-- 24 files changed, 367 insertions(+), 113 deletions(-) create mode 100644 arch/sandbox/include/asm/setjmp.h create mode 100644 arch/sandbox/lib/sections.c create mode 100644 lib/efi_loader/efi_test.c