#define ARM_VE_SMB_SRAM_BASE 0x2E000000\r
#define ARM_VE_SMB_SRAM_SZ SIZE_64KB\r
// USB, Ethernet, VRAM\r
-#define ARM_VE_SMB_PERIPH_BASE 0x18000000\r
-#define PL111_CLCD_VRAM_MOTHERBOARD_BASE ARM_VE_SMB_PERIPH_BASE\r
-#define ARM_VE_SMB_PERIPH_SZ SIZE_64MB\r
+#define ARM_VE_SMB_PERIPH_BASE 0x18800000\r
+#define ARM_VE_SMB_PERIPH_SZ (SIZE_64MB - SIZE_8MB)\r
+\r
+#define PL111_CLCD_VRAM_MOTHERBOARD_BASE 0x18000000\r
+#define PL111_CLCD_VRAM_MOTHERBOARD_SIZE 0x800000\r
\r
// DRAM\r
#define ARM_VE_DRAM_BASE PcdGet64 (PcdSystemMemoryBase)\r
#define PL111_CLCD_MOTHERBOARD_VIDEO_MODE_OSC_ID 1\r
#define PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID 1\r
\r
-// VRAM offset for the PL111 Colour LCD Controller on the motherboard\r
-#define VRAM_MOTHERBOARD_BASE (ARM_VE_SMB_PERIPH_BASE + 0x00000)\r
-\r
#endif\r
#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