Merge "fix(mte): use ATA bit with FEAT_MTE2" into integration
diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c
index 8775ab4..ee94dfd 100644
--- a/lib/el3_runtime/aarch64/context_mgmt.c
+++ b/lib/el3_runtime/aarch64/context_mgmt.c
@@ -123,8 +123,8 @@
scr_el3 |= get_scr_el3_from_routing_model(SECURE);
#endif
- /* Allow access to Allocation Tags when mte is set*/
- if (is_feat_mte_supported()) {
+ /* Allow access to Allocation Tags when FEAT_MTE2 is implemented and enabled. */
+ if (is_feat_mte2_supported()) {
scr_el3 |= SCR_ATA_BIT;
}
@@ -193,8 +193,10 @@
/* SCR_NS: Set the NS bit */
scr_el3 |= SCR_NS_BIT;
- /* Allow access to Allocation Tags when MTE is implemented. */
- scr_el3 |= SCR_ATA_BIT;
+ /* Allow access to Allocation Tags when FEAT_MTE2 is implemented and enabled. */
+ if (is_feat_mte2_supported()) {
+ scr_el3 |= SCR_ATA_BIT;
+ }
#if !CTX_INCLUDE_PAUTH_REGS
/*