boot: Create a function for final pre-boot steps

There are various functions which announce that booting is imminent and
do related preparation. Most of these are arch-specific.

In practice, most archs do the a similar thing. It would be better to
have a common function, with perhaps some events for things that are
really arch- and board-specific.

Create a new function for this. For now, nothing uses it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-08 07:41:21 +02:00
parent 469917f67d
commit ed1c8186cf
4 changed files with 31 additions and 1 deletions

View File

@@ -16,6 +16,16 @@ struct cmd_tbl;
#define BOOTM_ERR_OVERLAP (-2)
#define BOOTM_ERR_UNIMPLEMENTED (-3)
/**
* enum bootm_final_t - flags to control bootm_final()
*
* @BOOTM_FINAL_FAKE: true to do everything except actually boot; it then
* returns to the caller
*/
enum bootm_final_t {
BOOTM_FINAL_FAKE = BIT(0),
};
/**
* struct bootm_info() - information used when processing images to boot
*
@@ -375,4 +385,11 @@ void zimage_dump(struct bootm_info *bmi, bool show_cmdline);
*/
int bootm_boot_start(ulong addr, const char *cmdline);
/**
* bootm_final() - Announce and do cleanup before boot
*
* @flags: Flags to control what this function does
*/
void bootm_final(enum bootm_final_t flags);
#endif