feat(xlat): add unittests for FEAT_LPA2 support on stage 1 xlat

This patch fixes the current unittests for the stage 1
translation table to support FEAT_LPA2 as well as it adds
some specific tests for that feature.

It also fixes all the warning and errors on the .cpp files
for the xlat library as reported by checkpatch.pl and adds
some missing tests.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I910c14bd6f4f3bfa1ebbf165d9693f6442e91fb2
diff --git a/plat/host/common/src/host_utils.c b/plat/host/common/src/host_utils.c
index 821b312..34eaa83 100644
--- a/plat/host/common/src/host_utils.c
+++ b/plat/host/common/src/host_utils.c
@@ -158,14 +158,15 @@
 			INPLACE(ID_AA64DFR0_EL1_PMUVer, 7UL));
 
 	/*
-	 * Initialize ID_AA64MMFR0_EL1 with a physical address
-	 * range of 48 bits (PARange bits set to 0b0101)
-	 * and 4K granularity support.
+	 * Setup id_aa64mmfr0_el1 with a PA size of 48 bits
+	 * and 4K granularity with LPA2 support for stages 1 and 2.
 	 */
 	ret = host_util_set_default_sysreg_cb("id_aa64mmfr0_el1",
 				INPLACE(ID_AA64MMFR0_EL1_PARANGE, 5UL) |
 				INPLACE(ID_AA64MMFR0_EL1_TGRAN4,
-					ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED));
+					ID_AA64MMFR0_EL1_TGRAN4_LPA2) |
+				INPLACE(ID_AA64MMFR0_EL1_TGRAN4_2,
+					ID_AA64MMFR0_EL1_TGRAN4_2_TGRAN4));
 
 	/*
 	 * Initialize ICH_VTR_EL2 with 6 preemption bits.