]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/PrePi.c
ArmPlatformPkg/PrePi: fix IS_XIP
[mirror_edk2.git] / ArmPlatformPkg / PrePi / PrePi.c
index 02cff7ddc20444a12389abd2b90a3d1c528464fa..74284f18830c559bb19b248935e32f42ccab58e8 100644 (file)
@@ -2,13 +2,7 @@
 *\r
 *  Copyright (c) 2011-2017, ARM Limited. All rights reserved.\r
 *\r
-*  This program and the accompanying materials\r
-*  are licensed and made available under the terms and conditions of the BSD License\r
-*  which accompanies this distribution.  The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 *\r
 **/\r
 \r
@@ -28,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
@@ -115,7 +109,7 @@ PrePiMain (
   BuildStackHob (StacksBase, StacksSize);\r
 \r
   //TODO: Call CpuPei as a library\r
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));\r
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));\r
 \r
   if (ArmIsMpCore ()) {\r
     // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid\r
@@ -199,7 +193,7 @@ CEntryPoint (
         ArmCallSEV ();\r
       }\r
     } else {\r
-      // Wait the Primay core has defined the address of the Global Variable region (event: ARM_CPU_EVENT_DEFAULT)\r
+      // Wait the Primary core has defined the address of the Global Variable region (event: ARM_CPU_EVENT_DEFAULT)\r
       ArmCallWFE ();\r
     }\r
   }\r