aboutsummaryrefslogtreecommitdiffstats
path: root/include/nvgpu/hw_sim.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/nvgpu/hw_sim.h')
-rw-r--r--include/nvgpu/hw_sim.h2153
1 files changed, 2153 insertions, 0 deletions
diff --git a/include/nvgpu/hw_sim.h b/include/nvgpu/hw_sim.h
new file mode 100644
index 0000000..89ce6da
--- /dev/null
+++ b/include/nvgpu/hw_sim.h
@@ -0,0 +1,2153 @@
1/*
2 * Copyright (c) 2012-2018, NVIDIA Corporation.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23 /*
24 * Function naming determines intended use:
25 *
26 * <x>_r(void) : Returns the offset for register <x>.
27 *
28 * <x>_w(void) : Returns the word offset for word (4 byte) element <x>.
29 *
30 * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits.
31 *
32 * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted
33 * and masked to place it at field <y> of register <x>. This value
34 * can be |'d with others to produce a full register value for
35 * register <x>.
36 *
37 * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This
38 * value can be ~'d and then &'d to clear the value of field <y> for
39 * register <x>.
40 *
41 * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted
42 * to place it at field <y> of register <x>. This value can be |'d
43 * with others to produce a full register value for <x>.
44 *
45 * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register
46 * <x> value 'r' after being shifted to place its LSB at bit 0.
47 * This value is suitable for direct comparison with other unshifted
48 * values appropriate for use in field <y> of register <x>.
49 *
50 * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for
51 * field <y> of register <x>. This value is suitable for direct
52 * comparison with unshifted values appropriate for use in field <y>
53 * of register <x>.
54 */
55
56#ifndef __hw_sim_h__
57#define __hw_sim_h__
58/*This file is autogenerated. Do not edit. */
59
60static inline u32 sim_send_ring_r(void)
61{
62 return 0x00000000;
63}
64static inline u32 sim_send_ring_target_s(void)
65{
66 return 2;
67}
68static inline u32 sim_send_ring_target_f(u32 v)
69{
70 return (v & 0x3) << 0;
71}
72static inline u32 sim_send_ring_target_m(void)
73{
74 return 0x3 << 0;
75}
76static inline u32 sim_send_ring_target_v(u32 r)
77{
78 return (r >> 0) & 0x3;
79}
80static inline u32 sim_send_ring_target_phys_init_v(void)
81{
82 return 0x00000001;
83}
84static inline u32 sim_send_ring_target_phys_init_f(void)
85{
86 return 0x1;
87}
88static inline u32 sim_send_ring_target_phys__init_v(void)
89{
90 return 0x00000001;
91}
92static inline u32 sim_send_ring_target_phys__init_f(void)
93{
94 return 0x1;
95}
96static inline u32 sim_send_ring_target_phys__prod_v(void)
97{
98 return 0x00000001;
99}
100static inline u32 sim_send_ring_target_phys__prod_f(void)
101{
102 return 0x1;
103}
104static inline u32 sim_send_ring_target_phys_nvm_v(void)
105{
106 return 0x00000001;
107}
108static inline u32 sim_send_ring_target_phys_nvm_f(void)
109{
110 return 0x1;
111}
112static inline u32 sim_send_ring_target_phys_pci_v(void)
113{
114 return 0x00000002;
115}
116static inline u32 sim_send_ring_target_phys_pci_f(void)
117{
118 return 0x2;
119}
120static inline u32 sim_send_ring_target_phys_pci_coherent_v(void)
121{
122 return 0x00000003;
123}
124static inline u32 sim_send_ring_target_phys_pci_coherent_f(void)
125{
126 return 0x3;
127}
128static inline u32 sim_send_ring_status_s(void)
129{
130 return 1;
131}
132static inline u32 sim_send_ring_status_f(u32 v)
133{
134 return (v & 0x1) << 3;
135}
136static inline u32 sim_send_ring_status_m(void)
137{
138 return 0x1 << 3;
139}
140static inline u32 sim_send_ring_status_v(u32 r)
141{
142 return (r >> 3) & 0x1;
143}
144static inline u32 sim_send_ring_status_init_v(void)
145{
146 return 0x00000000;
147}
148static inline u32 sim_send_ring_status_init_f(void)
149{
150 return 0x0;
151}
152static inline u32 sim_send_ring_status__init_v(void)
153{
154 return 0x00000000;
155}
156static inline u32 sim_send_ring_status__init_f(void)
157{
158 return 0x0;
159}
160static inline u32 sim_send_ring_status__prod_v(void)
161{
162 return 0x00000000;
163}
164static inline u32 sim_send_ring_status__prod_f(void)
165{
166 return 0x0;
167}
168static inline u32 sim_send_ring_status_invalid_v(void)
169{
170 return 0x00000000;
171}
172static inline u32 sim_send_ring_status_invalid_f(void)
173{
174 return 0x0;
175}
176static inline u32 sim_send_ring_status_valid_v(void)
177{
178 return 0x00000001;
179}
180static inline u32 sim_send_ring_status_valid_f(void)
181{
182 return 0x8;
183}
184static inline u32 sim_send_ring_size_s(void)
185{
186 return 2;
187}
188static inline u32 sim_send_ring_size_f(u32 v)
189{
190 return (v & 0x3) << 4;
191}
192static inline u32 sim_send_ring_size_m(void)
193{
194 return 0x3 << 4;
195}
196static inline u32 sim_send_ring_size_v(u32 r)
197{
198 return (r >> 4) & 0x3;
199}
200static inline u32 sim_send_ring_size_init_v(void)
201{
202 return 0x00000000;
203}
204static inline u32 sim_send_ring_size_init_f(void)
205{
206 return 0x0;
207}
208static inline u32 sim_send_ring_size__init_v(void)
209{
210 return 0x00000000;
211}
212static inline u32 sim_send_ring_size__init_f(void)
213{
214 return 0x0;
215}
216static inline u32 sim_send_ring_size__prod_v(void)
217{
218 return 0x00000000;
219}
220static inline u32 sim_send_ring_size__prod_f(void)
221{
222 return 0x0;
223}
224static inline u32 sim_send_ring_size_4kb_v(void)
225{
226 return 0x00000000;
227}
228static inline u32 sim_send_ring_size_4kb_f(void)
229{
230 return 0x0;
231}
232static inline u32 sim_send_ring_size_8kb_v(void)
233{