public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2][PATCH 1/1] ArmPlatformPkg/PrePi: fix IS_XIP
@ 2020-03-05  7:55 Andrei Warkentin
  2020-03-05  8:10 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Warkentin @ 2020-03-05  7:55 UTC (permalink / raw)
  To: devel@edk2.groups.io
  Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, pete@akeo.ie,
	philmd@redhat.com

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>
---
 ArmPlatformPkg/PrePi/PrePi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2][PATCH 1/1] ArmPlatformPkg/PrePi: fix IS_XIP
  2020-03-05  7:55 [edk2][PATCH 1/1] ArmPlatformPkg/PrePi: fix IS_XIP Andrei Warkentin
@ 2020-03-05  8:10 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-03-05  8:10 UTC (permalink / raw)
  To: Andrei Warkentin
  Cc: devel@edk2.groups.io, leif@nuviainc.com, pete@akeo.ie,
	philmd@redhat.com

On Thu, 5 Mar 2020 at 08:56, Andrei Warkentin <awarkentin@vmware.com> wrote:
>
> 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>

Thanks Andrei. I'll put this on the pile of ArmPkg/ArmPlatformPkg
fixes I intend to merge today or tomorrow.


> ---
>  ArmPlatformPkg/PrePi/PrePi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-05  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-05  7:55 [edk2][PATCH 1/1] ArmPlatformPkg/PrePi: fix IS_XIP Andrei Warkentin
2020-03-05  8:10 ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox