]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/PrePi.c
ArmPlatformPkg/PlatformPeim: constify EFI_PEI_PPI_DESCRIPTOR globals
[mirror_edk2.git] / ArmPlatformPkg / PrePi / PrePi.c
index 9a5e067ef537aeaf8fc26341989427bf431139b2..99afe6fa9064b6b2dc055ff168277c7560757e15 100755 (executable)
@@ -30,7 +30,7 @@
 #include "PrePi.h"\r
 #include "LzmaDecompress.h"\r
 \r
-#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize))) || \\r
+#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > mSystemMemoryEnd) || \\r
                   ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
 \r
 // Not used when PrePi in run in XIP mode\r
@@ -109,7 +109,7 @@ PrePiMain (
   // If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)\r
   ASSERT (IS_XIP() ||\r
           ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet64 (PcdSystemMemoryBase)) &&\r
-           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet64 (PcdSystemMemorySize)))));\r
+           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)mSystemMemoryEnd)));\r
 \r
   // Initialize the architecture specific bits\r
   ArchInitialize ();\r