From ba68ef557bfa63c5a44c1f78acaccf1fb5e171f2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 1 Feb 2018 16:45:51 +0900 Subject: bl2: add bl2_plat_handle_pre_image_load() There are cases where we need to manipulate image information before the load. For example, for decompressing data, we cannot load the compressed images to their final destination. Instead, we need to load them to the temporary buffer for the decompressor. Signed-off-by: Masahiro Yamada --- docs/porting-guide.rst | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index 7683ded0..57da340a 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -1424,10 +1424,22 @@ The purpose of this function is to return a pointer to a ``meminfo`` structure populated with the extents of secure RAM available for BL2 to use. See ``bl2_early_platform_setup()`` above. -Following function is required only when LOAD\_IMAGE\_V2 is enabled. +Following functions are optionally used only when LOAD\_IMAGE\_V2 is enabled. -Function : bl2\_plat\_handle\_post\_image\_load() [mandatory] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Function : bl2\_plat\_handle\_pre\_image\_load() [optional] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + Argument : unsigned int + Return : int + +This function can be used by the platforms to update/use image information +for given ``image_id``. This function is currently invoked in BL2 before +loading each image, when LOAD\_IMAGE\_V2 is enabled. + +Function : bl2\_plat\_handle\_post\_image\_load() [optional] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: @@ -1435,9 +1447,8 @@ Function : bl2\_plat\_handle\_post\_image\_load() [mandatory] Return : int This function can be used by the platforms to update/use image information -for given ``image_id``. This function is currently invoked in BL2 to handle -BL image specific information based on the ``image_id`` passed, when -LOAD\_IMAGE\_V2 is enabled. +for given ``image_id``. This function is currently invoked in BL2 after +loading each image, when LOAD\_IMAGE\_V2 is enabled. Following functions are required only when LOAD\_IMAGE\_V2 is disabled. -- cgit v1.2.3