Pass the entry point info to bl1_plat_prepare_exit()
authorSandrine Bailleux <sandrine.bailleux@arm.com>
Tue, 10 Nov 2015 15:01:57 +0000 (15:01 +0000)
committerAchin Gupta <achin.gupta@arm.com>
Thu, 26 Nov 2015 21:32:04 +0000 (21:32 +0000)
This patch modifies the prototype of the bl1_plat_prepare_exit()
platform API to pass the address of the entry point info structure
received from BL2. The structure contains information that can be
useful, depending on the kind of clean up or bookkeeping operations
to perform.

The weak implementation of this function ignores this argument to
preserve platform backwards compatibility.

NOTE: THIS PATCH MAY BREAK PLATFORM PORTS THAT ARE RELYING ON THE
FORMER PROTOTYPE OF THE BL1_PLAT_PREPARE_EXIT() API.

Change-Id: I3fc18f637de06c85719c4ee84c85d6a4572a0fdb

bl1/aarch64/bl1_exceptions.S
docs/porting-guide.md
plat/common/aarch64/platform_helpers.S

index ee66ef00c26a74c10a9e83bb23f4b19ba00da574..5415d3955826cd819730411cfef14202e1310c6b 100644 (file)
@@ -213,6 +213,7 @@ debug_loop:
        b       debug_loop
 #endif
 
+       mov     x0, x20
        bl      bl1_plat_prepare_exit
 
        ldp     x6, x7, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x30)]
index 6e71025cc6815cd7bf239a13ab393331186e1e04..2c828c2717b88c16c2a9c806c9f21734fc3568a2 100644 (file)
@@ -810,13 +810,14 @@ represents the entry point system state for BL2.
 
 ### 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)
index 56b88bc0e5ae04173a16dd7251cf759d480df62b..29f01ce9e0a72c0a76fc17c13f777af81de5ae93 100644 (file)
@@ -115,7 +115,7 @@ func plat_disable_acp
 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
         * -----------------------------------------------------
         */