feat(realm): assign MECID when creating realms

This change allows TFTF to assign a MECID to every realm that is
created by passing an extra parameter to the Realm creation helpers.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I89bf08011eb005d949a195b406b073955f23f5ad
diff --git a/include/lib/aarch64/arch_features.h b/include/lib/aarch64/arch_features.h
index 3b4fffc..fc004b3 100644
--- a/include/lib/aarch64/arch_features.h
+++ b/include/lib/aarch64/arch_features.h
@@ -583,4 +583,10 @@
 	return EXTRACT(ID_AA64DFR0_DOUBLELOCK, read_id_aa64dfr0_el1())
 			>= DOUBLELOCK_IMPLEMENTED;
 }
+
+static inline bool is_feat_mec_supported(void)
+{
+	return EXTRACT(ID_AA64MMFR3_EL1_MEC, read_id_aa64mmfr3_el1())
+		== ID_AA64MMFR3_EL1_MEC_SUPPORTED;
+}
 #endif /* ARCH_FEATURES_H */