summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/AArch64/ArmReadCntPctReg.S
blob: cfabd7ad8f871401eef58477ec4ea3eec19415a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#------------------------------------------------------------------------------
#
# ArmReadCntPctReg() for AArch64
#
# Copyright (c) 2023 - 2024, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#------------------------------------------------------------------------------

.text
.p2align 2
GCC_ASM_EXPORT(ArmReadCntPctReg)

#/**
#  Reads the CNTPCT_EL0 Register.
#
#  @return The contents of the CNTPCT_EL0 register.
#
#**/
#UINT64
#EFIAPI
#ArmReadCntPctReg (
#  VOID
#  );
#
ASM_PFX(ArmReadCntPctReg):
  AARCH64_BTI(c)
  mrs   x0, cntpct_el0
  ret