summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
Commit message (Collapse)AuthorAgeFilesLines
* ArmPlatformPkg: Fix Ecc error 8001Pierre Gondois2021-04-151-5/+5
| | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: File header doesn't exist File header comment missing the ""Copyright"" Even though a copyright is present in the header file, the leading '*' char prevents the Ecc tool from detecting it. According to the edk2 coding specifcation, section 5.2.3 "File Heading", there should not be leading '*' char. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPlatformPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/MemoryInitPeiLib: reserve rather than remove FV memoryArd Biesheuvel2018-02-281-8/+13
| | | | | | | | | | | | | | | | | Instead of completely removing the memory occupied by the primary PrePi FV from the memory map, thereby making it inaccessible to the OS, mark it as boot services data. This will ensure that the memory is left untouched by the firmware, but will release it to the OS when it calls ExitBootServices(). Note that for reasons that are not entirely clear, this only works as desired if the memory allocation HOB and the resource descriptor HOB that describe the region are identical in offset and size, and so we still need to iterate over the descriptors and split them up. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/MemoryInitPeiLib: revert "don't reserve primary FV in memory"Ard Biesheuvel2018-02-281-0/+69
| | | | | | | | | | | | | | | | Commit 8ae5fc182941 ("ArmPlatformPkg/MemoryInitPeiLib: don't reserve primary FV in memory") deleted the code that removes the memory covering the primary firmware volume from the memory map. The assumption was that this is no longer necessary now that we no longer expose compression and PE/COFF loader library code from the PrePi module to DXE core. However, the FV is still declared, and so code may attempt to access it anyway, which may cause unexpected results depending on whether the memory has been reused for other purposes in the mean time. So revert this change in preparation of dealing with this in a better way. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/MemoryInitPeiLib: don't reserve primary FV in memoryMeenakshi Aggarwal2017-11-301-69/+0
| | | | | | | | | | | | | | Now that PrePi no longer exposes its internal code via special HOBs, we can remove the special handling of the primary FV, which needed to be reserved so that DXE core could call into the PE/COFF and LZMA libraries in the PrePi module. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar <udit.kumar@nxp.com> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> [ardb: updated commit log] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove EFI_MEMORY_UC attribute from normal memoryArd Biesheuvel2016-09-081-1/+0
| | | | | | | | | | | | | | | | On ARM systems, mapping normal memory as device memory may have unintended side effects, given that unaligned accesses or loads and stores with special semantics (e.g., load/store exclusive) may fault or may not work as expected. Similarly, DC ZVA instructions are only supported on normal memory, not device memory. So remove the EFI_MEMORY_UC attribute that we set by default on system RAM. If any region requires this attribute, it is up to the driver to set this attribute, and to ensure that no offending operations are performed on it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLibArd Biesheuvel2016-07-071-0/+1
| | | | | | | | | | | | Switch all users of ArmLib that depend on the MMU routines to the new, separate ArmMmuLib. This needs to occur in one go, since the MMU routines are removed from ArmLib build at the same time, to prevent conflicting symbols. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* ArmPlatformPkg: Rectify file modesEvan Lloyd2016-02-021-0/+0
| | | | | | | | | | | | | | | | Problems have been encountered because some of the source files have execute permission set. This can cause git to report them as changed when they are checked out onto a file system with inherited permissions. This has been seen using Cygwin, MinGW and PowerShell Git. This patch makes no change to source file content, and only aims to correct the file modes/permissions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19787 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/MemoryInitPei: Check if the main System Memory resource has ↵Olivier Martin2015-07-061-20/+44
| | | | | | | | | | | | | | | | | been declared The PlatformLib could have declared the resource hob for the main system memory region. This change would prevent to get this system memory resource to be declared twice. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17834 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.Leif Lindholm2014-11-111-10/+10
| | | | | | | | | | | | | | Some AArch64 platforms have RAM and flash devices >4GB. Update some additional Pcd entries to 64-bit, and change the corresponding PcdGet32 calls to PcdGet64. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16325 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/ArmPkg.dec: Redefined PcdSystemMemory(Base|Size) as UINT64Olivier Martin2014-01-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The System Memory region might be out of the 32-bit memory space. This change has been validated on the FVP AArch64 model using 4GB of DRAM at 0x8_0000_0000: - # System Memory (2GB) - gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 - gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000 + # System Memory (4GB) + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x800000000 + gArmTokenSpaceGuid.PcdSystemMemorySize|0x100000000 EFI Shell and Linux kernel boot successfully. Note: This change has not been validated on AArch32. I expect some early assembly code to not work. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15093 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/MemoryInitPei: AARCH64 fix memory address calculationsGarrett Kirkendall2013-09-161-2/+2
| | | | | | | | | | | | | | | | | At least for AARCH64 currently, SystemMemoryTop and FdTop can overflow while adding the 32-bit PCDs together. The resulting value loses the upper 32-bits. Cast each of the values to EFI_PHYSICAL_ADDRESS size before doing the addition to prevent erroneous overflow. There is currently no 32-bit platform in EDKII open source that will overflow and this change would not fix that problem anyway. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Garrett Kirkendall <garrett.kirkendall@amd.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14675 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: Made ArmConfigureMmu() returns a status codeOlivier Martin2013-06-271-1/+5
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14445 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Minor typo, mispellings and coding style changesoliviermartin2012-09-271-1/+1
| | | | | | | | Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13752 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/ArmLib: Clean ArmV7Liboliviermartin2011-09-271-2/+0
| | | | | | | | | - Move the non specific ArmV7 functions to ArmLib. - Clean the ARM Platform common components to not depend on ArmV7 if not required git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12453 6f19259b-4bc3-4df7-8a09-765794883524
* ARM Packages: Rename PcdNormal* into Pcd* PCDsoliviermartin2011-09-221-11/+11
| | | | | | | | | | | | | | The denomination 'Normal' was used to make reference to the 'Normal' or 'Non Secure' or 'Non Trusted' world. To avoid confusion, this prefix has been removed from PCDs to define the normal world. The PCDs explicitely related to the Secure/Trusted World continue to have the 'Sec' prefix. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12416 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Change the memory model for the ARM Platform componentsoliviermartin2011-07-061-66/+69
| | | | | | | | | | | | | | | | | | | | In the former memory model, the UEFI firmware was expected to be located at the top of the system memory. Stacks & Pi memory regions were set below the firmware. On some platform, the UEFI firmware could be shadowed by the ROM firmware (case of the BeagleBoard) and in some cases the firmware is copied at the beginning of the system memory. With this new memory model, stack and Pi/DXE memory regions are set at the top of the system memory wherever the UEFI firmware is located in the memory map. Because DXE core does not support shadowed firmwares, the system memory covered by the UEFI firmware is marked as 'Non Present' to avoid to be overlapped by DXE allocations. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11992 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/MemoryInitPei: Generate a library from the PEI Moduleoliviermartin2011-07-011-0/+169
In the aim to reuse the memory init features in a PrePi module (use to skip the PEI Core), this module has been divided into two files: - MemoryInitPeiLib: declare the memory HOBs - MemoryIniPeim: PEIM warpper for the library git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11950 6f19259b-4bc3-4df7-8a09-765794883524