diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2013-11-28 14:55:58 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2013-12-12 16:06:48 +0000 |
commit | ee12f6f7497882fdcc8acc7774c516739296799e (patch) | |
tree | 249e6ef6b93045864d616ee8db1294563ebf783c /docs | |
parent | dc98e5370ac81965ebcc322a279b8aad51258d9a (diff) | |
download | arm-trusted-firmware-ee12f6f7497882fdcc8acc7774c516739296799e.tar.gz |
Remove useless copies of meminfo structures
Platform setup code has to reserve some memory for storing the
memory layout information. It is populated in early platform setup
code.
blx_get_sec_mem_layout() functions used to return a copy of this
structure. This patch modifies blx_get_sec_mem_layout() functions
so that they now directly return a pointer to their memory layout
structure. It ensures that the memory layout returned by
blx_get_sec_mem_layout() is always up-to-date and also avoids a
useless copy of the meminfo structure.
Also rename blx_get_sec_mem_layout() to blx_plat_sec_mem_layout()
to make it clear those functions are platform specific.
Change-Id: Ic7a6f9d6b6236b14865ab48a9f5eff545ce56551
Diffstat (limited to 'docs')
-rw-r--r-- | docs/change-log.md | 5 | ||||
-rw-r--r-- | docs/porting-guide.md | 44 |
2 files changed, 28 insertions, 21 deletions
diff --git a/docs/change-log.md b/docs/change-log.md index 4e5b9aa..e813cb1 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -73,6 +73,11 @@ Detailed changes since last release CPU_SUSPEND and CPU_OFF apis simultaneously across cpus & clusters should not result in unexpected behaviour. +* The API to return the memory layout structures for each bootloader stage has + undergone change. A pointer to these structures is returned instead of their + copy. + + ARM Trusted Firmware - version 0.2 ================================== diff --git a/docs/porting-guide.md b/docs/porting-guide.md index c0e6ace..aa1451f 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -436,14 +436,15 @@ implementation of the generic timer counter and initializes the console. This function helps fulfill requirement 5 above. -### Function : bl1_get_sec_mem_layout() [mandatory] +### Function : bl1_plat_sec_mem_layout() [mandatory] Argument : void - Return : meminfo + Return : meminfo * -This function executes with the MMU and data caches enabled. The `meminfo` -structure returned by this function must contain the extents and availability of -secure RAM for the BL1 stage. +This function should only be called on the cold boot path. It executes with the +MMU and data caches enabled. The pointer returned by this function must point to +a `meminfo` structure containing the extents and availability of secure RAM for +the BL1 stage. meminfo.total_base = Base address of secure RAM visible to BL1 meminfo.total_size = Size of secure RAM visible to BL1 @@ -533,7 +534,7 @@ by the primary CPU. The arguments to this function are: The platform must copy the contents of the `meminfo` structure into a private variable as the original memory may be subsequently overwritten by BL2. The copied structure is made available to all BL2 code through the -`bl2_get_sec_mem_layout()` function. +`bl2_plat_sec_mem_layout()` function. ### Function : bl2_plat_arch_setup() [mandatory] @@ -576,17 +577,17 @@ initialized by the platform to point to memory where an `el_change_info` structure can be populated. -### Function : bl2_get_sec_mem_layout() [mandatory] +### Function : bl2_plat_sec_mem_layout() [mandatory] Argument : void - Return : meminfo + Return : meminfo * -This function may execute with the MMU and data caches enabled if the platform -port does the necessary initialization in `bl2_plat_arch_setup()`. It is only -called by the primary CPU. +This function should only be called on the cold boot path. It may execute with +the MMU and data caches enabled if the platform port does the necessary +initialization in `bl2_plat_arch_setup()`. It is only called by the primary CPU. -The purpose of this function is to return a `meminfo` structure populated with -the extents of secure RAM available for BL2 to use. See +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. @@ -663,7 +664,7 @@ by the primary CPU. The arguments to this function are: The platform must copy the contents of the `meminfo` structure into a private variable as the original memory may be subsequently overwritten by BL3-1. The copied structure is made available to all BL3-1 code through the -`bl31_get_sec_mem_layout()` function. +`bl31_plat_sec_mem_layout()` function. ### Function : bl31_plat_arch_setup() [mandatory] @@ -713,17 +714,18 @@ function must return a pointer to the `el_change_info` structure (that was copied during `bl31_early_platform_setup()`). -### Function : bl31_get_sec_mem_layout() [mandatory] +### Function : bl31_plat_sec_mem_layout() [mandatory] Argument : void - Return : meminfo + Return : meminfo * -This function may execute with the MMU and data caches enabled if the platform -port does the necessary initializations in `bl31_plat_arch_setup()`. It is only -called by the primary CPU. +This function should only be called on the cold boot path. This function may +execute with the MMU and data caches enabled if the platform port does the +necessary initializations in `bl31_plat_arch_setup()`. It is only called by the +primary CPU. -The purpose of this function is to return a `meminfo` structure populated with -the extents of secure RAM available for BL3-1 to use. See +The purpose of this function is to return a pointer to a `meminfo` structure +populated with the extents of secure RAM available for BL3-1 to use. See `bl31_early_platform_setup()` above. |