summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2013-09-10 12:17:07 -0400
committerRyan Harkin <ryan.harkin@linaro.org>2013-09-18 10:36:13 +0100
commit9b48c946f32eb4614f723e9c5a5384b52260dc7f (patch)
tree8ff4c78cc6326d52d7e778f7d20a0b7a1a8646f6
parent8e84594ddd69a36aa89b30fb10b0e8231801e39a (diff)
panda: Add new helper functions for Panda
Signed-off-by: David A. Long <dave.long@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