#include <ArmPlatform.h>\r
\r
// Number of Virtual Memory Map Descriptors\r
-#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 8\r
+#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 9\r
\r
// DDR attributes\r
#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK\r
VirtualMemoryTable[Index].Length = 2 * ARM_VE_SMB_PERIPH_SZ;\r
VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;\r
\r
+ // VRAM\r
+ VirtualMemoryTable[++Index].PhysicalBase = PL111_CLCD_VRAM_MOTHERBOARD_BASE;\r
+ VirtualMemoryTable[Index].VirtualBase = PL111_CLCD_VRAM_MOTHERBOARD_BASE;\r
+ VirtualMemoryTable[Index].Length = PL111_CLCD_VRAM_MOTHERBOARD_SIZE;\r
+ //\r
+ // Map the VRAM region as Normal Non-Cacheable memory and not device memory,\r
+ // so that we can use the accelerated string routines that may use unaligned\r
+ // accesses or DC ZVA instructions. The enum identifier is slightly awkward\r
+ // here, but it maps to a memory type that allows buffering and reordering.\r
+ //\r
+ VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED;\r
+\r
// Map sparse memory region if present\r
if (HasSparseMemory) {\r
VirtualMemoryTable[++Index].PhysicalBase = SparseMemoryBase;\r