Debian Codegraph @

docs/fusa/reqs/design-reqs/arm64/generic-timer.rst

raw
1 .. SPDX-License-Identifier: CC-BY-4.0
2
3 Generic Timer
4 =============
5
6 The following are the requirements related to ARM Generic Timer [1] interface
7 exposed by Xen to Arm64 domains.
8
9 Probe the Generic Timer device tree node from a domain
10 ------------------------------------------------------
11
12 `XenSwdgn~arm64_generic_timer_probe_dt~1`
13
14 Description:
15 Xen shall generate a device tree node for the Generic Timer (in accordance to
16 ARM architected timer device tree binding [2]) in the domain device tree.
17
18 Rationale:
19
20 Comments:
21 Domains can detect the presence of the Generic Timer device tree node.
22
23 Covers:
24 - `XenProd~arm64_emulated_timer~1`
25
26 Read system counter frequency
27 -----------------------------
28
29 `XenSwdgn~arm64_generic_timer_read_freq~1`
30
31 Description:
32 Xen shall expose the frequency of the system counter to the domains in
33 CNTFRQ_EL0 register.
34
35 Rationale:
36
37 Comments:
38
39 Covers:
40 - `XenProd~arm64_emulated_timer~1`
41
42 Access CNTKCTL_EL1 system register from a domain
43 ------------------------------------------------
44
45 `XenSwdgn~arm64_generic_timer_access_cntkctlel1~1`
46
47 Description:
48 Xen shall expose Counter-timer Kernel Control register (CNTKCTL_EL1) to the
49 domains.
50
51 Rationale:
52
53 Comments:
54
55 Covers:
56 - `XenProd~arm64_emulated_timer~1`
57
58 Access virtual timer from a domain
59 ----------------------------------
60
61 `XenSwdgn~arm64_generic_timer_access_virtual_timer~1`
62
63 Description:
64 Xen shall expose the virtual timer registers (CNTVCT_EL0, CNTV_CTL_EL0,
65 CNTV_CVAL_EL0, CNTV_TVAL_EL0) to the domains.
66
67 Rationale:
68
69 Comments:
70
71 Covers:
72 - `XenProd~arm64_emulated_timer~1`
73
74 Access physical timer from a domain
75 -----------------------------------
76
77 `XenSwdgn~arm64_generic_timer_access_physical_timer~1`
78
79 Description:
80 Xen shall expose physical timer registers (CNTPCT_EL0, CNTP_CTL_EL0,
81 CNTP_CVAL_EL0, CNTP_TVAL_EL0) to the domains.
82
83 Rationale:
84
85 Comments:
86
87 Covers:
88 - `XenProd~arm64_emulated_timer~1`
89
90 Trigger the virtual timer interrupt from a domain
91 -------------------------------------------------
92
93 `XenSwdgn~arm64_generic_timer_trigger_virtual_interrupt~1`
94
95 Description:
96 Xen shall generate virtual timer interrupts to domains when the virtual timer
97 condition is met.
98
99 Rationale:
100
101 Comments:
102
103 Covers:
104 - `XenProd~arm64_emulated_timer~1`
105
106 Trigger the physical timer interrupt from a domain
107 --------------------------------------------------
108
109 `XenSwdgn~arm64_generic_timer_trigger_physical_interrupt~1`
110
111 Description:
112 Xen shall generate physical timer interrupts to domains when the physical timer
113 condition is met.
114
115 Rationale:
116
117 Comments:
118
119 Covers:
120 - `XenProd~arm64_emulated_timer~1`
121
122 Assumption of Use on the Platform
123 =================================
124
125 Expose system timer frequency via register
126 ------------------------------------------
127
128 `XenSwdgn~arm64_generic_timer_plat_program_cntfrq_el0~1`
129
130 Description:
131 CNTFRQ_EL0 register shall be programmed with the value of the system timer
132 frequency.
133
134 Rationale:
135 Xen reads the CNTFRQ_EL0 register to get the value of system timer frequency.
136
137 Comments:
138 While there is a provision to get this value by reading the "clock-frequency"
139 dt property [2], the use of this property is strongly discouraged.
140
141 Covers:
142 - `XenProd~arm64_emulated_timer~1`
143
144 [1] Arm Architecture Reference Manual for A-profile architecture, Chapter 11
145 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml