aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-10-16 15:25:22 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-10-17 10:44:10 +0100
commit8bf5bac88e3481d444d1d0ba597124d21e7184d1 (patch)
tree9e29028583ce0c7e967a65e50e584e1c1045c738 /include
parent8ac544e44b9747c1c59b42e4708607f2e8077c6f (diff)
downloadarm-trusted-firmware-8bf5bac88e3481d444d1d0ba597124d21e7184d1.tar.gz
xlat: Define translation regime in AArch32
Previously, in AArch32, `IMAGE_XLAT_DEFAULT_REGIME` wasn't defined. The translation regime is only used in the AArch64 port of the translation tables library v2, so this is not a problem for now, but future patches will use it. `IMAGE_EL` isn't used in AArch32, so it isn't needed to define it. Change-Id: I4acdb01a58658956ab94bd82ed5b7fee1aa6ba90 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2_helpers.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
index 0ebdc930..28228c4c 100644
--- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h
+++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
@@ -162,8 +162,12 @@ struct xlat_ctx {
.initialized = 0, \
}
+#if AARCH64
-/* This IMAGE_EL macro must not to be used outside the library */
+/*
+ * This IMAGE_EL macro must not to be used outside the library, and it is only
+ * used in AArch64.
+ */
#if IMAGE_BL1 || IMAGE_BL31
# define IMAGE_EL 3
# define IMAGE_XLAT_DEFAULT_REGIME EL3_REGIME
@@ -172,6 +176,17 @@ struct xlat_ctx {
# define IMAGE_XLAT_DEFAULT_REGIME EL1_EL0_REGIME
#endif
+#else /* if AARCH32 */
+
+/*
+ * The PL1&0 translation regime in AArch32 behaves like the EL1&0 regime in
+ * AArch64 except for the XN bits, but we set and unset them at the same time,
+ * so there's no difference in practice.
+ */
+#define IMAGE_XLAT_DEFAULT_REGIME EL1_EL0_REGIME
+
+#endif /* AARCH64 */
+
#endif /*__ASSEMBLY__*/
#endif /* __XLAT_TABLES_V2_HELPERS_H__ */