Add tests for Errata management firmware interface.

Add tests to confirm that the em_version, em_features and
em_cpu_erratum_features calls conform to the errata abi spec.

Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
Change-Id: I8395026acc004a10d8c2c17ec689f4e0752143d8
diff --git a/include/lib/aarch32/arch.h b/include/lib/aarch32/arch.h
index 53ef4ba..6f41db9 100644
--- a/include/lib/aarch32/arch.h
+++ b/include/lib/aarch32/arch.h
@@ -20,6 +20,8 @@
 #define MIDR_REV_BITS		U(4)
 #define MIDR_PN_MASK		U(0xfff)
 #define MIDR_PN_SHIFT		U(4)
+#define MIDR_VAR_MASK		U(0xf0)
+#define MIDR_REV_MASK		U(0xf)
 
 /*******************************************************************************
  * MPIDR macros
diff --git a/include/lib/aarch64/arch.h b/include/lib/aarch64/arch.h
index 0e2903e..f3ff0ca 100644
--- a/include/lib/aarch64/arch.h
+++ b/include/lib/aarch64/arch.h
@@ -16,7 +16,7 @@
 #define MIDR_IMPL_SHIFT		U(0x18)
 #define MIDR_VAR_SHIFT		U(20)
 #define MIDR_VAR_BITS		U(4)
-#define MIDR_VAR_MASK		U(0xf)
+#define MIDR_VAR_MASK		U(0xf0)
 #define MIDR_REV_SHIFT		U(0)
 #define MIDR_REV_BITS		U(4)
 #define MIDR_REV_MASK		U(0xf)
diff --git a/include/lib/aarch64/arch_helpers.h b/include/lib/aarch64/arch_helpers.h
index 7c3ffc5..b7c0418 100644
--- a/include/lib/aarch64/arch_helpers.h
+++ b/include/lib/aarch64/arch_helpers.h
@@ -397,6 +397,8 @@
 #define clr_cntp_ctl_enable(x)  ((x) &= ~(U(1) << CNTP_CTL_ENABLE_SHIFT))
 #define clr_cntp_ctl_imask(x)   ((x) &= ~(U(1) << CNTP_CTL_IMASK_SHIFT))
 
+#define read_midr()		read_midr_el1()
+
 DEFINE_SYSREG_RW_FUNCS(tpidr_el3)
 
 DEFINE_SYSREG_RW_FUNCS(cntvoff_el2)