diff options
author | Etienne Carriere <etienne.carriere@linaro.org> | 2018-06-27 11:56:44 +0200 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2018-06-27 13:26:11 +0200 |
commit | ae967ad56d8138b6762f455ccd9229b77cede806 (patch) | |
tree | 782f4b0f0c4e806589dbb3daf295ae768c36ef13 /core | |
parent | cf1dc544865969834654f91cb44f4d861a9277a0 (diff) |
plat-stm: fix MIN/MAX macro issue in platform_config.h
Use MIN_UNSAFE/MAX_UNSAFE macros as MAX/MIN macros fail to build
from in current platform_config.h imaplement with the error trace
below:
In file included from core/arch/arm/include/arm.h:8:0,
from core/arch/arm/include/kernel/thread.h:11,
from core/arch/arm/kernel/asm-defines.c:7:
lib/libutils/ext/include/util.h:24:16: error: missing binary operator before token "("
(__extension__({ __typeof__(a) _a = (a); \
^
core/arch/arm/plat-stm/./platform_config.h:190:25: note: in expansion of macro ‘MAX’
#define STM_SECDDR_END MAX(TZSRAM_BASE + TZSRAM_SIZE, \
^~~
core/arch/arm/plat-stm/./platform_config.h:204:6: note: in expansion of macro ‘STM_SECDDR_END’
#if (STM_SECDDR_END < 0x80000000ULL)
^~~~~~~~~~~~~~
make: *** [out/core/include/generated/.asm-defines.s] Error 1
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/arch/arm/plat-stm/platform_config.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/arch/arm/plat-stm/platform_config.h b/core/arch/arm/plat-stm/platform_config.h index 5a3c5726..0cf4ddcb 100644 --- a/core/arch/arm/plat-stm/platform_config.h +++ b/core/arch/arm/plat-stm/platform_config.h @@ -186,11 +186,11 @@ /* Carvout out secure RAM range (emulated SRAM is expected near DRAM) */ #if defined(CFG_WITH_PAGER) && defined(TZSRAM_BASE) #if TZSRAM_BASE >= CFG_DDR_START -#define STM_SECDDR_BASE MIN(TZSRAM_BASE, TZDRAM_BASE) -#define STM_SECDDR_END MAX(TZSRAM_BASE + TZSRAM_SIZE, \ - TZDRAM_BASE + TZDRAM_SIZE) -#endif -#endif +#define STM_SECDDR_BASE MIN_UNSAFE(TZSRAM_BASE, TZDRAM_BASE) +#define STM_SECDDR_END MAX_UNSAFE(TZSRAM_BASE + TZSRAM_SIZE, \ + TZDRAM_BASE + TZDRAM_SIZE) +#endif /*TZSRAM_BASE >= CFG_DDR_START*/ +#endif /*CFG_WITH_PAGER && TZSRAM_BASE*/ #ifndef STM_SECDDR_BASE #define STM_SECDDR_BASE TZDRAM_BASE |