summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2013-09-10 12:17:07 -0400
committerLeif Lindholm <leif.lindholm@linaro.org>2014-01-24 15:44:19 +0000
commitd2c821ff0d3b7422304ebed40d3153ad6aeb3fd4 (patch)
treee1c10562b4ec3d2abdde773d86363759e7f9b08a
parentd7c841932053099a45e4866d32793c9b90d42e95 (diff)
downloadjuice-d2c821ff0d3b7422304ebed40d3153ad6aeb3fd4.tar.gz
panda: Add new helper functions for Panda
Signed-off-by: David A. Long <dave.long@linaro.org> Signed-off-by: Steven Kinney <steven.kinney@linaro.org>
-rw-r--r--PandaBoardPkg/Library/PandaBoardLib/PandaBoardHelper.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/PandaBoardPkg/Library/PandaBoardLib/PandaBoardHelper.S b/PandaBoardPkg/Library/PandaBoardLib/PandaBoardHelper.S
index 6405d167c..49fcf533a 100644
--- a/PandaBoardPkg/Library/PandaBoardLib/PandaBoardHelper.S
+++ b/PandaBoardPkg/Library/PandaBoardLib/PandaBoardHelper.S
@@ -23,6 +23,9 @@
GCC_ASM_EXPORT(ArmPlatformPrePiBootAction)
GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
+GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
+GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
+
/**
ArmPlatformPrePiBootAction
@@ -99,4 +102,18 @@ relocator_end:
ASM_PFX(ArmPlatformGetCorePosition):
bx lr
+ASM_PFX(ArmPlatformIsPrimaryCore):
+ #Bits 8 through 11 are CPU ID
+ ldr r1, =0xf00
+ and r0, r0, r1
+ #id for core0 should be 0
+ ldr r1, =0x0
+ cmp r0, r1
+ moveq r0, #1
+ movne r0, #0
+ mov pc, lr
+
+ASM_PFX(ArmPlatformPeiBootAction):
+ mov pc, lr
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED