]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/PrePi.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPlatformPkg / PrePi / PrePi.c
index 7ef88c0e36a966157a51f6e8caba158f8d485fb2..9a5e067ef537aeaf8fc26341989427bf431139b2 100755 (executable)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, 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
@@ -30,8 +30,8 @@
 #include "PrePi.h"\r
 #include "LzmaDecompress.h"\r
 \r
-#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > (UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize))) || \\r
-                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet32 (PcdSystemMemoryBase)))\r
+#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize))) || \\r
+                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
 \r
 // Not used when PrePi in run in XIP mode\r
 UINTN mGlobalVariableBase = 0;\r
@@ -107,9 +107,9 @@ PrePiMain (
   UINTN                         StacksSize;\r
 \r
   // 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) >= FixedPcdGet32 (PcdSystemMemoryBase)) &&\r
-           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize)))));\r
+  ASSERT (IS_XIP() ||\r
+          ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet64 (PcdSystemMemoryBase)) &&\r
+           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet64 (PcdSystemMemorySize)))));\r
 \r
   // Initialize the architecture specific bits\r
   ArchInitialize ();\r
@@ -123,7 +123,7 @@ PrePiMain (
   // Initialize the Debug Agent for Source Level Debugging\r
   InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);\r
   SaveAndSetDebugTimerInterrupt (TRUE);\r
-  \r
+\r
   // Declare the PI/UEFI memory region\r
   HobList = HobConstructor (\r
     (VOID*)UefiMemoryBase,\r
@@ -139,7 +139,8 @@ PrePiMain (
 \r
   // Create the Stacks HOB (reserve the memory for all stacks)\r
   if (ArmIsMpCore ()) {\r
-    StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize) + (FixedPcdGet32(PcdClusterCount) * 4 * FixedPcdGet32(PcdCPUCoreSecondaryStackSize));\r
+    StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize) +\r
+                 ((FixedPcdGet32 (PcdCoreCount) - 1) * FixedPcdGet32 (PcdCPUCoreSecondaryStackSize));\r
   } else {\r
     StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);\r
   }\r
@@ -207,7 +208,7 @@ CEntryPoint (
   )\r
 {\r
   UINT64   StartTimeStamp;\r
\r
+\r
   ASSERT(!ArmIsMpCore() || (PcdGet32 (PcdCoreCount) > 1));\r
 \r
   // Initialize the platform specific controllers\r
@@ -244,7 +245,7 @@ CEntryPoint (
       ArmCallWFE ();\r
     }\r
   }\r
-  \r
+\r
   // If not primary Jump to Secondary Main\r
   if (ArmPlatformIsPrimaryCore (MpId)) {\r
     // Goto primary Main.\r