summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorYatharth Kochar <yatharth.kochar@arm.com>2016-09-12 16:08:41 +0100
committerYatharth Kochar <yatharth.kochar@arm.com>2016-09-20 16:16:42 +0100
commit7260022636e3b0d3ef641cbda135d98f9a7df177 (patch)
tree6b6e59c23ca8242a4798230a34e8b7286ff91054 /docs
parent131f7cd4016732a572c4341fc4e13dbf3ceae82a (diff)
Add new version of image loading.
This patch adds capability to load BL images based on image descriptors instead of hard coded way of loading BL images. This framework is designed such that it can be readily adapted by any BL stage that needs to load images. In order to provide the above capability the following new platform functions are introduced: bl_load_info_t *plat_get_bl_image_load_info(void); This function returns pointer to the list of images that the platform has populated to load. bl_params_t *plat_get_next_bl_params(void); This function returns a pointer to the shared memory that the platform has kept aside to pass trusted firmware related information that next BL image needs. void plat_flush_next_bl_params(void); This function flushes to main memory all the params that are passed to next image. int bl2_plat_handle_post_image_load(unsigned int image_id) This function can be used by the platforms to update/use image information for given `image_id`. `desc_image_load.c` contains utility functions which can be used by the platforms to generate, load and executable, image list based on the registered image descriptors. This patch also adds new version of `load_image/load_auth_image` functions in-order to achieve the above capability. Following are the changes for the new version as compared to old: - Refactor the signature and only keep image_id and image_info_t arguments. Removed image_base argument as it is already passed through image_info_t. Given that the BL image base addresses and limit/size are already provided by the platforms, the meminfo_t and entry_point_info arguments are not needed to provide/reserve the extent of free memory for the given BL image. - Added check for the image size against the defined max size. This is needed because the image size could come from an unauthenticated source (e.g. the FIP header). To make this check, new member is added to the image_info_t struct for identifying the image maximum size. New flag `LOAD_IMAGE_V2` is added in the Makefile. Default value is 0. NOTE: `TRUSTED_BOARD_BOOT` is currently not supported when `LOAD_IMAGE_V2` is enabled. Change-Id: Ia7b643f4817a170d5a2fbf479b9bc12e63112e79
Diffstat (limited to 'docs')
-rw-r--r--docs/porting-guide.md44
-rw-r--r--docs/user-guide.md6
2 files changed, 48 insertions, 2 deletions
diff --git a/docs/porting-guide.md b/docs/porting-guide.md
index 195c9374..f42ff649 100644
--- a/docs/porting-guide.md
+++ b/docs/porting-guide.md
@@ -721,7 +721,6 @@ Firmware represents the power domain topology and how this relates to the
linear CPU index, please refer [Power Domain Topology Design].
-
2.4 Common optional modifications
---------------------------------
@@ -841,10 +840,37 @@ and must be implemented in assembly because it may be called before the C
environment is initialized.
Note: The address from where it was called is stored in x30 (Link Register).
-
The default implementation simply spins.
+### Function : plat_get_bl_image_load_info()
+
+ Argument : void
+ Return : bl_load_info_t *
+
+This function returns pointer to the list of images that the platform has
+populated to load. This function is currently invoked in BL2 to load the
+BL3xx images, when LOAD_IMAGE_V2 is enabled.
+
+### Function : plat_get_next_bl_params()
+
+ Argument : void
+ Return : bl_params_t *
+
+This function returns a pointer to the shared memory that the platform has
+kept aside to pass trusted firmware related information that next BL image
+needs. This function is currently invoked in BL2 to pass this information to
+the next BL image, when LOAD_IMAGE_V2 is enabled.
+
+### Function : plat_flush_next_bl_params()
+
+ Argument : void
+ Return : void
+
+This function flushes to main memory all the image params that are passed to
+next image. This function is currently invoked in BL2 to flush this information
+to the next BL image, when LOAD_IMAGE_V2 is enabled.
+
3. Modifications specific to a Boot Loader stage
-------------------------------------------------
@@ -1175,6 +1201,20 @@ 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.
+
+### Function : bl2_plat_handle_post_image_load() [mandatory]
+
+ 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 to handle
+BL image specific information based on the `image_id` passed, when
+LOAD_IMAGE_V2 is enabled.
+
+Following functions are required only when LOAD_IMAGE_V2 is disabled.
+
### Function : bl2_plat_get_scp_bl2_meminfo() [mandatory]
Argument : meminfo *
diff --git a/docs/user-guide.md b/docs/user-guide.md
index d545262c..d7d743ac 100644
--- a/docs/user-guide.md
+++ b/docs/user-guide.md
@@ -430,6 +430,12 @@ performed.
pages" section in [Firmware Design]. This flag is disabled by default and
affects all BL images.
+* `LOAD_IMAGE_V2`: Boolean option to enable support for new version (v2) of
+ image loading, which provides more flexibility and scalability around what
+ images are loaded and executed during boot. Default is 0.
+ Note: `TRUSTED_BOARD_BOOT` is currently not supported when `LOAD_IMAGE_V2`
+ is enabled.
+
#### ARM development platform specific build options
* `ARM_TSP_RAM_LOCATION`: location of the TSP binary. Options: