summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-07-02 19:24:13 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-26 17:28:39 +0000
commita26050f74dfe865fb4e7bd39d412250d6eabb8e8 (patch)
tree8680605a428d09fbce922586702c249c235a9ba5 /ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
parent2eff4ddc77874b8e5088b08c52f2e94491f745f2 (diff)
downloadedk2-a26050f74dfe865fb4e7bd39d412250d6eabb8e8.tar.gz
edk2-a26050f74dfe865fb4e7bd39d412250d6eabb8e8.tar.bz2
edk2-a26050f74dfe865fb4e7bd39d412250d6eabb8e8.zip
ArmVirtPkg/ArmVirtQemu: use first 128 MiB as permanent PEI memory
In order to allow booting with the MMU and caches enabled really early, we need to ensure that the code that populates the page tables can access those page tables with the statically defined ID map active. So let's put the permanent PEI RAM in the first 128 MiB of memory, which we will cover with this initial ID map (as it is the minimum supported DRAM size for ArmVirtQemu). Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf')
-rw-r--r--ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf59
1 files changed, 59 insertions, 0 deletions
diff --git a/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf b/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
new file mode 100644
index 0000000000..2039f71a0e
--- /dev/null
+++ b/ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
@@ -0,0 +1,59 @@
+## @file
+# Implementation of MemoryInitPeim that uses the first 128 MiB at the base of
+# DRAM as permanent PEI memory
+#
+# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2022, Google LLC. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 1.27
+ BASE_NAME = MemoryInit
+ FILE_GUID = 0fbffd44-f98f-4e1c-9922-e9b21f13c3f8
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.0
+ ENTRY_POINT = InitializeMemory
+
+[Sources]
+ MemoryInitPeim.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ EmbeddedPkg/EmbeddedPkg.dec
+ ArmPkg/ArmPkg.dec
+ ArmPlatformPkg/ArmPlatformPkg.dec
+
+[LibraryClasses]
+ PeimEntryPoint
+ DebugLib
+ HobLib
+ ArmLib
+ ArmPlatformLib
+ MemoryInitPeiLib
+
+[Guids]
+ gEfiMemoryTypeInformationGuid
+
+[FeaturePcd]
+ gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
+
+[FixedPcd]
+ gArmTokenSpaceGuid.PcdSystemMemoryBase
+ gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
+
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode
+ gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData
+
+[Depex]
+ TRUE