summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/ArmRealViewEbPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/ArmRealViewEbPkg')
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc7
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc7
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c84
3 files changed, 17 insertions, 81 deletions
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
index 2f2c5c8c8f..ca52ae6dc1 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
@@ -326,6 +326,13 @@
gArmTokenSpaceGuid.PcdNormalFdBaseAddress|0x40050000 # Must be equal to gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase
gArmTokenSpaceGuid.PcdNormalFdSize|0x00100000 # Must be equal to gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize
+ # System Memory (256MB)
+ gArmTokenSpaceGuid.PcdSystemMemoryBase|0x70000000
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x10000000
+
+ # Size of the region used by UEFI in permanent memory (Reserved 64MB)
+ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
+
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
#
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
index 912fad00ca..1eb833f63a 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
@@ -330,6 +330,13 @@
gArmTokenSpaceGuid.PcdNormalFdBaseAddress|0x40050000 # Must be equal to gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase
gArmTokenSpaceGuid.PcdNormalFdSize|0x00100000 # Must be equal to gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize
+ # System Memory (256MB)
+ gArmTokenSpaceGuid.PcdSystemMemoryBase|0x70000000
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x10000000
+
+ # Size of the region used by UEFI in permanent memory (Reserved 64MB)
+ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
+
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
#
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
index 01720bb23e..95fd2bb484 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
@@ -25,26 +25,6 @@
#define DDR_ATTRIBUTES_SECURE_UNCACHED ARM_MEMORY_REGION_ATTRIBUTE_SECURE_UNCACHED_UNBUFFERED
/**
- Return the information about the memory region in permanent memory used by PEI
-
- One of the PEI Module must install the permament memory used by PEI. This function returns the
- information about this region for your platform to this PEIM module.
-
- @param[out] PeiMemoryBase Base of the memory region used by PEI core and modules
- @param[out] PeiMemorySize Size of the memory region used by PEI core and modules
-
-**/
-VOID ArmPlatformGetPeiMemory (
- OUT UINTN* PeiMemoryBase,
- OUT UINTN* PeiMemorySize
- ) {
- ASSERT((PeiMemoryBase != NULL) && (PeiMemorySize != NULL));
-
- *PeiMemoryBase = ARM_EB_DRAM_BASE + ARM_EB_EFI_FIX_ADDRESS_REGION_SZ;
- *PeiMemorySize = ARM_EB_EFI_MEMORY_REGION_SZ;
-}
-
-/**
Return the Virtual Memory Map of your platform
This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.
@@ -136,67 +116,9 @@ VOID ArmPlatformGetVirtualMemoryMap(ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemory
EFI Memory region. This array must be ended by a zero-filled entry
**/
-VOID ArmPlatformGetEfiMemoryMap (
+EFI_STATUS
+ArmPlatformGetAdditionalSystemMemory (
OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap
) {
- EFI_RESOURCE_ATTRIBUTE_TYPE Attributes;
- UINT64 MemoryBase;
- UINTN Index = 0;
- ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR *EfiMemoryTable;
-
- ASSERT(EfiMemoryMap != NULL);
-
- EfiMemoryTable = (ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR*)AllocatePages(sizeof(ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR) * 6);
-
- Attributes =
- (
- EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED
- );
- MemoryBase = ARM_EB_DRAM_BASE;
-
- // Memory Reserved for fixed address allocations (such as Exception Vector Table)
- EfiMemoryTable[Index].ResourceAttribute = Attributes;
- EfiMemoryTable[Index].PhysicalStart = MemoryBase;
- EfiMemoryTable[Index].NumberOfBytes = ARM_EB_EFI_FIX_ADDRESS_REGION_SZ;
-
- MemoryBase += ARM_EB_EFI_FIX_ADDRESS_REGION_SZ;
-
- // Memory declared to PEI as permanent memory for PEI and DXE
- EfiMemoryTable[++Index].ResourceAttribute = Attributes;
- EfiMemoryTable[Index].PhysicalStart = MemoryBase;
- EfiMemoryTable[Index].NumberOfBytes = ARM_EB_EFI_MEMORY_REGION_SZ;
-
- MemoryBase += ARM_EB_EFI_MEMORY_REGION_SZ;
-
- // We must reserve the memory used by the Firmware Volume copied in DRAM at 0x80000000
- if (FeaturePcdGet(PcdStandalone) == FALSE) {
- // Chunk between the EFI Memory region and the firmware
- EfiMemoryTable[++Index].ResourceAttribute = Attributes;
- EfiMemoryTable[Index].PhysicalStart = MemoryBase;
- EfiMemoryTable[Index].NumberOfBytes = PcdGet32(PcdNormalFdBaseAddress) - MemoryBase;
-
- // Chunk reserved by the firmware in DRAM
- EfiMemoryTable[++Index].ResourceAttribute = Attributes & (~EFI_RESOURCE_ATTRIBUTE_PRESENT);
- EfiMemoryTable[Index].PhysicalStart = PcdGet32(PcdNormalFdBaseAddress);
- EfiMemoryTable[Index].NumberOfBytes = PcdGet32(PcdNormalFdSize);
-
- MemoryBase = PcdGet32(PcdNormalFdBaseAddress) + PcdGet32(PcdNormalFdSize);
- }
-
- // We allocate all the remain memory as untested system memory
- EfiMemoryTable[++Index].ResourceAttribute = Attributes & (~EFI_RESOURCE_ATTRIBUTE_TESTED);
- EfiMemoryTable[Index].PhysicalStart = MemoryBase;
- EfiMemoryTable[Index].NumberOfBytes = ARM_EB_DRAM_SZ - (MemoryBase-ARM_EB_DRAM_BASE);
-
- EfiMemoryTable[++Index].ResourceAttribute = 0;
- EfiMemoryTable[Index].PhysicalStart = 0;
- EfiMemoryTable[Index].NumberOfBytes = 0;
-
- *EfiMemoryMap = EfiMemoryTable;
+ return EFI_UNSUPPORTED;
}