aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Handley <dan.handley@arm.com>2015-04-27 11:49:22 +0100
committerDan Handley <dan.handley@arm.com>2015-04-28 19:50:56 +0100
commit90b3a6acb50a0361698c3674d487335f6abb91b8 (patch)
treee8f4ba3f9608d84f4907b6e59636e138250a6d33
parentc04d2606f6fb82aaf1fa341e61b834fff8f3db1c (diff)
Add linker symbol declarations to bl_common.h
Add extern declarations of linker symbols to bl_common.h. These are used by platform ports to determine the memory layout of BL images. Adding the declarations to this file facilitates removal of these declarations from the platform porting source files in subsequent patches. Also remove the linker symbol declarations from common TSP source code. Change-Id: I8ed0426bc815317c4536b588e4e78bc15b4fe91c
-rw-r--r--bl32/tsp/tsp_main.c6
-rw-r--r--include/common/bl_common.h20
2 files changed, 20 insertions, 6 deletions
diff --git a/bl32/tsp/tsp_main.c b/bl32/tsp/tsp_main.c
index d8895b2..2a4ce4f 100644
--- a/bl32/tsp/tsp_main.c
+++ b/bl32/tsp/tsp_main.c
@@ -38,12 +38,6 @@
#include <tsp.h>
#include "tsp_private.h"
-/*******************************************************************************
- * Declarations of linker defined symbols which will help us find the layout
- * of trusted SRAM
- ******************************************************************************/
-extern unsigned long __RO_START__;
-extern unsigned long __BL32_END__;
/*******************************************************************************
* Lock to control access to the console
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index b36c9d3..33b75f1 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -110,6 +110,26 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+/*
+ * Declarations of linker defined symbols to help determine memory layout of
+ * BL images
+ */
+extern unsigned long __RO_START__;
+extern unsigned long __RO_END__;
+#if IMAGE_BL2
+extern unsigned long __BL2_END__;
+#elif IMAGE_BL31
+extern unsigned long __BL31_END__;
+#elif IMAGE_BL32
+extern unsigned long __BL32_END__;
+#endif /* IMAGE_BLX */
+
+#if USE_COHERENT_MEM
+extern unsigned long __COHERENT_RAM_START__;
+extern unsigned long __COHERENT_RAM_END__;
+#endif
+
+
/*******************************************************************************
* Structure used for telling the next BL how much of a particular type of
* memory is available for its use and how much is already used.