summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorAndrei Warkentin <awarkentin@vmware.com>2020-03-05 07:55:58 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-05 21:08:30 +0000
commitd6607d8b3000188cd7f0d6cbb9372ec69ad9ae8d (patch)
tree460f6f16c1b762820d06f0bf161cbb7a5ee973f9 /ArmPlatformPkg
parentced77332cab626f35fbdb36630be27303d289d79 (diff)
downloadedk2-d6607d8b3000188cd7f0d6cbb9372ec69ad9ae8d.tar.gz
edk2-d6607d8b3000188cd7f0d6cbb9372ec69ad9ae8d.tar.bz2
edk2-d6607d8b3000188cd7f0d6cbb9372ec69ad9ae8d.zip
ArmPlatformPkg/PrePi: fix IS_XIP
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>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/PrePi/PrePi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c
index 2bb1449581..74284f1883 100644
--- a/ArmPlatformPkg/PrePi/PrePi.c
+++ b/ArmPlatformPkg/PrePi/PrePi.c
@@ -22,7 +22,7 @@
#include "PrePi.h"
#define IS_XIP() (((UINT64)FixedPcdGet64 (PcdFdBaseAddress) > mSystemMemoryEnd) || \
- ((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))
+ ((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= FixedPcdGet64 (PcdSystemMemoryBase)))
UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) +
FixedPcdGet64(PcdSystemMemorySize) - 1;