summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmLib
diff options
context:
space:
mode:
authorSupreeth Venkatesh <supreeth.venkatesh@arm.com>2016-07-29 18:06:32 -0500
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-01 14:07:17 +0200
commit07783fdd67e40fa7cff3ebf34399c1ab65937802 (patch)
tree5c6e988960a74795c3accee2f3cb5cebfa0fd7ef /ArmPkg/Library/ArmLib
parent3d8fab5719a52d67cd4666bd08f63a21fe97c480 (diff)
downloadedk2-07783fdd67e40fa7cff3ebf34399c1ab65937802.tar.gz
edk2-07783fdd67e40fa7cff3ebf34399c1ab65937802.tar.bz2
edk2-07783fdd67e40fa7cff3ebf34399c1ab65937802.zip
ArmPkg/Library: Add ArmReadSctlr for AArch64
ArmLib defines a prototype for the ArmReadSctlr() function, but the AArch64 implementation is missing. So add it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: John Powell <john.powell@arm.com> Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com> [ardb: update commit log] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'ArmPkg/Library/ArmLib')
-rw-r--r--ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S12
1 files changed, 11 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
index a6fd5e3445..c9f3bd1e88 100644
--- a/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
+# Copyright (c) 2011 - 2016, 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
@@ -39,6 +39,7 @@ GCC_ASM_EXPORT (ArmCallWFE)
GCC_ASM_EXPORT (ArmCallSEV)
GCC_ASM_EXPORT (ArmReadCpuActlr)
GCC_ASM_EXPORT (ArmWriteCpuActlr)
+GCC_ASM_EXPORT (ArmReadSctlr)
#------------------------------------------------------------------------------
@@ -205,4 +206,13 @@ ASM_PFX(ArmWriteCpuActlr):
isb
ret
+ASM_PFX(ArmReadSctlr):
+ EL1_OR_EL2_OR_EL3(x1)
+1:mrs x0, sctlr_el1
+ ret
+2:mrs x0, sctlr_el2
+ ret
+3:mrs x0, sctlr_el3
+4:ret
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED