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 +#else +#include +#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 - +#include /* 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 -#else -#include -#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 #include #include #include @@ -14,6 +13,7 @@ #include #include #include +#include /******************************************************************************* * Forward declarations diff --git a/lib/xlat_tables_v2/xlat_tables.mk b/lib/xlat_tables_v2/xlat_tables.mk index 9507ad715..c946315bf 100644 --- a/lib/xlat_tables_v2/xlat_tables.mk +++ b/lib/xlat_tables_v2/xlat_tables.mk @@ -10,3 +10,6 @@ XLAT_TABLES_LIB_SRCS := $(addprefix lib/xlat_tables_v2/, \ xlat_tables_context.c \ xlat_tables_core.c \ xlat_tables_utils.c) + +XLAT_TABLES_LIB_V2 := 1 +$(eval $(call add_define,XLAT_TABLES_LIB_V2)) diff --git a/plat/arm/board/fvp/fvp_common.c b/plat/arm/board/fvp/fvp_common.c index aa4f8398d..836fd93f3 100644 --- a/plat/arm/board/fvp/fvp_common.c +++ b/plat/arm/board/fvp/fvp_common.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -18,6 +17,8 @@ #include #include #include +#include + #include "../fvp_def.h" #include "fvp_private.h" diff --git a/plat/arm/common/arm_bl1_setup.c b/plat/arm/common/arm_bl1_setup.c index 717e96f85..d67c0c275 100644 --- a/plat/arm/common/arm_bl1_setup.c +++ b/plat/arm/common/arm_bl1_setup.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -15,6 +14,8 @@ #include #include #include +#include + #include "../../../bl1/bl1_private.h" /* Weak definitions may be overridden in specific ARM standard platform */ diff --git a/plat/arm/common/arm_bl31_setup.c b/plat/arm/common/arm_bl31_setup.c index e218c2f05..059c9d50d 100644 --- a/plat/arm/common/arm_bl31_setup.c +++ b/plat/arm/common/arm_bl31_setup.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include /* * Placeholder variables for copying the arguments that have been passed to diff --git a/plat/arm/common/arm_common.c b/plat/arm/common/arm_common.c index a21d189e9..243159c77 100644 --- a/plat/arm/common/arm_common.c +++ b/plat/arm/common/arm_common.c @@ -5,7 +5,6 @@ */ #include #include -#include #include #include #include @@ -14,6 +13,7 @@ #include #include #include +#include /* Weak definitions may be overridden in specific ARM standard platform */ #pragma weak plat_get_ns_image_entrypoint diff --git a/plat/common/plat_bl_common.c b/plat/common/plat_bl_common.c index 264d5180d..50d79d422 100644 --- a/plat/common/plat_bl_common.c +++ b/plat/common/plat_bl_common.c @@ -13,6 +13,7 @@ #include #endif #include +#include /* * The following platform functions are weakly defined. The Platforms diff --git a/plat/qemu/platform.mk b/plat/qemu/platform.mk index 9167c9fcf..982886a93 100644 --- a/plat/qemu/platform.mk +++ b/plat/qemu/platform.mk @@ -38,24 +38,12 @@ ifeq (${ARM_ARCH_MAJOR},8) PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH} endif -# Use translation tables library v2 by default -ARM_XLAT_TABLES_LIB_V1 := 0 -$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) -$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) - - PLAT_BL_COMMON_SOURCES := plat/qemu/qemu_common.c \ plat/qemu/qemu_console.c \ drivers/arm/pl011/${ARCH}/pl011_console.S \ -ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) -PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \ - lib/xlat_tables/${ARCH}/xlat_tables.c -else include lib/xlat_tables_v2/xlat_tables.mk - PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} -endif ifneq (${TRUSTED_BOARD_BOOT},0) diff --git a/plat/qemu/qemu_common.c b/plat/qemu/qemu_common.c index 376ff2f11..43a3f7012 100644 --- a/plat/qemu/qemu_common.c +++ b/plat/qemu/qemu_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,8 @@ #include #include #include -#include +#include + #include "qemu_private.h" #define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \ diff --git a/plat/xilinx/zynqmp/platform.mk b/plat/xilinx/zynqmp/platform.mk index 33859ee5e..35c8983cd 100644 --- a/plat/xilinx/zynqmp/platform.mk +++ b/plat/xilinx/zynqmp/platform.mk @@ -16,10 +16,6 @@ ENABLE_SVE_FOR_NS := 0 WORKAROUND_CVE_2017_5715 := 0 -ARM_XLAT_TABLES_LIB_V1 := 1 -$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) -$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) - ifdef ZYNQMP_ATF_MEM_BASE $(eval $(call add_define,ZYNQMP_ATF_MEM_BASE))