aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/hikey
diff options
context:
space:
mode:
authorJoel Hutton <Joel.Hutton@Arm.com>2018-03-21 11:40:57 +0000
committerJoel Hutton <Joel.Hutton@Arm.com>2018-03-27 13:20:27 +0100
commit9f85f9e3796f1c351bbc4c8436dc66d83c140b71 (patch)
treed9cbd296c7fa0205323ebb5da1ab466b3227f5d5 /plat/hisilicon/hikey
parentf13ef37a38cec17f72f08dc63bbbe546a54d78a7 (diff)
downloadtrusted-firmware-a-9f85f9e3796f1c351bbc4c8436dc66d83c140b71.tar.gz
Clean usage of void pointers to access symbols
Void pointers have been used to access linker symbols, by declaring an extern pointer, then taking the address of it. This limits symbols values to aligned pointer values. To remove this restriction an IMPORT_SYM macro has been introduced, which declares it as a char pointer and casts it to the required type. Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0 Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Diffstat (limited to 'plat/hisilicon/hikey')
-rw-r--r--plat/hisilicon/hikey/hikey_bl1_setup.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/plat/hisilicon/hikey/hikey_bl1_setup.c b/plat/hisilicon/hikey/hikey_bl1_setup.c
index 69b194a53a..9ede1dbc7f 100644
--- a/plat/hisilicon/hikey/hikey_bl1_setup.c
+++ b/plat/hisilicon/hikey/hikey_bl1_setup.c
@@ -23,23 +23,6 @@
#include "hikey_def.h"
#include "hikey_private.h"
-/*
- * Declarations of linker defined symbols which will help us find the layout
- * of trusted RAM
- */
-extern unsigned long __COHERENT_RAM_START__;
-extern unsigned long __COHERENT_RAM_END__;
-
-/*
- * The next 2 constants identify the extents of the coherent memory region.
- * These addresses are used by the MMU setup code and therefore they must be
- * page-aligned. It is the responsibility of the linker script to ensure that
- * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to
- * page-aligned addresses.
- */
-#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__)
-#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__)
-
/* Data structure which holds the extents of the trusted RAM for BL1 */
static meminfo_t bl1_tzram_layout;
@@ -103,8 +86,8 @@ void bl1_plat_arch_setup(void)
bl1_tzram_layout.total_size,
BL1_RO_BASE,
BL1_RO_LIMIT,
- BL1_COHERENT_RAM_BASE,
- BL1_COHERENT_RAM_LIMIT);
+ BL_COHERENT_RAM_BASE,
+ BL_COHERENT_RAM_END);
}
/*