diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-10-19 16:52:22 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-10-26 14:55:30 +0100 |
commit | 03987d01e9effe2b896e1ddb16894238d37e099a (patch) | |
tree | e5a80d3876bad5e9e8e038f318cce4fa6b55c7e1 /include | |
parent | 31abc7c45428398a330a3a940fe4dd7efa6c96f2 (diff) | |
download | platform_external_arm-trusted-firmware-03987d01e9effe2b896e1ddb16894238d37e099a.tar.gz platform_external_arm-trusted-firmware-03987d01e9effe2b896e1ddb16894238d37e099a.tar.bz2 platform_external_arm-trusted-firmware-03987d01e9effe2b896e1ddb16894238d37e099a.zip |
xlat: Fix compatibility between v1 and v2
There are several platforms using arm_setup_page_tables(), which is
supposed to be Arm platform only. This creates several dependency
problems between platforms.
This patch adds the definition XLAT_TABLES_LIB_V2 to the xlat tables lib
v2 makefile. This way it is possible to detect from C code which version
is being used and include the correct header.
The file arm_xlat_tables.h has been renamed to xlat_tables_compat.h and
moved to a common folder. This way, when in doubt, this header can be
used to guarantee compatibility, as it includes the correct header based
on XLAT_TABLES_LIB_V2.
This patch also removes the usage of ARM_XLAT_TABLES_V1 from QEMU (so
that is now locked in xlat lib v2) and ZynqMP (where it was added as a
workaround).
Change-Id: Ie1e22a23b44c549603d1402a237a70d0120d3e04
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_compat.h | 11 | ||||
-rw-r--r-- | include/plat/arm/board/common/v2m_def.h | 3 | ||||
-rw-r--r-- | include/plat/arm/common/arm_xlat_tables.h | 11 | ||||
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 2 |
4 files changed, 13 insertions, 14 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_compat.h b/include/lib/xlat_tables/xlat_tables_compat.h new file mode 100644 index 000000000..4650a8c6f --- /dev/null +++ b/include/lib/xlat_tables/xlat_tables_compat.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#if XLAT_TABLES_LIB_V2 +#include <xlat_tables_v2.h> +#else +#include <xlat_tables.h> +#endif diff --git a/include/plat/arm/board/common/v2m_def.h b/include/plat/arm/board/common/v2m_def.h index 02c349418..4a1d43c85 100644 --- a/include/plat/arm/board/common/v2m_def.h +++ b/include/plat/arm/board/common/v2m_def.h @@ -6,8 +6,7 @@ #ifndef V2M_DEF_H #define V2M_DEF_H -#include <arm_xlat_tables.h> - +#include <xlat_tables_compat.h> /* V2M motherboard system registers & offsets */ #define V2M_SYSREGS_BASE UL(0x1c010000) diff --git a/include/plat/arm/common/arm_xlat_tables.h b/include/plat/arm/common/arm_xlat_tables.h deleted file mode 100644 index 0923ad8a1..000000000 --- a/include/plat/arm/common/arm_xlat_tables.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#if ARM_XLAT_TABLES_LIB_V1 -#include <xlat_tables.h> -#else -#include <xlat_tables_v2.h> -#endif /* ARM_XLAT_TABLES_LIB_V1 */ diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index 773c3603e..b93381ddb 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -6,7 +6,6 @@ #ifndef __PLAT_ARM_H__ #define __PLAT_ARM_H__ -#include <arm_xlat_tables.h> #include <bakery_lock.h> #include <cassert.h> #include <cpu_data.h> @@ -14,6 +13,7 @@ #include <spinlock.h> #include <tzc_common.h> #include <utils_def.h> +#include <xlat_tables_compat.h> /******************************************************************************* * Forward declarations |