summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRui Miguel Silva <[email protected]>2022-05-11 10:55:40 +0100
committerTom Rini <[email protected]>2022-06-22 11:35:47 -0400
commitbfef72e4dd1c1d6dfc680867bf24a78597ab0438 (patch)
treed403ba89ce489bb4a0e56acd7342ecdff45a95de /include
parenta47ce34403f27178c1264bf60496bbb9a21e5842 (diff)
cmd: load: add load command for memory mapped
cp.b is used a lot as a way to load binaries to memory and execute them, however we may need to integrate this with the efi subsystem to set it up as a bootdev. So, introduce a loadm command that will be consistent with the other loadX commands and will call the efi API's. ex: loadm $kernel_addr $kernel_addr_r $kernel_size with this a kernel with CONFIG_EFI_STUB enabled will be loaded and then subsequently booted with bootefi command. Signed-off-by: Rui Miguel Silva <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/efi_loader.h2
-rw-r--r--include/test/suites.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index c1e00ebac39..31de191e3df 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -591,6 +591,8 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle,
void efi_save_gd(void);
/* Call this to relocate the runtime section to an address space */
void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map);
+/* Call this to get image parameters */
+void efi_get_image_parameters(void **img_addr, size_t *img_size);
/* Add a new object to the object list. */
void efi_add_handle(efi_handle_t obj);
/* Create handle */
diff --git a/include/test/suites.h b/include/test/suites.h
index ee6858a802a..ddb8827fdb1 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -39,6 +39,7 @@ int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc,
int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_mem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);