]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmLib.h: Removed GET_CORE_POS macro
authorRonald Cron <ronald.cron@arm.com>
Tue, 15 Jul 2014 09:26:53 +0000 (09:26 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2014 09:26:53 +0000 (09:26 +0000)
The platform independant GET_CORE_POS has been replaced by the platform
dependent function ArmPlatformGetCorePosition().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15661 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Include/Library/ArmLib.h
ArmPlatformPkg/Sec/Sec.c

index a338f77909cd0a00d1c69b81aee0c61a72c0fe71..d6e962b309da07e68b13e6c799a1ea8dae6ad261 100644 (file)
@@ -123,9 +123,6 @@ typedef enum {
 #define GET_CORE_ID(MpId)     ((MpId) & ARM_CORE_MASK)\r
 #define GET_CLUSTER_ID(MpId)  (((MpId) & ARM_CLUSTER_MASK) >> 8)\r
 #define GET_MPID(ClusterId, CoreId)   (((ClusterId) << 8) | (CoreId))\r
-// Get the position of the core for the Stack Offset (4 Core per Cluster)\r
-//   Position = (ClusterId * 4) + CoreId\r
-#define GET_CORE_POS(MpId)    ((((MpId) & ARM_CLUSTER_MASK) >> 6) + ((MpId) & ARM_CORE_MASK))\r
 #define PRIMARY_CORE_ID       (PcdGet32(PcdArmPrimaryCore) & ARM_CORE_MASK)\r
 \r
 ARM_CACHE_TYPE\r
index 088a9247b46f7daf4e9eebf3fdda2de1d02cdf10..015c1613c6d66e99d5e70244da323a21f73d965c 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
 *  Main file supporting the SEC Phase on ARM Platforms\r
 *\r
-*  Copyright (c) 2011-2012, 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
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\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
+*  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
 *\r
 **/\r
 \r
@@ -19,6 +19,7 @@
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/SerialPortLib.h>\r
 #include <Library/ArmGicLib.h>\r
+#include <Library/ArmPlatformLib.h>\r
 \r
 #include "SecInternal.h"\r
 \r
@@ -106,7 +107,11 @@ CEntryPoint (
             ((PcdGet32(PcdCPUCoresSecMonStackBase) != 0) && (PcdGet32(PcdCPUCoreSecMonStackSize) != 0)));\r
 \r
     // Enter Monitor Mode\r
-    enter_monitor_mode ((UINTN)TrustedWorldInitialization, MpId, SecBootMode, (VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));\r
+    enter_monitor_mode (\r
+      (UINTN)TrustedWorldInitialization, MpId, SecBootMode,\r
+      (VOID*) (PcdGet32 (PcdCPUCoresSecMonStackBase) +\r
+          (PcdGet32 (PcdCPUCoreSecMonStackSize) * (ArmPlatformGetCorePosition (MpId) + 1)))\r
+      );\r
   } else {\r
     if (ArmPlatformIsPrimaryCore (MpId)) {\r
       SerialPrint ("Trust Zone Configuration is disabled\n\r");\r