]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Include/Library/ArmV7ArchTimerLib.h
Check the input VaraibleName for db/dbx when appending variables with formatted as...
[mirror_edk2.git] / ArmPkg / Include / Library / ArmV7ArchTimerLib.h
CommitLineData
da9675a2 1/** @file
2
3 Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
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#ifndef __ARM_V7_ARCH_TIMER_LIB_H__
16#define __ARM_V7_ARCH_TIMER_LIB_H__
17
18#define ARM_ARCH_TIMER_ENABLE (1 << 0)
19#define ARM_ARCH_TIMER_IMASK (1 << 1)
20#define ARM_ARCH_TIMER_ISTATUS (1 << 2)
21
22typedef enum {
23 CntFrq = 0,
24 CntPct,
25 CntkCtl,
26 CntpTval,
27 CntpCtl,
28 CntvTval,
29 CntvCtl,
30 CntvCt,
31 CntpCval,
32 CntvCval,
33 CntvOff,
34 CnthCtl,
35 CnthpTval,
36 CnthpCtl,
37 CnthpCval,
38 RegMaximum
39}ARM_ARCH_TIMER_REGS;
40
41VOID
42EFIAPI
43ArmArchTimerReadReg (
44 IN ARM_ARCH_TIMER_REGS Reg,
45 OUT VOID *DstBuf
46 );
47
48VOID
49EFIAPI
50ArmArchTimerWriteReg (
51 IN ARM_ARCH_TIMER_REGS Reg,
52 IN VOID *SrcBuf
53 );
54
55VOID
56EFIAPI
57ArmArchTimerEnableTimer (
58 VOID
59 );
60
61VOID
62EFIAPI
63ArmArchTimerDisableTimer (
64 VOID
65 );
66
67VOID
68EFIAPI
69ArmArchTimerSetTimerFreq (
70 IN UINTN FreqInHz
71 );
72
73UINTN
74EFIAPI
75ArmArchTimerGetTimerFreq (
76 VOID
77 );
78
79VOID
80EFIAPI
81ArmArchTimerSetTimerVal (
82 IN UINTN Val
83 );
84
85UINTN
86EFIAPI
87ArmArchTimerGetTimerVal (
88 VOID
89 );
90
91UINT64
92EFIAPI
93ArmArchTimerGetSystemCount (
94 VOID
95 );
96
97UINTN
98EFIAPI
99ArmArchTimerGetTimerCtrlReg (
100 VOID
101 );
102
103VOID
104EFIAPI
105ArmArchTimerSetTimerCtrlReg (
106 UINTN Val
107 );
108
109VOID
110EFIAPI
111ArmArchTimerSetCompareVal (
112 IN UINT64 Val
113 );
114
115#endif // __ARM_V7_ARCH_TIMER_LIB_H__