From bf75a3710ca67cbcc475be7df601e0dc2cd332c3 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Thu, 23 Feb 2017 17:22:58 +0000 Subject: [PATCH] ARM platforms: Enable xlat tables lib v2 Modify ARM common makefile to use version 2 of the translation tables library and include the new header in C files. Simplify header dependencies related to this library to simplify the change. The following table contains information about the size increase in bytes for BL1 after applying this patch. The code has been compiled for different configurations of FVP in AArch64 mode with compiler GCC 4.9.3 20150413. The sizes have been calculated with the output of `nm` by adding the size of all regions and comparing the total size before and after the change. They are sumarized in the table below: text bss data total Release +660 -20 +88 +728 Debug +740 -20 +242 +962 Debug (LOG_LEVEL=50) +1120 -20 +317 +1417 Change-Id: I539e307f158ab71e3a8b771640001fc1bf431b29 Signed-off-by: Antonio Nino Diaz --- include/plat/arm/board/common/v2m_def.h | 4 ++-- include/plat/arm/common/arm_def.h | 2 +- include/plat/arm/common/plat_arm.h | 4 ++-- include/plat/arm/soc/common/soc_css_def.h | 1 - plat/arm/common/arm_bl1_setup.c | 4 ++-- plat/arm/common/arm_common.c | 4 ++-- plat/arm/common/arm_common.mk | 5 +++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/plat/arm/board/common/v2m_def.h b/include/plat/arm/board/common/v2m_def.h index 7cee4e8f17..aaa96f305c 100644 --- a/include/plat/arm/board/common/v2m_def.h +++ b/include/plat/arm/board/common/v2m_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,7 +30,7 @@ #ifndef __V2M_DEF_H__ #define __V2M_DEF_H__ -#include +#include /* V2M motherboard system registers & offsets */ diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index 4d264448d1..8ce718af40 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include /****************************************************************************** diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index e878f9ebf7..697b917029 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -35,7 +35,7 @@ #include #include #include -#include +#include /******************************************************************************* * Forward declarations diff --git a/include/plat/arm/soc/common/soc_css_def.h b/include/plat/arm/soc/common/soc_css_def.h index 316f8f9086..e83144ec55 100644 --- a/include/plat/arm/soc/common/soc_css_def.h +++ b/include/plat/arm/soc/common/soc_css_def.h @@ -32,7 +32,6 @@ #define __SOC_CSS_DEF_H__ #include -#include /* diff --git a/plat/arm/common/arm_bl1_setup.c b/plat/arm/common/arm_bl1_setup.c index 81a87c440c..8c1fde43fd 100644 --- a/plat/arm/common/arm_bl1_setup.c +++ b/plat/arm/common/arm_bl1_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -36,7 +36,7 @@ #include #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_common.c b/plat/arm/common/arm_common.c index c53723d559..aade22129c 100644 --- a/plat/arm/common/arm_common.c +++ b/plat/arm/common/arm_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -34,7 +34,7 @@ #include #include #include -#include +#include extern const mmap_region_t plat_arm_mmap[]; diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 4628a43d07..3156f0854f 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -108,8 +108,9 @@ ifeq (${ARCH}, aarch64) PLAT_INCLUDES += -Iinclude/plat/arm/common/aarch64 endif -PLAT_BL_COMMON_SOURCES += lib/xlat_tables/xlat_tables_common.c \ - lib/xlat_tables/${ARCH}/xlat_tables.c \ +include lib/xlat_tables_v2/xlat_tables.mk + +PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ plat/arm/common/${ARCH}/arm_helpers.S \ plat/arm/common/arm_common.c \ plat/common/${ARCH}/plat_common.c