aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-06-11 13:40:32 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-06-13 09:19:41 +0100
commita0b9bb79a035a7421318502d04dde723e7381b6a (patch)
treecfab22e01b08b220b30d3f630eaad12d6310f2db /include
parent83a393ba3e15a8198520247a25e61c5c04c89ead (diff)
downloadplatform_external_arm-trusted-firmware-a0b9bb79a035a7421318502d04dde723e7381b6a.tar.gz
platform_external_arm-trusted-firmware-a0b9bb79a035a7421318502d04dde723e7381b6a.tar.bz2
platform_external_arm-trusted-firmware-a0b9bb79a035a7421318502d04dde723e7381b6a.zip
xlat v2: Introduce xlat granule size helpers
The function xlat_arch_is_granule_size_supported() can be used to check if a specific granule size is supported. In Armv8, AArch32 only supports 4 KiB pages. AArch64 supports 4 KiB, 16 KiB or 64 KiB depending on the implementation, which is detected at runtime. The function xlat_arch_get_max_supported_granule_size() returns the max granule size supported by the implementation. Even though right now they are only used by SPM, they may be useful in other places in the future. This patch moves the code currently in SPM to the xlat tables lib so that it can be reused. Change-Id: If54624a5ecf20b9b9b7f38861b56383a03bbc8a4 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/xlat_tables/xlat_mmu_helpers.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/lib/xlat_tables/xlat_mmu_helpers.h b/include/lib/xlat_tables/xlat_mmu_helpers.h
index d83d7640f..779531770 100644
--- a/include/lib/xlat_tables/xlat_mmu_helpers.h
+++ b/include/lib/xlat_tables/xlat_mmu_helpers.h
@@ -43,6 +43,8 @@
#ifndef __ASSEMBLY__
+#include <sys/types.h>
+
#ifdef AARCH32
/* AArch32 specific translation table API */
void enable_mmu_secure(unsigned int flags);
@@ -52,6 +54,9 @@ void enable_mmu_el1(unsigned int flags);
void enable_mmu_el3(unsigned int flags);
#endif /* AARCH32 */
+int xlat_arch_is_granule_size_supported(size_t size);
+size_t xlat_arch_get_max_supported_granule_size(void);
+
#endif /* __ASSEMBLY__ */
#endif /* __XLAT_MMU_HELPERS_H__ */