Mirror of edk2.
Go to file
Ard Biesheuvel 4aae7419ee ArmPlatformPkg/PrePi: avoid global variable write to mSystemMemoryEnd
The global variable mSystemMemoryEnd is initialized by PrePi only if
it has not been initialized by ArmPlatformPeiBootAction(). This allows
platforms executing under, e.g., ARM Trusted Firmware to dynamically
reserve a window at the top of memory that will be used by the secure
firmware.

However, PrePi is a SEC module, and writing to a global variable
violates the SEC constraints, since SEC and PEI may execute from NOR
flash.

So instead, initialize mSystemMemoryEnd statically. This will ensure
it holds the correct value for all implementations where the value
is not overridden, but still allows it to be overridden during the
call to ArmPlatformPeiBootAction().

Note that this patch also fixes a latent bug on 32-bit platforms where
a value of mSystemMemoryEnd exceeding 4 GB would be truncated to 32-bits
rather than limited to (4 GB - 1)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-10-24 15:57:25 +01:00
AppPkg AppPkg/.../Python: Clean up and document how to escape the -# option. 2016-01-06 01:00:19 +00:00
ArmPkg ArmPkg: Fix typos in comments 2016-10-19 16:31:22 +01:00
ArmPlatformPkg ArmPlatformPkg/PrePi: avoid global variable write to mSystemMemoryEnd 2016-10-24 15:57:25 +01:00
ArmVirtPkg ArmVirtPkg/PrePi: remove mSystemMemoryEnd 2016-10-24 15:57:25 +01:00
BaseTools edksetup.sh, BaseTools/BuildEnv: add --reconfig support 2016-10-24 13:53:16 +01:00
BeagleBoardPkg BeagleBoardPkg EmbeddedPkg Omap35xxPkg: move to ArmBaseLib 2016-09-08 09:20:36 +01:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg/SecCore: Adding NASM files in SecCore module 2016-08-03 17:20:17 -07:00
CorebootPayloadPkg CorebootPayloadPkg/PciHostBridgeLib: Fix the wrong PCI resource limit 2016-10-18 22:21:53 -07:00
CryptoPkg CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2j 2016-09-30 09:18:45 +08:00
DuetPkg DuetPkg DxeIpl and EfiLdr: Add the missing EFIAPI for the function 2016-10-12 20:35:11 +08:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix typos in comments 2016-10-21 16:40:50 +08:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg: Fix typos in comments 2016-10-19 16:31:58 +01:00
EmulatorPkg EmulatorPkg: Fix typos in comments and variables 2016-10-19 13:32:20 -07:00
FatBinPkg FatBinPkg: Change to 2-clause BSD license 2016-04-22 00:55:21 -07:00
FatPkg FatPkg/FatPei: Use PcdRecoveryFileName PCD. 2016-10-12 09:15:25 +08:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Fix typos in comments 2016-10-24 09:09:06 +08:00
IntelFrameworkPkg IntelFrameworkPkg: Fix typos in comments 2016-10-24 09:09:26 +08:00
IntelFsp2Pkg IntelFsp2Pkg: Fix typos in comments 2016-10-24 09:26:31 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Fix a typo in the comment 2016-10-24 09:26:32 +08:00
IntelFspPkg IntelFspPkg: Fix typos in comments 2016-10-24 09:26:28 +08:00
IntelFspWrapperPkg IntelFspWrapperPkg: Fix typos in comments 2016-10-24 09:26:30 +08:00
IntelSiliconPkg IntelSiliconPkg: Fixed bug in IgdOpregion spec 2016-10-18 03:32:41 -07:00
MdeModulePkg MdeModulePkg: add ARM/AARCH64 requirements to .dsc 2016-10-20 09:13:44 +01:00
MdePkg MdePkg: Fix typos in comments 2016-10-21 16:40:51 +08:00
NetworkPkg NetworkPkg: Coding style refine for IpSecDxe 2016-10-21 09:03:32 +08:00
Nt32Pkg Nt32Pkg WinNtSimpleFileSystemDxe: Correct file length. 2016-10-11 10:17:25 +08:00
Omap35xxPkg BeagleBoardPkg EmbeddedPkg Omap35xxPkg: move to ArmBaseLib 2016-09-08 09:20:36 +01:00
OptionRomPkg OptionRomPkg: Fix GCC build failure 2016-10-09 11:03:27 +08:00
OvmfPkg OvmfPkg: Fix typos in comments 2016-10-19 13:32:45 -07:00
PcAtChipsetPkg PcAtChipsetPkg AcpiTimerLib: Clear bits [31:24] after reading by IoRead32() 2016-10-11 13:02:43 +08:00
PerformancePkg PerformancePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:09 +08:00
QuarkPlatformPkg QuarkPlatformPkg/RecoveryOemHookLib: Remove RecoveryOemHookLib 2016-10-07 15:00:35 -07:00
QuarkSocPkg QuarkSocPkg/QncSmmDispatcher: Fix use after free issue 2016-10-07 14:56:37 -07:00
SecurityPkg SecurityPkg: SmmTcg2PhysicalPresenceLib: Fix coding style issue 2016-10-21 23:09:37 +08:00
ShellBinPkg ShellBinPkg Arm/AArch64 Shell binary update 2016-08-02 12:25:13 +02:00
ShellPkg ShellPkg: Update sources to include MdePkg protocol definitions 2016-10-19 10:26:16 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg: Fix typos in comments 2016-10-24 09:10:15 +08:00
StdLib StdLib/LibC ARM AARCH64: do not redefine compiler intrinsics 2016-08-09 10:10:12 +02:00
StdLibPrivateInternalFiles StdLib: Clarify and improve comments. 2016-01-06 00:31:42 +00:00
UefiCpuPkg UefiCpuPkg: Fix typos in comments 2016-10-24 09:09:48 +08:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2DeviceRefCodePkg/ValleyView2Soc: Remove the unused code 2016-08-03 11:02:19 +08:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg:Signal End of Dxe Event. 2016-09-14 13:22:07 +08:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt BaseTools: Updated BuildNotes URLs 2016-03-25 09:46:44 +08:00
Edk2Setup.bat Edk2Setup.bat: Support building platforms with Python source 2016-10-24 10:49:19 +08:00
Maintainers.txt Maintainers.txt: Add Giri as IntelFsp2*Pkg, IntelSiliconPkg maintainer 2016-09-08 23:36:45 +08:00
edksetup.bat edksetup.bat: Support --nt32 X64 2016-10-24 10:49:16 +08:00
edksetup.sh edksetup.sh, BaseTools/BuildEnv: add --reconfig support 2016-10-24 13:53:16 +01:00