]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Helper.S
ArmPlatformPkg/ArmVExpress-CTA15-A7: Added support for CoreTile Express A15x2_A7x3
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibCTA15-A7 / CTA15-A7Helper.S
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Helper.S b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Helper.S
new file mode 100644 (file)
index 0000000..2863279
--- /dev/null
@@ -0,0 +1,30 @@
+//\r
+//  Copyright (c) 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
+//\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
+#include <Library/ArmLib.h>\r
+\r
+.text \r
+.align 3\r
+\r
+GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
+\r
+//UINTN\r
+//ArmPlatformGetCorePosition (\r
+//  IN UINTN MpId\r
+//  );\r
+ASM_PFX(ArmPlatformGetCorePosition):\r
+  and  r1, r0, #ARM_CORE_MASK\r
+  and  r0, r0, #ARM_CLUSTER_MASK\r
+  add  r0, r1, r0, LSR #7\r
+  bx   lr\r
+\r