summaryrefslogtreecommitdiff
path: root/Platform
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@arm.com>2018-12-28 17:05:59 +0530
committerThomas Abraham <thomas.abraham@arm.com>2019-10-22 17:14:53 +0530
commit205b023f228b1877aad1fc4682d2f7ccd92a1bdd (patch)
tree4d4c0c949cc2e307b4d9867c78b7b6dd4ab453ea /Platform
parentcc0da88b4d45ae4160b7d8d7595021567948afdc (diff)
Platform/ARM/SgiPkg: Setup memory buffers for CPER
Add memory regions for CPER buffers into the virtual memory table. Change-Id: I80c5f6c8a13e8918fc41e74517e9e55193e45684 Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
Diffstat (limited to 'Platform')
-rw-r--r--Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf2
-rw-r--r--Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c8
-rw-r--r--Platform/ARM/SgiPkg/SgiPlatform.dsc4
3 files changed, 13 insertions, 1 deletions
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
index 3db70e90..82ea14c4 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
@@ -59,6 +59,8 @@
gArmTokenSpaceGuid.PcdMmBufferBase
gArmTokenSpaceGuid.PcdMmBufferSize
+ gStandaloneMmPkgTokenSpaceGuid.PcdCperBufferBase
+ gStandaloneMmPkgTokenSpaceGuid.PcdCperBufferSize
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
index 845aeaf4..d5cbb21f 100644
--- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
+++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c
@@ -16,7 +16,7 @@
#include <SgiPlatform.h>
// Total number of descriptors, including the final "end-of-table" descriptor.
-#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 13
+#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 14
/**
Returns the Virtual Memory Map of the platform.
@@ -136,6 +136,12 @@ ArmPlatformGetVirtualMemoryMap (
VirtualMemoryTable[Index].Length = PcdGet64 (PcdMmBufferSize);
VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED;
+ // CPER Memory Space
+ VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdCperBufferBase);
+ VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdCperBufferBase);
+ VirtualMemoryTable[Index].Length = PcdGet64 (PcdCperBufferSize);
+ VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
+
// End of Table
VirtualMemoryTable[++Index].PhysicalBase = 0;
VirtualMemoryTable[Index].VirtualBase = 0;
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiPlatform.dsc
index a5b7eea1..02b94540 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc
@@ -203,6 +203,10 @@
gArmTokenSpaceGuid.PcdMmBufferBase|0xFF600000
gArmTokenSpaceGuid.PcdMmBufferSize|0x10000
+ ## RAS
+ gStandaloneMmPkgTokenSpaceGuid.PcdCperBufferBase|0xFF610000
+ gStandaloneMmPkgTokenSpaceGuid.PcdCperBufferSize|0x20000
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform