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 /plat/qemu | |
parent | 31abc7c45428398a330a3a940fe4dd7efa6c96f2 (diff) |
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 'plat/qemu')
-rw-r--r-- | plat/qemu/platform.mk | 12 | ||||
-rw-r--r-- | plat/qemu/qemu_common.c | 5 |
2 files changed, 3 insertions, 14 deletions
diff --git a/plat/qemu/platform.mk b/plat/qemu/platform.mk index 9167c9fc..982886a9 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 376ff2f1..43a3f701 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 <arch_helpers.h> #include <bl_common.h> #include <platform_def.h> -#include <arm_xlat_tables.h> +#include <xlat_tables_v2.h> + #include "qemu_private.h" #define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \ |