@@ -976,6 +976,7 @@ static const init_fnc_t init_sequence_f[] = {
reserve_bootstage,
reserve_bloblist,
reserve_arch,
+ INITCALL_EVENT(EVT_RESERVE),
reserve_stacks,
dram_init_banksize,
show_dram_config,
@@ -37,6 +37,7 @@ const char *const type_name[] = {
/* init hooks */
"misc_init_f",
"fsp_init_r",
+ "reserve",
"settings_r",
"last_stage_init",
@@ -104,6 +104,17 @@ enum event_t {
*/
EVT_FSP_INIT_F,
+ /**
+ * @EVT_RESERVE:
+ * This event is trigged after all other reservations are done, just
+ * before the stack is placed. It can be used to reserve memory for any
+ * other purpose. The memory thus reserved is available immediately and
+ * will remain valid after relocation.
+ *
+ * To reserve memory, subtract the required amount of bytes from
+ * gd->start_addr_sp
+ */
+ EVT_RESERVE,
/**
* @EVT_SETTINGS_R:
* This event is triggered post-relocation and before console init.
Add an event which allows memory to be reserved, for use after relocation. This can be used by subsystems which need their own memory. This could be used to clean up reserve_arch() but that is left for a separate series. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) common/board_f.c | 1 + common/event.c | 1 + include/event.h | 11 +++++++++++ 3 files changed, 13 insertions(+)