From c9f9d9ea7d12a6d36af50869ebc4f098e623bfd9 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Tue, 18 Dec 2018 13:49:46 +0000 Subject: Move BL1 and BL2 private defines to bl_common.h The definitions in bl1/bl1_private.h and bl2/bl2_private.h are useful for platforms that may need to access them. Change-Id: Ifd1880f855ddafcb3bfcaf1ed4a4e0f121eda174 Signed-off-by: Antonio Nino Diaz --- include/common/bl_common.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/common') diff --git a/include/common/bl_common.h b/include/common/bl_common.h index c12b08bb..f7b3b9c7 100644 --- a/include/common/bl_common.h +++ b/include/common/bl_common.h @@ -78,7 +78,12 @@ IMPORT_SYM(unsigned long, __RO_START__, BL_CODE_BASE); IMPORT_SYM(unsigned long, __RO_END__, BL_CODE_END); #endif -#if defined(IMAGE_BL2) +#if defined(IMAGE_BL1) +IMPORT_SYM(uintptr_t, __BL1_ROM_END__, BL1_ROM_END); + +IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE); +IMPORT_SYM(uintptr_t, __BL1_RAM_END__, BL1_RAM_LIMIT); +#elif defined(IMAGE_BL2) IMPORT_SYM(unsigned long, __BL2_END__, BL2_END); #elif defined(IMAGE_BL2U) IMPORT_SYM(unsigned long, __BL2U_END__, BL2U_END); @@ -89,6 +94,17 @@ IMPORT_SYM(unsigned long, __BL31_END__, BL31_END); IMPORT_SYM(unsigned long, __BL32_END__, BL32_END); #endif /* IMAGE_BLX */ +/* The following symbols are only exported from the BL2 at EL3 linker script. */ +#if BL2_IN_XIP_MEM && defined(IMAGE_BL2) +extern uintptr_t __BL2_ROM_END__; +#define BL2_ROM_END (uintptr_t)(&__BL2_ROM_END__) + +extern uintptr_t __BL2_RAM_START__; +extern uintptr_t __BL2_RAM_END__; +#define BL2_RAM_BASE (uintptr_t)(&__BL2_RAM_START__) +#define BL2_RAM_LIMIT (uintptr_t)(&__BL2_RAM_END__) +#endif /* BL2_IN_XIP_MEM */ + /* * 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 -- cgit v1.2.3