int board_return_to_bootrom(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
-#ifdef CONFIG_BOOTSTAGE_STASH
int ret;
bootstage_mark_name(BOOTSTAGE_ID_END_TPL, "end tpl");
- ret = bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
- CONFIG_BOOTSTAGE_STASH_SIZE);
+ ret = bootstage_stash_default();
if (ret)
debug("Failed to stash bootstage: err=%d\n", ret);
-#endif
+
back_to_bootrom(BROM_BOOT_NEXTSTAGE);
return 0;
config PRE_CON_BUF_SZ
default 4096
-config BOOTSTAGE_STASH_ADDR
- default 0xC3000000
-
if BOOTCOUNT_GENERIC
config SYS_BOOTCOUNT_SINGLEWORD
default y
config PRE_CON_BUF_SZ
default 4096
-config BOOTSTAGE_STASH_ADDR
- default 0xC3000000
-
if BOOTCOUNT_GENERIC
config SYS_BOOTCOUNT_SINGLEWORD
default y
config PRE_CON_BUF_SZ
default 4096
-config BOOTSTAGE_STASH_ADDR
- default 0x87000000
-
if DEBUG_UART
config DEBUG_UART_BOARD_INIT
ret = mp_park_aps();
if (ret)
return log_msg_ret("park", ret);
- bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
- CONFIG_BOOTSTAGE_STASH_SIZE);
+ bootstage_stash_default();
return 0;
}
config BOOTSTAGE_STASH_ADDR
hex "Address to stash boot timing information"
- default 0x0
+ depends on BOOTSTAGE_STASH
+ default 0xC3000000 if STM32MP13X || STM32MP15X
+ default 0x87000000 if STM32MP25X
+ default 0x0 if SANDBOX
help
Provide an address which will not be overwritten by the OS when it
starts, so that it can read this information when ready.
config BOOTSTAGE_STASH_SIZE
hex "Size of boot timing stash region"
+ depends on BOOTSTAGE_STASH
default 0x1000
help
This should be large enough to hold the bootstage stash. A value of
return 0;
}
+#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH)
static int get_base_size(int argc, char *const argv[], ulong *basep,
ulong *sizep)
{
return 0;
}
+#endif
static struct cmd_tbl cmd_bootstage_sub[] = {
U_BOOT_CMD_MKENT(report, 2, 1, do_bootstage_report, "", ""),
+#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH)
U_BOOT_CMD_MKENT(stash, 4, 0, do_bootstage_stash, "", ""),
U_BOOT_CMD_MKENT(unstash, 4, 0, do_bootstage_stash, "", ""),
+#endif
};
/*
"Boot stage command",
" - check boot progress and timing\n"
"report - Print a report\n"
+#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH)
"stash [<start> [<size>]] - Stash data into memory\n"
- "unstash [<start> [<size>]] - Unstash data from memory"
+ "unstash [<start> [<size>]] - Unstash data from memory\n"
+#endif
);
if (ret)
return ret;
if (from_spl) {
- const void *stash = map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR,
- CONFIG_BOOTSTAGE_STASH_SIZE);
-
- ret = bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE);
+ ret = bootstage_stash_default();
if (ret && ret != -ENOENT) {
debug("Failed to unstash bootstage: err=%d\n", ret);
return ret;
return 0;
}
+#if IS_ENABLED(CONFIG_BOOTSTAGE_STASH)
int _bootstage_stash_default(void)
{
return bootstage_stash(map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, 0),
return bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE);
}
+#endif
int bootstage_get_size(void)
{