diff --git a/bl1/aarch64/bl1_exceptions.S b/bl1/aarch64/bl1_exceptions.S index ee66ef0..5415d39 100644 --- a/bl1/aarch64/bl1_exceptions.S +++ b/bl1/aarch64/bl1_exceptions.S @@ -213,6 +213,7 @@ b debug_loop #endif + mov x0, x20 bl bl1_plat_prepare_exit ldp x6, x7, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x30)] diff --git a/docs/porting-guide.md b/docs/porting-guide.md index 6e71025..2c828c2 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -810,13 +810,14 @@ ### Function : bl1_plat_prepare_exit() [optional] - Argument : void + Argument : entry_point_info_t * Return : void -This function is called prior to exiting BL1 in response to the `RUN_IMAGE_SMC` +This function is called prior to exiting BL1 in response to the `RUN_IMAGE` SMC request raised by BL2. It should be used to perform platform specific clean up -or bookkeeping operations before transferring control to the next image. This -function runs with MMU disabled. +or bookkeeping operations before transferring control to the next image. It +receives the address of the `entry_point_info_t` structure passed from BL2. +This function runs with MMU disabled. 3.2 Boot Loader Stage 2 (BL2) diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index 56b88bc..29f01ce 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -115,7 +115,7 @@ endfunc plat_disable_acp /* ----------------------------------------------------- - * void bl1_plat_prepare_exit(void); + * void bl1_plat_prepare_exit(entry_point_info_t *ep_info); * Called before exiting BL1. Default: do nothing * ----------------------------------------------------- */