]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/PrePi.c
ArmPlatformPkg/PrePi: avoid global variable write to mSystemMemoryEnd
[mirror_edk2.git] / ArmPlatformPkg / PrePi / PrePi.c
index 36928c65a73bb644ef47a320cb39cbf10a81efcf..e548ccace09730b78851b987d7b902a5bb7a84c5 100644 (file)
@@ -32,6 +32,9 @@
 #define IS_XIP() (((UINT64)FixedPcdGet64 (PcdFdBaseAddress) > mSystemMemoryEnd) || \\r
                   ((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
 \r
+UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) +\r
+                          FixedPcdGet64(PcdSystemMemorySize) - 1;\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 ExtractGuidedSectionLibConstructor (\r