ARMv7 may not support large page addressing
authorEtienne Carriere <etienne.carriere@linaro.org>
Wed, 8 Nov 2017 12:53:47 +0000 (13:53 +0100)
committerEtienne Carriere <etienne.carriere@linaro.org>
Wed, 8 Nov 2017 12:53:47 +0000 (13:53 +0100)
ARCH_SUPPORTS_LARGE_PAGE_ADDRESSING allows build environment to
handle specific case when target ARMv7 core only supports 32bit MMU
descriptor mode.

If ARMv7 based platform does not set ARM_CORTEX_Ax=yes, platform
shall define ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING to enable
large page addressing support.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
lib/xlat_tables/aarch32/xlat_tables.c
lib/xlat_tables_v2/aarch32/xlat_tables_arch.c
make_helpers/armv7-a-cpus.mk

index c7e34f20f1f81b32cb0ac4643fed62d369d47290..720d4461d56c749aa1cb664cb06a5a8836d1d5a8 100644 (file)
 #include <xlat_tables.h>
 #include "../xlat_tables_private.h"
 
+#if ARM_ARCH_MAJOR == 7 && !defined(ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING)
+#error ARMv7 target does not support LPAE MMU descriptors
+#endif
+
 #define XLAT_TABLE_LEVEL_BASE  \
        GET_XLAT_TABLE_LEVEL_BASE(PLAT_VIRT_ADDR_SPACE_SIZE)
 
index 642f799a4d19d6961bbb66db48e051ffb248969a..fc7ca46af2be0b47952f5ad7d13ce45001b18257 100644 (file)
 #include <xlat_tables_v2.h>
 #include "../xlat_tables_private.h"
 
+#if ARM_ARCH_MAJOR == 7 && !defined(ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING)
+#error ARMv7 target does not support LPAE MMU descriptors
+#endif
+
 #if ENABLE_ASSERTIONS
 unsigned long long xlat_arch_get_max_supported_pa(void)
 {
index 5a1c75ce5fde6f3be40f0371b13da3a833627931..c6491aa8c1f927b74fc88c022dfdbf2b9c3e8279 100644 (file)
@@ -31,3 +31,12 @@ march32-neon-$(ARM_WITH_NEON)        := -mfpu=neon
 march32-set-yes                        ?= -march=armv7-a
 march32-directive              := ${march32-set-yes} ${march32-neon-yes}
 endif
+
+# Platform may override these extension support directives:
+#
+# ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING
+# Defined if core supports the Large Page Addressing extension.
+
+ifeq ($(filter yes,$(ARM_CORTEX_A7) $(ARM_CORTEX_A12) $(ARM_CORTEX_A15) $(ARM_CORTEX_A17)),yes)
+$(eval $(call add_define,ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING))
+endif