]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PrePi: fix IS_XIP
authorAndrei Warkentin <awarkentin@vmware.com>
Thu, 5 Mar 2020 07:55:58 +0000 (07:55 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 5 Mar 2020 21:08:30 +0000 (21:08 +0000)
This wasn't correctly testing for FD to be outside RAM,
when RAM base immediately follows the FD.

This is part of some cleanup for RPi4 in edk2-platform.

Signed-off-by: Andrei Warkentin <awarkentin@vmware.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmPlatformPkg/PrePi/PrePi.c

index 2bb144958139389c4dea3f21d9110cecbf2ffba2..74284f18830c559bb19b248935e32f42ccab58e8 100644 (file)
@@ -22,7 +22,7 @@
 #include "PrePi.h"\r
 \r
 #define IS_XIP() (((UINT64)FixedPcdGet64 (PcdFdBaseAddress) > mSystemMemoryEnd) || \\r
-                  ((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
+                  ((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= FixedPcdGet64 (PcdSystemMemoryBase)))\r
 \r
 UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) +\r
                           FixedPcdGet64(PcdSystemMemorySize) - 1;\r