arm: Add support for the DEVICE_nGRE and NORMAL_WT memory types
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
diff --git a/arm/cstart64.S b/arm/cstart64.S
index 6610779..0428014 100644
--- a/arm/cstart64.S
+++ b/arm/cstart64.S
@@ -154,6 +154,8 @@
* DEVICE_GRE 010 00001100
* NORMAL_NC 011 01000100
* NORMAL 100 11111111
+ * NORMAL_WT 101 10111011
+ * DEVICE_nGRE 110 00001000
*/
#define MAIR(attr, mt) ((attr) << ((mt) * 8))
@@ -184,7 +186,9 @@
MAIR(0x04, MT_DEVICE_nGnRE) | \
MAIR(0x0c, MT_DEVICE_GRE) | \
MAIR(0x44, MT_NORMAL_NC) | \
- MAIR(0xff, MT_NORMAL)
+ MAIR(0xff, MT_NORMAL) | \
+ MAIR(0xbb, MT_NORMAL_WT) | \
+ MAIR(0x08, MT_DEVICE_nGRE)
msr mair_el1, x1
/* TTBR0 */
diff --git a/lib/arm64/asm/pgtable-hwdef.h b/lib/arm64/asm/pgtable-hwdef.h
index c31bc11..48a1d1a 100644
--- a/lib/arm64/asm/pgtable-hwdef.h
+++ b/lib/arm64/asm/pgtable-hwdef.h
@@ -153,5 +153,7 @@
#define MT_DEVICE_GRE 2
#define MT_NORMAL_NC 3 /* writecombine */
#define MT_NORMAL 4
+#define MT_NORMAL_WT 5
+#define MT_DEVICE_nGRE 6
#endif /* _ASMARM64_PGTABLE_HWDEF_H_ */