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
diff --git a/include/bl1.h b/include/bl1.h
index 81b5bc4..9920cb8 100644
--- a/include/bl1.h
+++ b/include/bl1.h
@@ -45,7 +45,7 @@
* Function prototypes
*****************************************/
extern void bl1_platform_setup(void);
-extern meminfo bl1_get_sec_mem_layout(void);
+extern meminfo *bl1_plat_sec_mem_layout(void);
#endif /*__ASSEMBLY__*/
diff --git a/include/bl2.h b/include/bl2.h
index 3981a86..e105641 100644
--- a/include/bl2.h
+++ b/include/bl2.h
@@ -42,7 +42,7 @@
* Function prototypes
*****************************************/
extern void bl2_platform_setup(void);
-extern meminfo bl2_get_sec_mem_layout(void);
+extern meminfo *bl2_plat_sec_mem_layout(void);
extern meminfo bl2_get_ns_mem_layout(void);
#endif /* __BL2_H__ */
diff --git a/include/bl31.h b/include/bl31.h
index dbf7e5a..acb1229 100644
--- a/include/bl31.h
+++ b/include/bl31.h
@@ -42,7 +42,7 @@
* Function prototypes
******************************************************************************/
extern void bl31_platform_setup(void);
-extern meminfo bl31_get_sec_mem_layout(void);
+extern meminfo *bl31_plat_sec_mem_layout(void);
extern el_change_info* bl31_get_next_image_info(unsigned long);
extern void gic_cpuif_deactivate(unsigned int);
extern void gic_cpuif_setup(unsigned int);