aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-23 16:23:07 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-01-25 16:04:11 +0000
commit3661d8e7adbf83175a85e2498dbbef7b7a67e8d5 (patch)
tree2095153b9042e8b50943ee34e2808f83d1d34521
parentbd9344f670a46125cdd8949ded75be124f34d587 (diff)
downloadplatform_external_arm-trusted-firmware-3661d8e7adbf83175a85e2498dbbef7b7a67e8d5.tar.gz
platform_external_arm-trusted-firmware-3661d8e7adbf83175a85e2498dbbef7b7a67e8d5.tar.bz2
platform_external_arm-trusted-firmware-3661d8e7adbf83175a85e2498dbbef7b7a67e8d5.zip
plat/arm: Move dynamic xlat enable logic to makefile
The PLAT_XLAT_TABLES_DYNAMIC build option, defined in platform_def.h in Arm platforms, is checked by several headers, affecting their behaviour. To avoid issues around the include ordering of the headers, the definition should be moved to the platform's makefile. Change-Id: I0e12365c8d66309122e8a20790e1641a4f480a10 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-rw-r--r--plat/arm/board/fvp/include/platform_def.h11
-rw-r--r--plat/arm/board/fvp/platform.mk18
-rw-r--r--plat/arm/board/juno/include/platform_def.h14
-rw-r--r--plat/arm/board/juno/platform.mk13
4 files changed, 30 insertions, 26 deletions
diff --git a/plat/arm/board/fvp/include/platform_def.h b/plat/arm/board/fvp/include/platform_def.h
index e325aa558..fcf363d7c 100644
--- a/plat/arm/board/fvp/include/platform_def.h
+++ b/plat/arm/board/fvp/include/platform_def.h
@@ -7,17 +7,6 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-/* Enable the dynamic translation tables library. */
-#ifdef AARCH32
-# if defined(IMAGE_BL32) && RESET_TO_SP_MIN
-# define PLAT_XLAT_TABLES_DYNAMIC 1
-# endif
-#else
-# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_MM))
-# define PLAT_XLAT_TABLES_DYNAMIC 1
-# endif
-#endif /* AARCH32 */
-
#include <drivers/arm/tzc400.h>
#include <lib/utils_def.h>
#include <plat/arm/board/common/v2m_def.h>
diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk
index 3b60daadd..a174214ae 100644
--- a/plat/arm/board/fvp/platform.mk
+++ b/plat/arm/board/fvp/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -231,6 +231,22 @@ ifeq (${ARCH},aarch32)
NEED_BL32 := yes
endif
+# Enable the dynamic translation tables library.
+ifeq (${ARCH},aarch32)
+ ifeq (${RESET_TO_SP_MIN},1)
+ BL32_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
+ endif
+else
+ ifeq (${RESET_TO_BL31},1)
+ BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
+ endif
+ ifeq (${ENABLE_SPM},1)
+ ifeq (${SPM_MM},0)
+ BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
+ endif
+ endif
+endif
+
# Add support for platform supplied linker script for BL31 build
$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
diff --git a/plat/arm/board/juno/include/platform_def.h b/plat/arm/board/juno/include/platform_def.h
index 3be1b6843..ddbc9b7f5 100644
--- a/plat/arm/board/juno/include/platform_def.h
+++ b/plat/arm/board/juno/include/platform_def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -7,18 +7,6 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-/* Enable the dynamic translation tables library. */
-#ifdef AARCH32
-# if defined(IMAGE_BL32) && RESET_TO_SP_MIN
-# define PLAT_XLAT_TABLES_DYNAMIC 1
-# endif
-#else
-# if defined(IMAGE_BL31) && RESET_TO_BL31
-# define PLAT_XLAT_TABLES_DYNAMIC 1
-# endif
-#endif /* AARCH32 */
-
-
#include <drivers/arm/tzc400.h>
#if TRUSTED_BOARD_BOOT
#include <drivers/auth/mbedtls/mbedtls_config.h>
diff --git a/plat/arm/board/juno/platform.mk b/plat/arm/board/juno/platform.mk
index aec2b9bc5..96c7e6c94 100644
--- a/plat/arm/board/juno/platform.mk
+++ b/plat/arm/board/juno/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -134,6 +134,17 @@ SKIP_A57_L1_FLUSH_PWR_DWN := 1
# Do not enable SVE
ENABLE_SVE_FOR_NS := 0
+# Enable the dynamic translation tables library.
+ifeq (${ARCH},aarch32)
+ ifeq (${RESET_TO_SP_MIN},1)
+ BL32_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
+ endif
+else
+ ifeq (${RESET_TO_BL31},1)
+ BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
+ endif
+endif
+
include plat/arm/board/common/board_common.mk
include plat/arm/common/arm_common.mk
include plat/arm/soc/common/soc_css.mk