summaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-04-11 07:36:45 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-04-19 12:47:33 +0200
commit26d13d4539ca6e7ae5980b52ffecfdb1a51dd8da (patch)
tree28ef487677efbdcf6a8a6b1b21b2969291293b04 /cmd/bootefi.c
parent0be049083aa16ca181a5fbef34b38ecf01947dc6 (diff)
efi_selftest: use do_bootefi_exec()
The EFI selftest should match executing a real EFI binary as closely as possible. Use do_bootefi_exec() to enter the EFI selftest. Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index dce8285b047..cea6d356ee6 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -38,6 +38,9 @@ static efi_status_t bootefi_run_prepare(const char *load_options_path,
if (ret != EFI_SUCCESS)
return ret;
+ (*image_objp)->auth_status = EFI_IMAGE_AUTH_PASSED;
+ (*image_objp)->entry = efi_selftest;
+
/* Transfer environment variable as load options */
return efi_env_set_load_options((efi_handle_t)*image_objp,
load_options_path,
@@ -106,8 +109,8 @@ static int do_efi_selftest(void)
return CMD_RET_FAILURE;
/* Execute the test */
- ret = EFI_CALL(efi_selftest(&image_obj->header, &systab));
- free(loaded_image_info->load_options);
+ ret = do_bootefi_exec(&image_obj->header,
+ loaded_image_info->load_options);
efi_free_pool(test_device_path);
efi_free_pool(test_image_path);
if (ret != EFI_SUCCESS)