diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-15 20:14:18 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-21 16:07:52 -0500 |
commit | a6c49161cb2f6c7ddfc0a76747ac9bf6307fb9d2 (patch) | |
tree | e8eb63d612a5a6efeb3d4e16c9f0cd9b0c27fb99 /include/bootm.h | |
parent | 31fda96bb62445c0b190cc499184dc497f7f8fdd (diff) |
bootm: Drop arguments from do_bootm_states()
Use the bootm_info struct to hold the information required by bootm.
Now that none of the functions called from do_bootm_states() needs an
argv[] list, change the arguments of do_bootm_states() as well. Take
care to use the same value for boot_progress even though it is a little
inconsistent.
For booti make sure it only uses argv[] and argc at the top of the
function, so we can eventually refactor to remove these parameters.
With bootm, some OSes need access to the arguments provided to the
command, so set these up in the bootm_info struct, for bootm only.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/bootm.h')
-rw-r--r-- | include/bootm.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/include/bootm.h b/include/bootm.h index 81f2514f1b..8010d2f981 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -132,33 +132,24 @@ int bootm_find_images(ulong img_addr, const char *conf_ramdisk, int bootm_measure(struct bootm_headers *images); /** - * Execute selected states of the bootm command. - * - * Note the arguments to this state must be the first argument, Any 'bootm' - * or sub-command arguments must have already been taken. + * do_bootm_states() - Execute selected states of the bootm command. * * Note that if states contains more than one flag it MUST contain - * BOOTM_STATE_START, since this handles and consumes the command line args. + * BOOTM_STATE_START, since this handles the addr_fit, conf_ramdisk and conf_fit + * members of @bmi * - * Also note that aside from boot_os_fn functions and bootm_load_os no other - * functions we store the return value of in 'ret' may use a negative return + * Also note that aside from boot_os_fn functions and bootm_load_os, no other + * functions store the return value of in 'ret' may use a negative return * value, without special handling. * - * @param cmdtp Pointer to bootm command table entry - * @param flag Command flags (CMD_FLAG_...) - * @param argc Number of subcommand arguments (0 = no arguments) - * @param argv Arguments - * @param states Mask containing states to run (BOOTM_STATE_...) - * @param images Image header information - * @param boot_progress 1 to show boot progress, 0 to not do this + * @bmi: bootm information + * @states Mask containing states to run (BOOTM_STATE_...) * Return: 0 if ok, something else on error. Some errors will cause this * function to perform a reboot! If states contains BOOTM_STATE_OS_GO * then the intent is to boot an OS, so this function will not return * unless the image type is standalone. */ -int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[], int states, struct bootm_headers *images, - int boot_progress); +int do_bootm_states(struct bootm_info *bmi, int states); void arch_preboot_os(void); |