summaryrefslogtreecommitdiff
path: root/ArmPkg/Include
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-04 13:58:28 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-04 13:58:28 +0000
commit89bbce116a4dabb83c1be5953b030928f2d2f378 (patch)
treee1a657c8e42c1856374cc1f16f2d09397b219348 /ArmPkg/Include
parent41b152c5f6ec3a5a6e51b4f8f0f90291a5895edc (diff)
downloadedk2-platforms-89bbce116a4dabb83c1be5953b030928f2d2f378.tar.xz
Arm Packages: Fix builds for XCODE32 toolchain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12509 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r--ArmPkg/Include/AsmMacroIoLib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h
index 9ef3430aaa..644c654665 100644
--- a/ArmPkg/Include/AsmMacroIoLib.h
+++ b/ArmPkg/Include/AsmMacroIoLib.h
@@ -119,6 +119,21 @@
.long (_Data) ; \
1:
+// Convert the (ClusterId,CoreId) into a Core Position
+// We assume there are 4 cores per cluster
+#define GetCorePositionInStack(Pos, MpId, Tmp) \
+ lsr Pos, MpId, #6 ; \
+ and Tmp, MpId, #3 ; \
+ add Pos, Pos, Tmp
+
+// Reserve a region at the top of the Primary Core stack
+// for Global variables for the XIP phase
+#define SetPrimaryStack(StackTop, GlobalSize, Tmp) \
+ and Tmp, GlobalSize, #7 ; \
+ rsbne Tmp, Tmp, #8 ; \
+ add GlobalSize, GlobalSize, Tmp ; \
+ sub sp, StackTop, GlobalSize
+
#elif defined (__GNUC__)