summaryrefslogtreecommitdiff
path: root/BeagleBoardPkg/Library
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2013-12-06 16:11:34 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-12-06 16:11:34 +0000
commit99267097f393fdfd71d5c9c56824f3fb771e46a7 (patch)
tree8a1ce8b7497abc43368feeaf4cb39b2477318ed4 /BeagleBoardPkg/Library
parentd5ad0813ac6d7796d4c61208e906f4e84340f05f (diff)
downloadedk2-platforms-99267097f393fdfd71d5c9c56824f3fb771e46a7.tar.xz
ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId
- Used correct PCD - Implement the function for AArch64, BeagleBoard, CTA15A7 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14937 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BeagleBoardPkg/Library')
-rw-r--r--BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S12
-rw-r--r--BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm13
2 files changed, 25 insertions, 0 deletions
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
index 1d0b090774..0d50cbd45a 100644
--- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.S
@@ -18,8 +18,11 @@
.align 2
GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
+GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
GCC_ASM_EXPORT(ArmPlatformPeiBootAction)
+GCC_ASM_IMPORT(ArmReadMpidr)
+
//UINTN
//ArmPlatformIsPrimaryCore (
// IN UINTN MpId
@@ -32,4 +35,13 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
ASM_PFX(ArmPlatformPeiBootAction):
bx lr
+//UINTN
+//ArmPlatformGetPrimaryCoreMpId (
+// VOID
+// );
+ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
+ // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is
+ // always the MPIDR of the calling CPU.
+ b ASM_PFX(ArmReadMpidr)
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm
index a05747717f..b850d9858e 100644
--- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardHelper.asm
@@ -20,6 +20,9 @@
EXPORT ArmPlatformPeiBootAction
EXPORT ArmPlatformIsPrimaryCore
+ EXPORT ArmPlatformGetPrimaryCoreMpId
+
+ IMPORT ArmReadMpidr
AREA BeagleBoardHelper, CODE, READONLY
@@ -37,4 +40,14 @@ ArmPlatformPeiBootAction FUNCTION
bx lr
ENDFUNC
+//UINTN
+//ArmPlatformGetPrimaryCoreMpId (
+// VOID
+// );
+ArmPlatformGetPrimaryCoreMpId FUNCTION
+ // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is
+ // always the MPIDR of the calling CPU.
+ b ArmReadMpidr
+ ENDFUNC
+
END