summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmLib/Common
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-03-01 11:00:07 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-03-01 11:00:07 +0000
commitf6c5a29bb9041caf66426ddced7454f9051124eb (patch)
tree6ef4f5253d217f182209668cab63bcc22b80858b /ArmPkg/Library/ArmLib/Common
parent992a1f830d94d87d98c1e2066f46f00200bdfd4c (diff)
downloadedk2-platforms-f6c5a29bb9041caf66426ddced7454f9051124eb.tar.xz
ArmPkg/ArmLib: Rationalise ArmReadMidr and cognate functions.
The function ArmReadMidr has been recently added, but that functionality was already present under other names such as Cp15IdCode and ArmMainIdCode. This change removes redundant code and moves the function to the Common library. 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@15276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/ArmLib/Common')
-rw-r--r--ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S4
-rw-r--r--ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S6
-rw-r--r--ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm6
3 files changed, 8 insertions, 8 deletions
diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
index 5dd3fca5e9..f7cc557245 100644
--- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
@@ -17,7 +17,7 @@
.text
.align 3
-GCC_ASM_EXPORT (ArmMainIdCode)
+GCC_ASM_EXPORT (ArmReadMidr)
GCC_ASM_EXPORT (ArmCacheInfo)
GCC_ASM_EXPORT (ArmGetInterruptState)
GCC_ASM_EXPORT (ArmGetFiqState)
@@ -43,7 +43,7 @@ GCC_ASM_EXPORT (ArmCallSEV)
.set DAIF_FIQ_BIT, (1 << 0)
.set DAIF_IRQ_BIT, (1 << 1)
-ASM_PFX(ArmiMainIdCode):
+ASM_PFX(ArmReadMidr):
mrs x0, midr_el1 // Read from Main ID Register (MIDR)
ret
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S
index 4c95565e8f..57b205a7a8 100644
--- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
+# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -23,7 +23,7 @@
.text
.align 2
-GCC_ASM_EXPORT(Cp15IdCode)
+GCC_ASM_EXPORT(ArmReadMidr)
GCC_ASM_EXPORT(Cp15CacheInfo)
GCC_ASM_EXPORT(ArmGetInterruptState)
GCC_ASM_EXPORT(ArmGetFiqState)
@@ -50,7 +50,7 @@ GCC_ASM_EXPORT(ArmReadSctlr)
#------------------------------------------------------------------------------
-ASM_PFX(Cp15IdCode):
+ASM_PFX(ArmReadMidr):
mrc p15,0,R0,c0,c0,0
bx LR
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm
index f4b22943ff..a464e4d86c 100644
--- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm
+++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-// Copyright (c) 2011-2013, ARM Limited. All rights reserved.
+// Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -23,7 +23,7 @@
#define dsb
#endif
- EXPORT Cp15IdCode
+ EXPORT ArmReadMidr
EXPORT Cp15CacheInfo
EXPORT ArmGetInterruptState
EXPORT ArmGetFiqState
@@ -50,7 +50,7 @@
AREA ArmLibSupport, CODE, READONLY
-Cp15IdCode
+ArmReadMidr
mrc p15,0,R0,c0,c0,0
bx LR