1//------------------------------------------------------------------------------ 2// 3// Copyright (c) 2011, ARM Limited. All rights reserved. 4// 5// This program and the accompanying materials 6// are licensed and made available under the terms and conditions of the BSD License 7// which accompanies this distribution. The full text of the license may be found at 8// http://opensource.org/licenses/bsd-license.php 9// 10// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12// 13//------------------------------------------------------------------------------ 14 15 16 INCLUDE AsmMacroExport.inc 17 PRESERVE8 18 19 RVCT_ASM_EXPORT ArmReadCntFrq 20 mrc p15, 0, r0, c14, c0, 0 ; Read CNTFRQ 21 bx lr 22 23 RVCT_ASM_EXPORT ArmWriteCntFrq 24 mcr p15, 0, r0, c14, c0, 0 ; Write to CNTFRQ 25 bx lr 26 27 RVCT_ASM_EXPORT ArmReadCntPct 28 mrrc p15, 0, r0, r1, c14 ; Read CNTPT (Physical counter register) 29 bx lr 30 31 RVCT_ASM_EXPORT ArmReadCntkCtl 32 mrc p15, 0, r0, c14, c1, 0 ; Read CNTK_CTL (Timer PL1 Control Register) 33 bx lr 34 35 RVCT_ASM_EXPORT ArmWriteCntkCtl 36 mcr p15, 0, r0, c14, c1, 0 ; Write to CNTK_CTL (Timer PL1 Control Register) 37 bx lr 38 39 RVCT_ASM_EXPORT ArmReadCntpTval 40 mrc p15, 0, r0, c14, c2, 0 ; Read CNTP_TVAL (PL1 physical timer value register) 41 bx lr 42 43 RVCT_ASM_EXPORT ArmWriteCntpTval 44 mcr p15, 0, r0, c14, c2, 0 ; Write to CNTP_TVAL (PL1 physical timer value register) 45 bx lr 46 47 RVCT_ASM_EXPORT ArmReadCntpCtl 48 mrc p15, 0, r0, c14, c2, 1 ; Read CNTP_CTL (PL1 Physical Timer Control Register) 49 bx lr 50 51 RVCT_ASM_EXPORT ArmWriteCntpCtl 52 mcr p15, 0, r0, c14, c2, 1 ; Write to CNTP_CTL (PL1 Physical Timer Control Register) 53 bx lr 54 55 RVCT_ASM_EXPORT ArmReadCntvTval 56 mrc p15, 0, r0, c14, c3, 0 ; Read CNTV_TVAL (Virtual Timer Value register) 57 bx lr 58 59 RVCT_ASM_EXPORT ArmWriteCntvTval 60 mcr p15, 0, r0, c14, c3, 0 ; Write to CNTV_TVAL (Virtual Timer Value register) 61 bx lr 62 63 RVCT_ASM_EXPORT ArmReadCntvCtl 64 mrc p15, 0, r0, c14, c3, 1 ; Read CNTV_CTL (Virtual Timer Control Register) 65 bx lr 66 67 RVCT_ASM_EXPORT ArmWriteCntvCtl 68 mcr p15, 0, r0, c14, c3, 1 ; Write to CNTV_CTL (Virtual Timer Control Register) 69 bx lr 70 71 RVCT_ASM_EXPORT ArmReadCntvCt 72 mrrc p15, 1, r0, r1, c14 ; Read CNTVCT (Virtual Count Register) 73 bx lr 74 75 RVCT_ASM_EXPORT ArmReadCntpCval 76 mrrc p15, 2, r0, r1, c14 ; Read CNTP_CTVAL (Physical Timer Compare Value Register) 77 bx lr 78 79 RVCT_ASM_EXPORT ArmWriteCntpCval 80 mcrr p15, 2, r0, r1, c14 ; Write to CNTP_CTVAL (Physical Timer Compare Value Register) 81 bx lr 82 83 RVCT_ASM_EXPORT ArmReadCntvCval 84 mrrc p15, 3, r0, r1, c14 ; Read CNTV_CTVAL (Virtual Timer Compare Value Register) 85 bx lr 86 87 RVCT_ASM_EXPORT ArmWriteCntvCval 88 mcrr p15, 3, r0, r1, c14 ; write to CNTV_CTVAL (Virtual Timer Compare Value Register) 89 bx lr 90 91 RVCT_ASM_EXPORT ArmReadCntvOff 92 mrrc p15, 4, r0, r1, c14 ; Read CNTVOFF (virtual Offset register) 93 bx lr 94 95 RVCT_ASM_EXPORT ArmWriteCntvOff 96 mcrr p15, 4, r0, r1, c14 ; Write to CNTVOFF (Virtual Offset register) 97 bx lr 98 99 END 100