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>
#------------------------------------------------------------------------------\r
#\r
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
#------------------------------------------------------------------------------\r
#\r
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
GCC_ASM_EXPORT (ArmCallSEV)\r
GCC_ASM_EXPORT (ArmReadCpuActlr)\r
GCC_ASM_EXPORT (ArmWriteCpuActlr)\r
GCC_ASM_EXPORT (ArmCallSEV)\r
GCC_ASM_EXPORT (ArmReadCpuActlr)\r
GCC_ASM_EXPORT (ArmWriteCpuActlr)\r
+GCC_ASM_EXPORT (ArmReadSctlr)\r
\r
#------------------------------------------------------------------------------\r
\r
\r
#------------------------------------------------------------------------------\r
\r
+ASM_PFX(ArmReadSctlr):\r
+ EL1_OR_EL2_OR_EL3(x1)\r
+1:mrs x0, sctlr_el1\r
+ ret\r
+2:mrs x0, sctlr_el2\r
+ ret\r
+3:mrs x0, sctlr_el3\r
+4:ret\r
+\r
ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r
ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r