Add linker symbol declarations to bl_common.h
authorDan Handley <dan.handley@arm.com>
Mon, 27 Apr 2015 10:49:22 +0000 (11:49 +0100)
committerDan Handley <dan.handley@arm.com>
Tue, 28 Apr 2015 18:50:56 +0000 (19:50 +0100)
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

bl32/tsp/tsp_main.c
include/common/bl_common.h

index d8895b2f9539ebb04bb22ce34a90f154f6ea99e3..2a4ce4f9d493883cc3b89565c0b80ca24883a67a 100644 (file)
 #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
index b36c9d35d51adf95d21717e055f53ca4ea45f3c8..33b75f1884ada5da2ccc81965a9c65db38f6a971 100644 (file)
 
 #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.