diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-06-28 18:24:25 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-06-28 18:24:25 -0400 |
commit | 01e6fac4d61fdd7fff5433942ec93fc2ea1e4df1 (patch) | |
tree | 4ef34501728a087be24f4ba0af90f91486bf780b /include/nvgpu/hw_sim.h | |
parent | 306a03d18b305e4e573be3b2931978fa10679eb9 (diff) |
Include nvgpu headers
These are needed to build on NVIDIA's Jetson boards for the time
being. Only a couple structs are required, so it should be fairly
easy to remove this dependency at some point in the future.
Diffstat (limited to 'include/nvgpu/hw_sim.h')
-rw-r--r-- | include/nvgpu/hw_sim.h | 2153 |
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 | |||
60 | static inline u32 sim_send_ring_r(void) | ||
61 | { | ||
62 | return 0x00000000; | ||
63 | } | ||
64 | static inline u32 sim_send_ring_target_s(void) | ||
65 | { | ||
66 | return 2; | ||
67 | } | ||
68 | static inline u32 sim_send_ring_target_f(u32 v) | ||
69 | { | ||
70 | return (v & 0x3) << 0; | ||
71 | } | ||
72 | static inline u32 sim_send_ring_target_m(void) | ||
73 | { | ||
74 | return 0x3 << 0; | ||
75 | } | ||
76 | static inline u32 sim_send_ring_target_v(u32 r) | ||
77 | { | ||
78 | return (r >> 0) & 0x3; | ||
79 | } | ||
80 | static inline u32 sim_send_ring_target_phys_init_v(void) | ||
81 | { | ||
82 | return 0x00000001; | ||
83 | } | ||
84 | static inline u32 sim_send_ring_target_phys_init_f(void) | ||
85 | { | ||
86 | return 0x1; | ||
87 | } | ||
88 | static inline u32 sim_send_ring_target_phys__init_v(void) | ||
89 | { | ||
90 | return 0x00000001; | ||
91 | } | ||
92 | static inline u32 sim_send_ring_target_phys__init_f(void) | ||
93 | { | ||
94 | return 0x1; | ||
95 | } | ||
96 | static inline u32 sim_send_ring_target_phys__prod_v(void) | ||
97 | { | ||
98 | return 0x00000001; | ||
99 | } | ||
100 | static inline u32 sim_send_ring_target_phys__prod_f(void) | ||
101 | { | ||
102 | return 0x1; | ||
103 | } | ||
104 | static inline u32 sim_send_ring_target_phys_nvm_v(void) | ||
105 | { | ||
106 | return 0x00000001; | ||
107 | } | ||
108 | static inline u32 sim_send_ring_target_phys_nvm_f(void) | ||
109 | { | ||
110 | return 0x1; | ||
111 | } | ||
112 | static inline u32 sim_send_ring_target_phys_pci_v(void) | ||
113 | { | ||
114 | return 0x00000002; | ||
115 | } | ||
116 | static inline u32 sim_send_ring_target_phys_pci_f(void) | ||
117 | { | ||
118 | return 0x2; | ||
119 | } | ||
120 | static inline u32 sim_send_ring_target_phys_pci_coherent_v(void) | ||
121 | { | ||
122 | return 0x00000003; | ||
123 | } | ||
124 | static inline u32 sim_send_ring_target_phys_pci_coherent_f(void) | ||
125 | { | ||
126 | return 0x3; | ||
127 | } | ||
128 | static inline u32 sim_send_ring_status_s(void) | ||
129 | { | ||
130 | return 1; | ||
131 | } | ||
132 | static inline u32 sim_send_ring_status_f(u32 v) | ||
133 | { | ||
134 | return (v & 0x1) << 3; | ||
135 | } | ||
136 | static inline u32 sim_send_ring_status_m(void) | ||
137 | { | ||
138 | return 0x1 << 3; | ||
139 | } | ||
140 | static inline u32 sim_send_ring_status_v(u32 r) | ||
141 | { | ||
142 | return (r >> 3) & 0x1; | ||
143 | } | ||
144 | static inline u32 sim_send_ring_status_init_v(void) | ||
145 | { | ||
146 | return 0x00000000; | ||
147 | } | ||
148 | static inline u32 sim_send_ring_status_init_f(void) | ||
149 | { | ||
150 | return 0x0; | ||
151 | } | ||
152 | static inline u32 sim_send_ring_status__init_v(void) | ||
153 | { | ||
154 | return 0x00000000; | ||
155 | } | ||
156 | static inline u32 sim_send_ring_status__init_f(void) | ||
157 | { | ||
158 | return 0x0; | ||
159 | } | ||
160 | static inline u32 sim_send_ring_status__prod_v(void) | ||
161 | { | ||
162 | return 0x00000000; | ||
163 | } | ||
164 | static inline u32 sim_send_ring_status__prod_f(void) | ||
165 | { | ||
166 | return 0x0; | ||
167 | } | ||
168 | static inline u32 sim_send_ring_status_invalid_v(void) | ||
169 | { | ||
170 | return 0x00000000; | ||
171 | } | ||
172 | static inline u32 sim_send_ring_status_invalid_f(void) | ||
173 | { | ||
174 | return 0x0; | ||
175 | } | ||
176 | static inline u32 sim_send_ring_status_valid_v(void) | ||
177 | { | ||
178 | return 0x00000001; | ||
179 | } | ||
180 | static inline u32 sim_send_ring_status_valid_f(void) | ||
181 | { | ||
182 | return 0x8; | ||
183 | } | ||
184 | static inline u32 sim_send_ring_size_s(void) | ||
185 | { | ||
186 | return 2; | ||
187 | } | ||
188 | static inline u32 sim_send_ring_size_f(u32 v) | ||
189 | { | ||
190 | return (v & 0x3) << 4; | ||
191 | } | ||
192 | static inline u32 sim_send_ring_size_m(void) | ||
193 | { | ||
194 | return 0x3 << 4; | ||
195 | } | ||
196 | static inline u32 sim_send_ring_size_v(u32 r) | ||
197 | { | ||
198 | return (r >> 4) & 0x3; | ||
199 | } | ||
200 | static inline u32 sim_send_ring_size_init_v(void) | ||
201 | { | ||
202 | return 0x00000000; | ||
203 | } | ||
204 | static inline u32 sim_send_ring_size_init_f(void) | ||
205 | { | ||
206 | return 0x0; | ||
207 | } | ||
208 | static inline u32 sim_send_ring_size__init_v(void) | ||
209 | { | ||
210 | return 0x00000000; | ||
211 | } | ||
212 | static inline u32 sim_send_ring_size__init_f(void) | ||
213 | { | ||
214 | return 0x0; | ||
215 | } | ||
216 | static inline u32 sim_send_ring_size__prod_v(void) | ||
217 | { | ||
218 | return 0x00000000; | ||
219 | } | ||
220 | static inline u32 sim_send_ring_size__prod_f(void) | ||
221 | { | ||
222 | return 0x0; | ||
223 | } | ||
224 | static inline u32 sim_send_ring_size_4kb_v(void) | ||
225 | { | ||
226 | return 0x00000000; | ||
227 | } | ||
228 | static inline u32 sim_send_ring_size_4kb_f(void) | ||
229 | { | ||
230 | return 0x0; | ||
231 | } | ||
232 | static inline u32 sim_send_ring_size_8kb_v(void) | ||
233 | { | ||
234 | return 0x00000001; | ||
235 | } | ||
236 | static inline u32 sim_send_ring_size_8kb_f(void) | ||
237 | { | ||
238 | return 0x10; | ||
239 | } | ||
240 | static inline u32 sim_send_ring_size_12kb_v(void) | ||
241 | { | ||
242 | return 0x00000002; | ||
243 | } | ||
244 | static inline u32 sim_send_ring_size_12kb_f(void) | ||
245 | { | ||
246 | return 0x20; | ||
247 | } | ||
248 | static inline u32 sim_send_ring_size_16kb_v(void) | ||
249 | { | ||
250 | return 0x00000003; | ||
251 | } | ||
252 | static inline u32 sim_send_ring_size_16kb_f(void) | ||
253 | { | ||
254 | return 0x30; | ||
255 | } | ||
256 | static inline u32 sim_send_ring_gp_in_ring_s(void) | ||
257 | { | ||
258 | return 1; | ||
259 | } | ||
260 | static inline u32 sim_send_ring_gp_in_ring_f(u32 v) | ||
261 | { | ||
262 | return (v & 0x1) << 11; | ||
263 | } | ||
264 | static inline u32 sim_send_ring_gp_in_ring_m(void) | ||
265 | { | ||
266 | return 0x1 << 11; | ||
267 | } | ||
268 | static inline u32 sim_send_ring_gp_in_ring_v(u32 r) | ||
269 | { | ||
270 | return (r >> 11) & 0x1; | ||
271 | } | ||
272 | static inline u32 sim_send_ring_gp_in_ring__init_v(void) | ||
273 | { | ||
274 | return 0x00000000; | ||
275 | } | ||
276 | static inline u32 sim_send_ring_gp_in_ring__init_f(void) | ||
277 | { | ||
278 | return 0x0; | ||
279 | } | ||
280 | static inline u32 sim_send_ring_gp_in_ring__prod_v(void) | ||
281 | { | ||
282 | return 0x00000000; | ||
283 | } | ||
284 | static inline u32 sim_send_ring_gp_in_ring__prod_f(void) | ||
285 | { | ||
286 | return 0x0; | ||
287 | } | ||
288 | static inline u32 sim_send_ring_gp_in_ring_no_v(void) | ||
289 | { | ||
290 | return 0x00000000; | ||
291 | } | ||
292 | static inline u32 sim_send_ring_gp_in_ring_no_f(void) | ||
293 | { | ||
294 | return 0x0; | ||
295 | } | ||
296 | static inline u32 sim_send_ring_gp_in_ring_yes_v(void) | ||
297 | { | ||
298 | return 0x00000001; | ||
299 | } | ||
300 | static inline u32 sim_send_ring_gp_in_ring_yes_f(void) | ||
301 | { | ||
302 | return 0x800; | ||
303 | } | ||
304 | static inline u32 sim_send_ring_addr_lo_s(void) | ||
305 | { | ||
306 | return 20; | ||
307 | } | ||
308 | static inline u32 sim_send_ring_addr_lo_f(u32 v) | ||
309 | { | ||
310 | return (v & 0xfffff) << 12; | ||
311 | } | ||
312 | static inline u32 sim_send_ring_addr_lo_m(void) | ||
313 | { | ||
314 | return 0xfffff << 12; | ||
315 | } | ||
316 | static inline u32 sim_send_ring_addr_lo_v(u32 r) | ||
317 | { | ||
318 | return (r >> 12) & 0xfffff; | ||
319 | } | ||
320 | static inline u32 sim_send_ring_addr_lo__init_v(void) | ||
321 | { | ||
322 | return 0x00000000; | ||
323 | } | ||
324 | static inline u32 sim_send_ring_addr_lo__init_f(void) | ||
325 | { | ||
326 | return 0x0; | ||
327 | } | ||
328 | static inline u32 sim_send_ring_addr_lo__prod_v(void) | ||
329 | { | ||
330 | return 0x00000000; | ||
331 | } | ||
332 | static inline u32 sim_send_ring_addr_lo__prod_f(void) | ||
333 | { | ||
334 | return 0x0; | ||
335 | } | ||
336 | static inline u32 sim_send_ring_hi_r(void) | ||
337 | { | ||
338 | return 0x00000004; | ||
339 | } | ||
340 | static inline u32 sim_send_ring_hi_addr_s(void) | ||
341 | { | ||
342 | return 20; | ||
343 | } | ||
344 | static inline u32 sim_send_ring_hi_addr_f(u32 v) | ||
345 | { | ||
346 | return (v & 0xfffff) << 0; | ||
347 | } | ||
348 | static inline u32 sim_send_ring_hi_addr_m(void) | ||
349 | { | ||
350 | return 0xfffff << 0; | ||
351 | } | ||
352 | static inline u32 sim_send_ring_hi_addr_v(u32 r) | ||
353 | { | ||
354 | return (r >> 0) & 0xfffff; | ||
355 | } | ||
356 | static inline u32 sim_send_ring_hi_addr__init_v(void) | ||
357 | { | ||
358 | return 0x00000000; | ||
359 | } | ||
360 | static inline u32 sim_send_ring_hi_addr__init_f(void) | ||
361 | { | ||
362 | return 0x0; | ||
363 | } | ||
364 | static inline u32 sim_send_ring_hi_addr__prod_v(void) | ||
365 | { | ||
366 | return 0x00000000; | ||
367 | } | ||
368 | static inline u32 sim_send_ring_hi_addr__prod_f(void) | ||
369 | { | ||
370 | return 0x0; | ||
371 | } | ||
372 | static inline u32 sim_send_put_r(void) | ||
373 | { | ||
374 | return 0x00000008; | ||
375 | } | ||
376 | static inline u32 sim_send_put_pointer_s(void) | ||
377 | { | ||
378 | return 29; | ||
379 | } | ||
380 | static inline u32 sim_send_put_pointer_f(u32 v) | ||
381 | { | ||
382 | return (v & 0x1fffffff) << 3; | ||
383 | } | ||
384 | static inline u32 sim_send_put_pointer_m(void) | ||
385 | { | ||
386 | return 0x1fffffff << 3; | ||
387 | } | ||
388 | static inline u32 sim_send_put_pointer_v(u32 r) | ||
389 | { | ||
390 | return (r >> 3) & 0x1fffffff; | ||
391 | } | ||
392 | static inline u32 sim_send_get_r(void) | ||
393 | { | ||
394 | return 0x0000000c; | ||
395 | } | ||
396 | static inline u32 sim_send_get_pointer_s(void) | ||
397 | { | ||
398 | return 29; | ||
399 | } | ||
400 | static inline u32 sim_send_get_pointer_f(u32 v) | ||
401 | { | ||
402 | return (v & 0x1fffffff) << 3; | ||
403 | } | ||
404 | static inline u32 sim_send_get_pointer_m(void) | ||
405 | { | ||
406 | return 0x1fffffff << 3; | ||
407 | } | ||
408 | static inline u32 sim_send_get_pointer_v(u32 r) | ||
409 | { | ||
410 | return (r >> 3) & 0x1fffffff; | ||
411 | } | ||
412 | static inline u32 sim_recv_ring_r(void) | ||
413 | { | ||
414 | return 0x00000010; | ||
415 | } | ||
416 | static inline u32 sim_recv_ring_target_s(void) | ||
417 | { | ||
418 | return 2; | ||
419 | } | ||
420 | static inline u32 sim_recv_ring_target_f(u32 v) | ||
421 | { | ||
422 | return (v & 0x3) << 0; | ||
423 | } | ||
424 | static inline u32 sim_recv_ring_target_m(void) | ||
425 | { | ||
426 | return 0x3 << 0; | ||
427 | } | ||
428 | static inline u32 sim_recv_ring_target_v(u32 r) | ||
429 | { | ||
430 | return (r >> 0) & 0x3; | ||
431 | } | ||
432 | static inline u32 sim_recv_ring_target_phys_init_v(void) | ||
433 | { | ||
434 | return 0x00000001; | ||
435 | } | ||
436 | static inline u32 sim_recv_ring_target_phys_init_f(void) | ||
437 | { | ||
438 | return 0x1; | ||
439 | } | ||
440 | static inline u32 sim_recv_ring_target_phys__init_v(void) | ||
441 | { | ||
442 | return 0x00000001; | ||
443 | } | ||
444 | static inline u32 sim_recv_ring_target_phys__init_f(void) | ||
445 | { | ||
446 | return 0x1; | ||
447 | } | ||
448 | static inline u32 sim_recv_ring_target_phys__prod_v(void) | ||
449 | { | ||
450 | return 0x00000001; | ||
451 | } | ||
452 | static inline u32 sim_recv_ring_target_phys__prod_f(void) | ||
453 | { | ||
454 | return 0x1; | ||
455 | } | ||
456 | static inline u32 sim_recv_ring_target_phys_nvm_v(void) | ||
457 | { | ||
458 | return 0x00000001; | ||
459 | } | ||
460 | static inline u32 sim_recv_ring_target_phys_nvm_f(void) | ||
461 | { | ||
462 | return 0x1; | ||
463 | } | ||
464 | static inline u32 sim_recv_ring_target_phys_pci_v(void) | ||
465 | { | ||
466 | return 0x00000002; | ||
467 | } | ||
468 | static inline u32 sim_recv_ring_target_phys_pci_f(void) | ||
469 | { | ||
470 | return 0x2; | ||
471 | } | ||
472 | static inline u32 sim_recv_ring_target_phys_pci_coherent_v(void) | ||
473 | { | ||
474 | return 0x00000003; | ||
475 | } | ||
476 | static inline u32 sim_recv_ring_target_phys_pci_coherent_f(void) | ||
477 | { | ||
478 | return 0x3; | ||
479 | } | ||
480 | static inline u32 sim_recv_ring_status_s(void) | ||
481 | { | ||
482 | return 1; | ||
483 | } | ||
484 | static inline u32 sim_recv_ring_status_f(u32 v) | ||
485 | { | ||
486 | return (v & 0x1) << 3; | ||
487 | } | ||
488 | static inline u32 sim_recv_ring_status_m(void) | ||
489 | { | ||
490 | return 0x1 << 3; | ||
491 | } | ||
492 | static inline u32 sim_recv_ring_status_v(u32 r) | ||
493 | { | ||
494 | return (r >> 3) & 0x1; | ||
495 | } | ||
496 | static inline u32 sim_recv_ring_status_init_v(void) | ||
497 | { | ||
498 | return 0x00000000; | ||
499 | } | ||
500 | static inline u32 sim_recv_ring_status_init_f(void) | ||
501 | { | ||
502 | return 0x0; | ||
503 | } | ||
504 | static inline u32 sim_recv_ring_status__init_v(void) | ||
505 | { | ||
506 | return 0x00000000; | ||
507 | } | ||
508 | static inline u32 sim_recv_ring_status__init_f(void) | ||
509 | { | ||
510 | return 0x0; | ||
511 | } | ||
512 | static inline u32 sim_recv_ring_status__prod_v(void) | ||
513 | { | ||
514 | return 0x00000000; | ||
515 | } | ||
516 | static inline u32 sim_recv_ring_status__prod_f(void) | ||
517 | { | ||
518 | return 0x0; | ||
519 | } | ||
520 | static inline u32 sim_recv_ring_status_invalid_v(void) | ||
521 | { | ||
522 | return 0x00000000; | ||
523 | } | ||
524 | static inline u32 sim_recv_ring_status_invalid_f(void) | ||
525 | { | ||
526 | return 0x0; | ||
527 | } | ||
528 | static inline u32 sim_recv_ring_status_valid_v(void) | ||
529 | { | ||
530 | return 0x00000001; | ||
531 | } | ||
532 | static inline u32 sim_recv_ring_status_valid_f(void) | ||
533 | { | ||
534 | return 0x8; | ||
535 | } | ||
536 | static inline u32 sim_recv_ring_size_s(void) | ||
537 | { | ||
538 | return 2; | ||
539 | } | ||
540 | static inline u32 sim_recv_ring_size_f(u32 v) | ||
541 | { | ||
542 | return (v & 0x3) << 4; | ||
543 | } | ||
544 | static inline u32 sim_recv_ring_size_m(void) | ||
545 | { | ||
546 | return 0x3 << 4; | ||
547 | } | ||
548 | static inline u32 sim_recv_ring_size_v(u32 r) | ||
549 | { | ||
550 | return (r >> 4) & 0x3; | ||
551 | } | ||
552 | static inline u32 sim_recv_ring_size_init_v(void) | ||
553 | { | ||
554 | return 0x00000000; | ||
555 | } | ||
556 | static inline u32 sim_recv_ring_size_init_f(void) | ||
557 | { | ||
558 | return 0x0; | ||
559 | } | ||
560 | static inline u32 sim_recv_ring_size__init_v(void) | ||
561 | { | ||
562 | return 0x00000000; | ||
563 | } | ||
564 | static inline u32 sim_recv_ring_size__init_f(void) | ||
565 | { | ||
566 | return 0x0; | ||
567 | } | ||
568 | static inline u32 sim_recv_ring_size__prod_v(void) | ||
569 | { | ||
570 | return 0x00000000; | ||
571 | } | ||
572 | static inline u32 sim_recv_ring_size__prod_f(void) | ||
573 | { | ||
574 | return 0x0; | ||
575 | } | ||
576 | static inline u32 sim_recv_ring_size_4kb_v(void) | ||
577 | { | ||
578 | return 0x00000000; | ||
579 | } | ||
580 | static inline u32 sim_recv_ring_size_4kb_f(void) | ||
581 | { | ||
582 | return 0x0; | ||
583 | } | ||
584 | static inline u32 sim_recv_ring_size_8kb_v(void) | ||
585 | { | ||
586 | return 0x00000001; | ||
587 | } | ||
588 | static inline u32 sim_recv_ring_size_8kb_f(void) | ||
589 | { | ||
590 | return 0x10; | ||
591 | } | ||
592 | static inline u32 sim_recv_ring_size_12kb_v(void) | ||
593 | { | ||
594 | return 0x00000002; | ||
595 | } | ||
596 | static inline u32 sim_recv_ring_size_12kb_f(void) | ||
597 | { | ||
598 | return 0x20; | ||
599 | } | ||
600 | static inline u32 sim_recv_ring_size_16kb_v(void) | ||
601 | { | ||
602 | return 0x00000003; | ||
603 | } | ||
604 | static inline u32 sim_recv_ring_size_16kb_f(void) | ||
605 | { | ||
606 | return 0x30; | ||
607 | } | ||
608 | static inline u32 sim_recv_ring_gp_in_ring_s(void) | ||
609 | { | ||
610 | return 1; | ||
611 | } | ||
612 | static inline u32 sim_recv_ring_gp_in_ring_f(u32 v) | ||
613 | { | ||
614 | return (v & 0x1) << 11; | ||
615 | } | ||
616 | static inline u32 sim_recv_ring_gp_in_ring_m(void) | ||
617 | { | ||
618 | return 0x1 << 11; | ||
619 | } | ||
620 | static inline u32 sim_recv_ring_gp_in_ring_v(u32 r) | ||
621 | { | ||
622 | return (r >> 11) & 0x1; | ||
623 | } | ||
624 | static inline u32 sim_recv_ring_gp_in_ring__init_v(void) | ||
625 | { | ||
626 | return 0x00000000; | ||
627 | } | ||
628 | static inline u32 sim_recv_ring_gp_in_ring__init_f(void) | ||
629 | { | ||
630 | return 0x0; | ||
631 | } | ||
632 | static inline u32 sim_recv_ring_gp_in_ring__prod_v(void) | ||
633 | { | ||
634 | return 0x00000000; | ||
635 | } | ||
636 | static inline u32 sim_recv_ring_gp_in_ring__prod_f(void) | ||
637 | { | ||
638 | return 0x0; | ||
639 | } | ||
640 | static inline u32 sim_recv_ring_gp_in_ring_no_v(void) | ||
641 | { | ||
642 | return 0x00000000; | ||
643 | } | ||
644 | static inline u32 sim_recv_ring_gp_in_ring_no_f(void) | ||
645 | { | ||
646 | return 0x0; | ||
647 | } | ||
648 | static inline u32 sim_recv_ring_gp_in_ring_yes_v(void) | ||
649 | { | ||
650 | return 0x00000001; | ||
651 | } | ||
652 | static inline u32 sim_recv_ring_gp_in_ring_yes_f(void) | ||
653 | { | ||
654 | return 0x800; | ||
655 | } | ||
656 | static inline u32 sim_recv_ring_addr_lo_s(void) | ||
657 | { | ||
658 | return 20; | ||
659 | } | ||
660 | static inline u32 sim_recv_ring_addr_lo_f(u32 v) | ||
661 | { | ||
662 | return (v & 0xfffff) << 12; | ||
663 | } | ||
664 | static inline u32 sim_recv_ring_addr_lo_m(void) | ||
665 | { | ||
666 | return 0xfffff << 12; | ||
667 | } | ||
668 | static inline u32 sim_recv_ring_addr_lo_v(u32 r) | ||
669 | { | ||
670 | return (r >> 12) & 0xfffff; | ||
671 | } | ||
672 | static inline u32 sim_recv_ring_addr_lo__init_v(void) | ||
673 | { | ||
674 | return 0x00000000; | ||
675 | } | ||
676 | static inline u32 sim_recv_ring_addr_lo__init_f(void) | ||
677 | { | ||
678 | return 0x0; | ||
679 | } | ||
680 | static inline u32 sim_recv_ring_addr_lo__prod_v(void) | ||
681 | { | ||
682 | return 0x00000000; | ||
683 | } | ||
684 | static inline u32 sim_recv_ring_addr_lo__prod_f(void) | ||
685 | { | ||
686 | return 0x0; | ||
687 | } | ||
688 | static inline u32 sim_recv_ring_hi_r(void) | ||
689 | { | ||
690 | return 0x00000014; | ||
691 | } | ||
692 | static inline u32 sim_recv_ring_hi_addr_s(void) | ||
693 | { | ||
694 | return 20; | ||
695 | } | ||
696 | static inline u32 sim_recv_ring_hi_addr_f(u32 v) | ||
697 | { | ||
698 | return (v & 0xfffff) << 0; | ||
699 | } | ||
700 | static inline u32 sim_recv_ring_hi_addr_m(void) | ||
701 | { | ||
702 | return 0xfffff << 0; | ||
703 | } | ||
704 | static inline u32 sim_recv_ring_hi_addr_v(u32 r) | ||
705 | { | ||
706 | return (r >> 0) & 0xfffff; | ||
707 | } | ||
708 | static inline u32 sim_recv_ring_hi_addr__init_v(void) | ||
709 | { | ||
710 | return 0x00000000; | ||
711 | } | ||
712 | static inline u32 sim_recv_ring_hi_addr__init_f(void) | ||
713 | { | ||
714 | return 0x0; | ||
715 | } | ||
716 | static inline u32 sim_recv_ring_hi_addr__prod_v(void) | ||
717 | { | ||
718 | return 0x00000000; | ||
719 | } | ||
720 | static inline u32 sim_recv_ring_hi_addr__prod_f(void) | ||
721 | { | ||
722 | return 0x0; | ||
723 | } | ||
724 | static inline u32 sim_recv_put_r(void) | ||
725 | { | ||
726 | return 0x00000018; | ||
727 | } | ||
728 | static inline u32 sim_recv_put_pointer_s(void) | ||
729 | { | ||
730 | return 11; | ||
731 | } | ||
732 | static inline u32 sim_recv_put_pointer_f(u32 v) | ||
733 | { | ||
734 | return (v & 0x7ff) << 3; | ||
735 | } | ||
736 | static inline u32 sim_recv_put_pointer_m(void) | ||
737 | { | ||
738 | return 0x7ff << 3; | ||
739 | } | ||
740 | static inline u32 sim_recv_put_pointer_v(u32 r) | ||
741 | { | ||
742 | return (r >> 3) & 0x7ff; | ||
743 | } | ||
744 | static inline u32 sim_recv_get_r(void) | ||
745 | { | ||
746 | return 0x0000001c; | ||
747 | } | ||
748 | static inline u32 sim_recv_get_pointer_s(void) | ||
749 | { | ||
750 | return 11; | ||
751 | } | ||
752 | static inline u32 sim_recv_get_pointer_f(u32 v) | ||
753 | { | ||
754 | return (v & 0x7ff) << 3; | ||
755 | } | ||
756 | static inline u32 sim_recv_get_pointer_m(void) | ||
757 | { | ||
758 | return 0x7ff << 3; | ||
759 | } | ||
760 | static inline u32 sim_recv_get_pointer_v(u32 r) | ||
761 | { | ||
762 | return (r >> 3) & 0x7ff; | ||
763 | } | ||
764 | static inline u32 sim_config_r(void) | ||
765 | { | ||
766 | return 0x00000020; | ||
767 | } | ||
768 | static inline u32 sim_config_mode_s(void) | ||
769 | { | ||
770 | return 1; | ||
771 | } | ||
772 | static inline u32 sim_config_mode_f(u32 v) | ||
773 | { | ||
774 | return (v & 0x1) << 0; | ||
775 | } | ||
776 | static inline u32 sim_config_mode_m(void) | ||
777 | { | ||
778 | return 0x1 << 0; | ||
779 | } | ||
780 | static inline u32 sim_config_mode_v(u32 r) | ||
781 | { | ||
782 | return (r >> 0) & 0x1; | ||
783 | } | ||
784 | static inline u32 sim_config_mode_disabled_v(void) | ||
785 | { | ||
786 | return 0x00000000; | ||
787 | } | ||
788 | static inline u32 sim_config_mode_disabled_f(void) | ||
789 | { | ||
790 | return 0x0; | ||
791 | } | ||
792 | static inline u32 sim_config_mode_enabled_v(void) | ||
793 | { | ||
794 | return 0x00000001; | ||
795 | } | ||
796 | static inline u32 sim_config_mode_enabled_f(void) | ||
797 | { | ||
798 | return 0x1; | ||
799 | } | ||
800 | static inline u32 sim_config_channels_s(void) | ||
801 | { | ||
802 | return 7; | ||
803 | } | ||
804 | static inline u32 sim_config_channels_f(u32 v) | ||
805 | { | ||
806 | return (v & 0x7f) << 1; | ||
807 | } | ||
808 | static inline u32 sim_config_channels_m(void) | ||
809 | { | ||
810 | return 0x7f << 1; | ||
811 | } | ||
812 | static inline u32 sim_config_channels_v(u32 r) | ||
813 | { | ||
814 | return (r >> 1) & 0x7f; | ||
815 | } | ||
816 | static inline u32 sim_config_channels_none_v(void) | ||
817 | { | ||
818 | return 0x00000000; | ||
819 | } | ||
820 | static inline u32 sim_config_channels_none_f(void) | ||
821 | { | ||
822 | return 0x0; | ||
823 | } | ||
824 | static inline u32 sim_config_cached_only_s(void) | ||
825 | { | ||
826 | return 1; | ||
827 | } | ||
828 | static inline u32 sim_config_cached_only_f(u32 v) | ||
829 | { | ||
830 | return (v & 0x1) << 8; | ||
831 | } | ||
832 | static inline u32 sim_config_cached_only_m(void) | ||
833 | { | ||
834 | return 0x1 << 8; | ||
835 | } | ||
836 | static inline u32 sim_config_cached_only_v(u32 r) | ||
837 | { | ||
838 | return (r >> 8) & 0x1; | ||
839 | } | ||
840 | static inline u32 sim_config_cached_only_disabled_v(void) | ||
841 | { | ||
842 | return 0x00000000; | ||
843 | } | ||
844 | static inline u32 sim_config_cached_only_disabled_f(void) | ||
845 | { | ||
846 | return 0x0; | ||
847 | } | ||
848 | static inline u32 sim_config_cached_only_enabled_v(void) | ||
849 | { | ||
850 | return 0x00000001; | ||
851 | } | ||
852 | static inline u32 sim_config_cached_only_enabled_f(void) | ||
853 | { | ||
854 | return 0x100; | ||
855 | } | ||
856 | static inline u32 sim_config_validity_s(void) | ||
857 | { | ||
858 | return 2; | ||
859 | } | ||
860 | static inline u32 sim_config_validity_f(u32 v) | ||
861 | { | ||
862 | return (v & 0x3) << 9; | ||
863 | } | ||
864 | static inline u32 sim_config_validity_m(void) | ||
865 | { | ||
866 | return 0x3 << 9; | ||
867 | } | ||
868 | static inline u32 sim_config_validity_v(u32 r) | ||
869 | { | ||
870 | return (r >> 9) & 0x3; | ||
871 | } | ||
872 | static inline u32 sim_config_validity__init_v(void) | ||
873 | { | ||
874 | return 0x00000001; | ||
875 | } | ||
876 | static inline u32 sim_config_validity__init_f(void) | ||
877 | { | ||
878 | return 0x200; | ||
879 | } | ||
880 | static inline u32 sim_config_validity_valid_v(void) | ||
881 | { | ||
882 | return 0x00000001; | ||
883 | } | ||
884 | static inline u32 sim_config_validity_valid_f(void) | ||
885 | { | ||
886 | return 0x200; | ||
887 | } | ||
888 | static inline u32 sim_config_simulation_s(void) | ||
889 | { | ||
890 | return 2; | ||
891 | } | ||
892 | static inline u32 sim_config_simulation_f(u32 v) | ||
893 | { | ||
894 | return (v & 0x3) << 12; | ||
895 | } | ||
896 | static inline u32 sim_config_simulation_m(void) | ||
897 | { | ||
898 | return 0x3 << 12; | ||
899 | } | ||
900 | static inline u32 sim_config_simulation_v(u32 r) | ||
901 | { | ||
902 | return (r >> 12) & 0x3; | ||
903 | } | ||
904 | static inline u32 sim_config_simulation_disabled_v(void) | ||
905 | { | ||
906 | return 0x00000000; | ||
907 | } | ||
908 | static inline u32 sim_config_simulation_disabled_f(void) | ||
909 | { | ||
910 | return 0x0; | ||
911 | } | ||
912 | static inline u32 sim_config_simulation_fmodel_v(void) | ||
913 | { | ||
914 | return 0x00000001; | ||
915 | } | ||
916 | static inline u32 sim_config_simulation_fmodel_f(void) | ||
917 | { | ||
918 | return 0x1000; | ||
919 | } | ||
920 | static inline u32 sim_config_simulation_rtlsim_v(void) | ||
921 | { | ||
922 | return 0x00000002; | ||
923 | } | ||
924 | static inline u32 sim_config_simulation_rtlsim_f(void) | ||
925 | { | ||
926 | return 0x2000; | ||
927 | } | ||
928 | static inline u32 sim_config_secondary_display_s(void) | ||
929 | { | ||
930 | return 1; | ||
931 | } | ||
932 | static inline u32 sim_config_secondary_display_f(u32 v) | ||
933 | { | ||
934 | return (v & 0x1) << 14; | ||
935 | } | ||
936 | static inline u32 sim_config_secondary_display_m(void) | ||
937 | { | ||
938 | return 0x1 << 14; | ||
939 | } | ||
940 | static inline u32 sim_config_secondary_display_v(u32 r) | ||
941 | { | ||
942 | return (r >> 14) & 0x1; | ||
943 | } | ||
944 | static inline u32 sim_config_secondary_display_disabled_v(void) | ||
945 | { | ||
946 | return 0x00000000; | ||
947 | } | ||
948 | static inline u32 sim_config_secondary_display_disabled_f(void) | ||
949 | { | ||
950 | return 0x0; | ||
951 | } | ||
952 | static inline u32 sim_config_secondary_display_enabled_v(void) | ||
953 | { | ||
954 | return 0x00000001; | ||
955 | } | ||
956 | static inline u32 sim_config_secondary_display_enabled_f(void) | ||
957 | { | ||
958 | return 0x4000; | ||
959 | } | ||
960 | static inline u32 sim_config_num_heads_s(void) | ||
961 | { | ||
962 | return 8; | ||
963 | } | ||
964 | static inline u32 sim_config_num_heads_f(u32 v) | ||
965 | { | ||
966 | return (v & 0xff) << 17; | ||
967 | } | ||
968 | static inline u32 sim_config_num_heads_m(void) | ||
969 | { | ||
970 | return 0xff << 17; | ||
971 | } | ||
972 | static inline u32 sim_config_num_heads_v(u32 r) | ||
973 | { | ||
974 | return (r >> 17) & 0xff; | ||
975 | } | ||
976 | static inline u32 sim_event_ring_r(void) | ||
977 | { | ||
978 | return 0x00000030; | ||
979 | } | ||
980 | static inline u32 sim_event_ring_target_s(void) | ||
981 | { | ||
982 | return 2; | ||
983 | } | ||
984 | static inline u32 sim_event_ring_target_f(u32 v) | ||
985 | { | ||
986 | return (v & 0x3) << 0; | ||
987 | } | ||
988 | static inline u32 sim_event_ring_target_m(void) | ||
989 | { | ||
990 | return 0x3 << 0; | ||
991 | } | ||
992 | static inline u32 sim_event_ring_target_v(u32 r) | ||
993 | { | ||
994 | return (r >> 0) & 0x3; | ||
995 | } | ||
996 | static inline u32 sim_event_ring_target_phys_init_v(void) | ||
997 | { | ||
998 | return 0x00000001; | ||
999 | } | ||
1000 | static inline u32 sim_event_ring_target_phys_init_f(void) | ||
1001 | { | ||
1002 | return 0x1; | ||
1003 | } | ||
1004 | static inline u32 sim_event_ring_target_phys__init_v(void) | ||
1005 | { | ||
1006 | return 0x00000001; | ||
1007 | } | ||
1008 | static inline u32 sim_event_ring_target_phys__init_f(void) | ||
1009 | { | ||
1010 | return 0x1; | ||
1011 | } | ||
1012 | static inline u32 sim_event_ring_target_phys__prod_v(void) | ||
1013 | { | ||
1014 | return 0x00000001; | ||
1015 | } | ||
1016 | static inline u32 sim_event_ring_target_phys__prod_f(void) | ||
1017 | { | ||
1018 | return 0x1; | ||
1019 | } | ||
1020 | static inline u32 sim_event_ring_target_phys_nvm_v(void) | ||
1021 | { | ||
1022 | return 0x00000001; | ||
1023 | } | ||
1024 | static inline u32 sim_event_ring_target_phys_nvm_f(void) | ||
1025 | { | ||
1026 | return 0x1; | ||
1027 | } | ||
1028 | static inline u32 sim_event_ring_target_phys_pci_v(void) | ||
1029 | { | ||
1030 | return 0x00000002; | ||
1031 | } | ||
1032 | static inline u32 sim_event_ring_target_phys_pci_f(void) | ||
1033 | { | ||
1034 | return 0x2; | ||
1035 | } | ||
1036 | static inline u32 sim_event_ring_target_phys_pci_coherent_v(void) | ||
1037 | { | ||
1038 | return 0x00000003; | ||
1039 | } | ||
1040 | static inline u32 sim_event_ring_target_phys_pci_coherent_f(void) | ||
1041 | { | ||
1042 | return 0x3; | ||
1043 | } | ||
1044 | static inline u32 sim_event_ring_status_s(void) | ||
1045 | { | ||
1046 | return 1; | ||
1047 | } | ||
1048 | static inline u32 sim_event_ring_status_f(u32 v) | ||
1049 | { | ||
1050 | return (v & 0x1) << 3; | ||
1051 | } | ||
1052 | static inline u32 sim_event_ring_status_m(void) | ||
1053 | { | ||
1054 | return 0x1 << 3; | ||
1055 | } | ||
1056 | static inline u32 sim_event_ring_status_v(u32 r) | ||
1057 | { | ||
1058 | return (r >> 3) & 0x1; | ||
1059 | } | ||
1060 | static inline u32 sim_event_ring_status_init_v(void) | ||
1061 | { | ||
1062 | return 0x00000000; | ||
1063 | } | ||
1064 | static inline u32 sim_event_ring_status_init_f(void) | ||
1065 | { | ||
1066 | return 0x0; | ||
1067 | } | ||
1068 | static inline u32 sim_event_ring_status__init_v(void) | ||
1069 | { | ||
1070 | return 0x00000000; | ||
1071 | } | ||
1072 | static inline u32 sim_event_ring_status__init_f(void) | ||
1073 | { | ||
1074 | return 0x0; | ||
1075 | } | ||
1076 | static inline u32 sim_event_ring_status__prod_v(void) | ||
1077 | { | ||
1078 | return 0x00000000; | ||
1079 | } | ||
1080 | static inline u32 sim_event_ring_status__prod_f(void) | ||
1081 | { | ||
1082 | return 0x0; | ||
1083 | } | ||
1084 | static inline u32 sim_event_ring_status_invalid_v(void) | ||
1085 | { | ||
1086 | return 0x00000000; | ||
1087 | } | ||
1088 | static inline u32 sim_event_ring_status_invalid_f(void) | ||
1089 | { | ||
1090 | return 0x0; | ||
1091 | } | ||
1092 | static inline u32 sim_event_ring_status_valid_v(void) | ||
1093 | { | ||
1094 | return 0x00000001; | ||
1095 | } | ||
1096 | static inline u32 sim_event_ring_status_valid_f(void) | ||
1097 | { | ||
1098 | return 0x8; | ||
1099 | } | ||
1100 | static inline u32 sim_event_ring_size_s(void) | ||
1101 | { | ||
1102 | return 2; | ||
1103 | } | ||
1104 | static inline u32 sim_event_ring_size_f(u32 v) | ||
1105 | { | ||
1106 | return (v & 0x3) << 4; | ||
1107 | } | ||
1108 | static inline u32 sim_event_ring_size_m(void) | ||
1109 | { | ||
1110 | return 0x3 << 4; | ||
1111 | } | ||
1112 | static inline u32 sim_event_ring_size_v(u32 r) | ||
1113 | { | ||
1114 | return (r >> 4) & 0x3; | ||
1115 | } | ||
1116 | static inline u32 sim_event_ring_size_init_v(void) | ||
1117 | { | ||
1118 | return 0x00000000; | ||
1119 | } | ||
1120 | static inline u32 sim_event_ring_size_init_f(void) | ||
1121 | { | ||
1122 | return 0x0; | ||
1123 | } | ||
1124 | static inline u32 sim_event_ring_size__init_v(void) | ||
1125 | { | ||
1126 | return 0x00000000; | ||
1127 | } | ||
1128 | static inline u32 sim_event_ring_size__init_f(void) | ||
1129 | { | ||
1130 | return 0x0; | ||
1131 | } | ||
1132 | static inline u32 sim_event_ring_size__prod_v(void) | ||
1133 | { | ||
1134 | return 0x00000000; | ||
1135 | } | ||
1136 | static inline u32 sim_event_ring_size__prod_f(void) | ||
1137 | { | ||
1138 | return 0x0; | ||
1139 | } | ||
1140 | static inline u32 sim_event_ring_size_4kb_v(void) | ||
1141 | { | ||
1142 | return 0x00000000; | ||
1143 | } | ||
1144 | static inline u32 sim_event_ring_size_4kb_f(void) | ||
1145 | { | ||
1146 | return 0x0; | ||
1147 | } | ||
1148 | static inline u32 sim_event_ring_size_8kb_v(void) | ||
1149 | { | ||
1150 | return 0x00000001; | ||
1151 | } | ||
1152 | static inline u32 sim_event_ring_size_8kb_f(void) | ||
1153 | { | ||
1154 | return 0x10; | ||
1155 | } | ||
1156 | static inline u32 sim_event_ring_size_12kb_v(void) | ||
1157 | { | ||
1158 | return 0x00000002; | ||
1159 | } | ||
1160 | static inline u32 sim_event_ring_size_12kb_f(void) | ||
1161 | { | ||
1162 | return 0x20; | ||
1163 | } | ||
1164 | static inline u32 sim_event_ring_size_16kb_v(void) | ||
1165 | { | ||
1166 | return 0x00000003; | ||
1167 | } | ||
1168 | static inline u32 sim_event_ring_size_16kb_f(void) | ||
1169 | { | ||
1170 | return 0x30; | ||
1171 | } | ||
1172 | static inline u32 sim_event_ring_gp_in_ring_s(void) | ||
1173 | { | ||
1174 | return 1; | ||
1175 | } | ||
1176 | static inline u32 sim_event_ring_gp_in_ring_f(u32 v) | ||
1177 | { | ||
1178 | return (v & 0x1) << 11; | ||
1179 | } | ||
1180 | static inline u32 sim_event_ring_gp_in_ring_m(void) | ||
1181 | { | ||
1182 | return 0x1 << 11; | ||
1183 | } | ||
1184 | static inline u32 sim_event_ring_gp_in_ring_v(u32 r) | ||
1185 | { | ||
1186 | return (r >> 11) & 0x1; | ||
1187 | } | ||
1188 | static inline u32 sim_event_ring_gp_in_ring__init_v(void) | ||
1189 | { | ||
1190 | return 0x00000000; | ||
1191 | } | ||
1192 | static inline u32 sim_event_ring_gp_in_ring__init_f(void) | ||
1193 | { | ||
1194 | return 0x0; | ||
1195 | } | ||
1196 | static inline u32 sim_event_ring_gp_in_ring__prod_v(void) | ||
1197 | { | ||
1198 | return 0x00000000; | ||
1199 | } | ||
1200 | static inline u32 sim_event_ring_gp_in_ring__prod_f(void) | ||
1201 | { | ||
1202 | return 0x0; | ||
1203 | } | ||
1204 | static inline u32 sim_event_ring_gp_in_ring_no_v(void) | ||
1205 | { | ||
1206 | return 0x00000000; | ||
1207 | } | ||
1208 | static inline u32 sim_event_ring_gp_in_ring_no_f(void) | ||
1209 | { | ||
1210 | return 0x0; | ||
1211 | } | ||
1212 | static inline u32 sim_event_ring_gp_in_ring_yes_v(void) | ||
1213 | { | ||
1214 | return 0x00000001; | ||
1215 | } | ||
1216 | static inline u32 sim_event_ring_gp_in_ring_yes_f(void) | ||
1217 | { | ||
1218 | return 0x800; | ||
1219 | } | ||
1220 | static inline u32 sim_event_ring_addr_lo_s(void) | ||
1221 | { | ||
1222 | return 20; | ||
1223 | } | ||
1224 | static inline u32 sim_event_ring_addr_lo_f(u32 v) | ||
1225 | { | ||
1226 | return (v & 0xfffff) << 12; | ||
1227 | } | ||
1228 | static inline u32 sim_event_ring_addr_lo_m(void) | ||
1229 | { | ||
1230 | return 0xfffff << 12; | ||
1231 | } | ||
1232 | static inline u32 sim_event_ring_addr_lo_v(u32 r) | ||
1233 | { | ||
1234 | return (r >> 12) & 0xfffff; | ||
1235 | } | ||
1236 | static inline u32 sim_event_ring_addr_lo__init_v(void) | ||
1237 | { | ||
1238 | return 0x00000000; | ||
1239 | } | ||
1240 | static inline u32 sim_event_ring_addr_lo__init_f(void) | ||
1241 | { | ||
1242 | return 0x0; | ||
1243 | } | ||
1244 | static inline u32 sim_event_ring_addr_lo__prod_v(void) | ||
1245 | { | ||
1246 | return 0x00000000; | ||
1247 | } | ||
1248 | static inline u32 sim_event_ring_addr_lo__prod_f(void) | ||
1249 | { | ||
1250 | return 0x0; | ||
1251 | } | ||
1252 | static inline u32 sim_event_ring_hi_v(void) | ||
1253 | { | ||
1254 | return 0x00000034; | ||
1255 | } | ||
1256 | static inline u32 sim_event_ring_hi_addr_s(void) | ||
1257 | { | ||
1258 | return 20; | ||
1259 | } | ||
1260 | static inline u32 sim_event_ring_hi_addr_f(u32 v) | ||
1261 | { | ||
1262 | return (v & 0xfffff) << 0; | ||
1263 | } | ||
1264 | static inline u32 sim_event_ring_hi_addr_m(void) | ||
1265 | { | ||
1266 | return 0xfffff << 0; | ||
1267 | } | ||
1268 | static inline u32 sim_event_ring_hi_addr_v(u32 r) | ||
1269 | { | ||
1270 | return (r >> 0) & 0xfffff; | ||
1271 | } | ||
1272 | static inline u32 sim_event_ring_hi_addr__init_v(void) | ||
1273 | { | ||
1274 | return 0x00000000; | ||
1275 | } | ||
1276 | static inline u32 sim_event_ring_hi_addr__init_f(void) | ||
1277 | { | ||
1278 | return 0x0; | ||
1279 | } | ||
1280 | static inline u32 sim_event_ring_hi_addr__prod_v(void) | ||
1281 | { | ||
1282 | return 0x00000000; | ||
1283 | } | ||
1284 | static inline u32 sim_event_ring_hi_addr__prod_f(void) | ||
1285 | { | ||
1286 | return 0x0; | ||
1287 | } | ||
1288 | static inline u32 sim_event_put_r(void) | ||
1289 | { | ||
1290 | return 0x00000038; | ||
1291 | } | ||
1292 | static inline u32 sim_event_put_pointer_s(void) | ||
1293 | { | ||
1294 | return 30; | ||
1295 | } | ||
1296 | static inline u32 sim_event_put_pointer_f(u32 v) | ||
1297 | { | ||
1298 | return (v & 0x3fffffff) << 2; | ||
1299 | } | ||
1300 | static inline u32 sim_event_put_pointer_m(void) | ||
1301 | { | ||
1302 | return 0x3fffffff << 2; | ||
1303 | } | ||
1304 | static inline u32 sim_event_put_pointer_v(u32 r) | ||
1305 | { | ||
1306 | return (r >> 2) & 0x3fffffff; | ||
1307 | } | ||
1308 | static inline u32 sim_event_get_r(void) | ||
1309 | { | ||
1310 | return 0x0000003c; | ||
1311 | } | ||
1312 | static inline u32 sim_event_get_pointer_s(void) | ||
1313 | { | ||
1314 | return 30; | ||
1315 | } | ||
1316 | static inline u32 sim_event_get_pointer_f(u32 v) | ||
1317 | { | ||
1318 | return (v & 0x3fffffff) << 2; | ||
1319 | } | ||
1320 | static inline u32 sim_event_get_pointer_m(void) | ||
1321 | { | ||
1322 | return 0x3fffffff << 2; | ||
1323 | } | ||
1324 | static inline u32 sim_event_get_pointer_v(u32 r) | ||
1325 | { | ||
1326 | return (r >> 2) & 0x3fffffff; | ||
1327 | } | ||
1328 | static inline u32 sim_status_r(void) | ||
1329 | { | ||
1330 | return 0x00000028; | ||
1331 | } | ||
1332 | static inline u32 sim_status_send_put_s(void) | ||
1333 | { | ||
1334 | return 1; | ||
1335 | } | ||
1336 | static inline u32 sim_status_send_put_f(u32 v) | ||
1337 | { | ||
1338 | return (v & 0x1) << 0; | ||
1339 | } | ||
1340 | static inline u32 sim_status_send_put_m(void) | ||
1341 | { | ||
1342 | return 0x1 << 0; | ||
1343 | } | ||
1344 | static inline u32 sim_status_send_put_v(u32 r) | ||
1345 | { | ||
1346 | return (r >> 0) & 0x1; | ||
1347 | } | ||
1348 | static inline u32 sim_status_send_put__init_v(void) | ||
1349 | { | ||
1350 | return 0x00000000; | ||
1351 | } | ||
1352 | static inline u32 sim_status_send_put__init_f(void) | ||
1353 | { | ||
1354 | return 0x0; | ||
1355 | } | ||
1356 | static inline u32 sim_status_send_put_idle_v(void) | ||
1357 | { | ||
1358 | return 0x00000000; | ||
1359 | } | ||
1360 | static inline u32 sim_status_send_put_idle_f(void) | ||
1361 | { | ||
1362 | return 0x0; | ||
1363 | } | ||
1364 | static inline u32 sim_status_send_put_pending_v(void) | ||
1365 | { | ||
1366 | return 0x00000001; | ||
1367 | } | ||
1368 | static inline u32 sim_status_send_put_pending_f(void) | ||
1369 | { | ||
1370 | return 0x1; | ||
1371 | } | ||
1372 | static inline u32 sim_status_send_get_s(void) | ||
1373 | { | ||
1374 | return 1; | ||
1375 | } | ||
1376 | static inline u32 sim_status_send_get_f(u32 v) | ||
1377 | { | ||
1378 | return (v & 0x1) << 1; | ||
1379 | } | ||
1380 | static inline u32 sim_status_send_get_m(void) | ||
1381 | { | ||
1382 | return 0x1 << 1; | ||
1383 | } | ||
1384 | static inline u32 sim_status_send_get_v(u32 r) | ||
1385 | { | ||
1386 | return (r >> 1) & 0x1; | ||
1387 | } | ||
1388 | static inline u32 sim_status_send_get__init_v(void) | ||
1389 | { | ||
1390 | return 0x00000000; | ||
1391 | } | ||
1392 | static inline u32 sim_status_send_get__init_f(void) | ||
1393 | { | ||
1394 | return 0x0; | ||
1395 | } | ||
1396 | static inline u32 sim_status_send_get_idle_v(void) | ||
1397 | { | ||
1398 | return 0x00000000; | ||
1399 | } | ||
1400 | static inline u32 sim_status_send_get_idle_f(void) | ||
1401 | { | ||
1402 | return 0x0; | ||
1403 | } | ||
1404 | static inline u32 sim_status_send_get_pending_v(void) | ||
1405 | { | ||
1406 | return 0x00000001; | ||
1407 | } | ||
1408 | static inline u32 sim_status_send_get_pending_f(void) | ||
1409 | { | ||
1410 | return 0x2; | ||
1411 | } | ||
1412 | static inline u32 sim_status_send_get_clear_v(void) | ||
1413 | { | ||
1414 | return 0x00000001; | ||
1415 | } | ||
1416 | static inline u32 sim_status_send_get_clear_f(void) | ||
1417 | { | ||
1418 | return 0x2; | ||
1419 | } | ||
1420 | static inline u32 sim_status_recv_put_s(void) | ||
1421 | { | ||
1422 | return 1; | ||
1423 | } | ||
1424 | static inline u32 sim_status_recv_put_f(u32 v) | ||
1425 | { | ||
1426 | return (v & 0x1) << 2; | ||
1427 | } | ||
1428 | static inline u32 sim_status_recv_put_m(void) | ||
1429 | { | ||
1430 | return 0x1 << 2; | ||
1431 | } | ||
1432 | static inline u32 sim_status_recv_put_v(u32 r) | ||
1433 | { | ||
1434 | return (r >> 2) & 0x1; | ||
1435 | } | ||
1436 | static inline u32 sim_status_recv_put__init_v(void) | ||
1437 | { | ||
1438 | return 0x00000000; | ||
1439 | } | ||
1440 | static inline u32 sim_status_recv_put__init_f(void) | ||
1441 | { | ||
1442 | return 0x0; | ||
1443 | } | ||
1444 | static inline u32 sim_status_recv_put_idle_v(void) | ||
1445 | { | ||
1446 | return 0x00000000; | ||
1447 | } | ||
1448 | static inline u32 sim_status_recv_put_idle_f(void) | ||
1449 | { | ||
1450 | return 0x0; | ||
1451 | } | ||
1452 | static inline u32 sim_status_recv_put_pending_v(void) | ||
1453 | { | ||
1454 | return 0x00000001; | ||
1455 | } | ||
1456 | static inline u32 sim_status_recv_put_pending_f(void) | ||
1457 | { | ||
1458 | return 0x4; | ||
1459 | } | ||
1460 | static inline u32 sim_status_recv_put_clear_v(void) | ||
1461 | { | ||
1462 | return 0x00000001; | ||
1463 | } | ||
1464 | static inline u32 sim_status_recv_put_clear_f(void) | ||
1465 | { | ||
1466 | return 0x4; | ||
1467 | } | ||
1468 | static inline u32 sim_status_recv_get_s(void) | ||
1469 | { | ||
1470 | return 1; | ||
1471 | } | ||
1472 | static inline u32 sim_status_recv_get_f(u32 v) | ||
1473 | { | ||
1474 | return (v & 0x1) << 3; | ||
1475 | } | ||
1476 | static inline u32 sim_status_recv_get_m(void) | ||
1477 | { | ||
1478 | return 0x1 << 3; | ||
1479 | } | ||
1480 | static inline u32 sim_status_recv_get_v(u32 r) | ||
1481 | { | ||
1482 | return (r >> 3) & 0x1; | ||
1483 | } | ||
1484 | static inline u32 sim_status_recv_get__init_v(void) | ||
1485 | { | ||
1486 | return 0x00000000; | ||
1487 | } | ||
1488 | static inline u32 sim_status_recv_get__init_f(void) | ||
1489 | { | ||
1490 | return 0x0; | ||
1491 | } | ||
1492 | static inline u32 sim_status_recv_get_idle_v(void) | ||
1493 | { | ||
1494 | return 0x00000000; | ||
1495 | } | ||
1496 | static inline u32 sim_status_recv_get_idle_f(void) | ||
1497 | { | ||
1498 | return 0x0; | ||
1499 | } | ||
1500 | static inline u32 sim_status_recv_get_pending_v(void) | ||
1501 | { | ||
1502 | return 0x00000001; | ||
1503 | } | ||
1504 | static inline u32 sim_status_recv_get_pending_f(void) | ||
1505 | { | ||
1506 | return 0x8; | ||
1507 | } | ||
1508 | static inline u32 sim_status_event_put_s(void) | ||
1509 | { | ||
1510 | return 1; | ||
1511 | } | ||
1512 | static inline u32 sim_status_event_put_f(u32 v) | ||
1513 | { | ||
1514 | return (v & 0x1) << 4; | ||
1515 | } | ||
1516 | static inline u32 sim_status_event_put_m(void) | ||
1517 | { | ||
1518 | return 0x1 << 4; | ||
1519 | } | ||
1520 | static inline u32 sim_status_event_put_v(u32 r) | ||
1521 | { | ||
1522 | return (r >> 4) & 0x1; | ||
1523 | } | ||
1524 | static inline u32 sim_status_event_put__init_v(void) | ||
1525 | { | ||
1526 | return 0x00000000; | ||
1527 | } | ||
1528 | static inline u32 sim_status_event_put__init_f(void) | ||
1529 | { | ||
1530 | return 0x0; | ||
1531 | } | ||
1532 | static inline u32 sim_status_event_put_idle_v(void) | ||
1533 | { | ||
1534 | return 0x00000000; | ||
1535 | } | ||
1536 | static inline u32 sim_status_event_put_idle_f(void) | ||
1537 | { | ||
1538 | return 0x0; | ||
1539 | } | ||
1540 | static inline u32 sim_status_event_put_pending_v(void) | ||
1541 | { | ||
1542 | return 0x00000001; | ||
1543 | } | ||
1544 | static inline u32 sim_status_event_put_pending_f(void) | ||
1545 | { | ||
1546 | return 0x10; | ||
1547 | } | ||
1548 | static inline u32 sim_status_event_put_clear_v(void) | ||
1549 | { | ||
1550 | return 0x00000001; | ||
1551 | } | ||
1552 | static inline u32 sim_status_event_put_clear_f(void) | ||
1553 | { | ||
1554 | return 0x10; | ||
1555 | } | ||
1556 | static inline u32 sim_status_event_get_s(void) | ||
1557 | { | ||
1558 | return 1; | ||
1559 | } | ||
1560 | static inline u32 sim_status_event_get_f(u32 v) | ||
1561 | { | ||
1562 | return (v & 0x1) << 5; | ||
1563 | } | ||
1564 | static inline u32 sim_status_event_get_m(void) | ||
1565 | { | ||
1566 | return 0x1 << 5; | ||
1567 | } | ||
1568 | static inline u32 sim_status_event_get_v(u32 r) | ||
1569 | { | ||
1570 | return (r >> 5) & 0x1; | ||
1571 | } | ||
1572 | static inline u32 sim_status_event_get__init_v(void) | ||
1573 | { | ||
1574 | return 0x00000000; | ||
1575 | } | ||
1576 | static inline u32 sim_status_event_get__init_f(void) | ||
1577 | { | ||
1578 | return 0x0; | ||
1579 | } | ||
1580 | static inline u32 sim_status_event_get_idle_v(void) | ||
1581 | { | ||
1582 | return 0x00000000; | ||
1583 | } | ||
1584 | static inline u32 sim_status_event_get_idle_f(void) | ||
1585 | { | ||
1586 | return 0x0; | ||
1587 | } | ||
1588 | static inline u32 sim_status_event_get_pending_v(void) | ||
1589 | { | ||
1590 | return 0x00000001; | ||
1591 | } | ||
1592 | static inline u32 sim_status_event_get_pending_f(void) | ||
1593 | { | ||
1594 | return 0x20; | ||
1595 | } | ||
1596 | static inline u32 sim_control_r(void) | ||
1597 | { | ||
1598 | return 0x0000002c; | ||
1599 | } | ||
1600 | static inline u32 sim_control_send_put_s(void) | ||
1601 | { | ||
1602 | return 1; | ||
1603 | } | ||
1604 | static inline u32 sim_control_send_put_f(u32 v) | ||
1605 | { | ||
1606 | return (v & 0x1) << 0; | ||
1607 | } | ||
1608 | static inline u32 sim_control_send_put_m(void) | ||
1609 | { | ||
1610 | return 0x1 << 0; | ||
1611 | } | ||
1612 | static inline u32 sim_control_send_put_v(u32 r) | ||
1613 | { | ||
1614 | return (r >> 0) & 0x1; | ||
1615 | } | ||
1616 | static inline u32 sim_control_send_put__init_v(void) | ||
1617 | { | ||
1618 | return 0x00000000; | ||
1619 | } | ||
1620 | static inline u32 sim_control_send_put__init_f(void) | ||
1621 | { | ||
1622 | return 0x0; | ||
1623 | } | ||
1624 | static inline u32 sim_control_send_put_disabled_v(void) | ||
1625 | { | ||
1626 | return 0x00000000; | ||
1627 | } | ||
1628 | static inline u32 sim_control_send_put_disabled_f(void) | ||
1629 | { | ||
1630 | return 0x0; | ||
1631 | } | ||
1632 | static inline u32 sim_control_send_put_enabled_v(void) | ||
1633 | { | ||
1634 | return 0x00000001; | ||
1635 | } | ||
1636 | static inline u32 sim_control_send_put_enabled_f(void) | ||
1637 | { | ||
1638 | return 0x1; | ||
1639 | } | ||
1640 | static inline u32 sim_control_send_get_s(void) | ||
1641 | { | ||
1642 | return 1; | ||
1643 | } | ||
1644 | static inline u32 sim_control_send_get_f(u32 v) | ||
1645 | { | ||
1646 | return (v & 0x1) << 1; | ||
1647 | } | ||
1648 | static inline u32 sim_control_send_get_m(void) | ||
1649 | { | ||
1650 | return 0x1 << 1; | ||
1651 | } | ||
1652 | static inline u32 sim_control_send_get_v(u32 r) | ||
1653 | { | ||
1654 | return (r >> 1) & 0x1; | ||
1655 | } | ||
1656 | static inline u32 sim_control_send_get__init_v(void) | ||
1657 | { | ||
1658 | return 0x00000000; | ||
1659 | } | ||
1660 | static inline u32 sim_control_send_get__init_f(void) | ||
1661 | { | ||
1662 | return 0x0; | ||
1663 | } | ||
1664 | static inline u32 sim_control_send_get_disabled_v(void) | ||
1665 | { | ||
1666 | return 0x00000000; | ||
1667 | } | ||
1668 | static inline u32 sim_control_send_get_disabled_f(void) | ||
1669 | { | ||
1670 | return 0x0; | ||
1671 | } | ||
1672 | static inline u32 sim_control_send_get_enabled_v(void) | ||
1673 | { | ||
1674 | return 0x00000001; | ||
1675 | } | ||
1676 | static inline u32 sim_control_send_get_enabled_f(void) | ||
1677 | { | ||
1678 | return 0x2; | ||
1679 | } | ||
1680 | static inline u32 sim_control_recv_put_s(void) | ||
1681 | { | ||
1682 | return 1; | ||
1683 | } | ||
1684 | static inline u32 sim_control_recv_put_f(u32 v) | ||
1685 | { | ||
1686 | return (v & 0x1) << 2; | ||
1687 | } | ||
1688 | static inline u32 sim_control_recv_put_m(void) | ||
1689 | { | ||
1690 | return 0x1 << 2; | ||
1691 | } | ||
1692 | static inline u32 sim_control_recv_put_v(u32 r) | ||
1693 | { | ||
1694 | return (r >> 2) & 0x1; | ||
1695 | } | ||
1696 | static inline u32 sim_control_recv_put__init_v(void) | ||
1697 | { | ||
1698 | return 0x00000000; | ||
1699 | } | ||
1700 | static inline u32 sim_control_recv_put__init_f(void) | ||
1701 | { | ||
1702 | return 0x0; | ||
1703 | } | ||
1704 | static inline u32 sim_control_recv_put_disabled_v(void) | ||
1705 | { | ||
1706 | return 0x00000000; | ||
1707 | } | ||
1708 | static inline u32 sim_control_recv_put_disabled_f(void) | ||
1709 | { | ||
1710 | return 0x0; | ||
1711 | } | ||
1712 | static inline u32 sim_control_recv_put_enabled_v(void) | ||
1713 | { | ||
1714 | return 0x00000001; | ||
1715 | } | ||
1716 | static inline u32 sim_control_recv_put_enabled_f(void) | ||
1717 | { | ||
1718 | return 0x4; | ||
1719 | } | ||
1720 | static inline u32 sim_control_recv_get_s(void) | ||
1721 | { | ||
1722 | return 1; | ||
1723 | } | ||
1724 | static inline u32 sim_control_recv_get_f(u32 v) | ||
1725 | { | ||
1726 | return (v & 0x1) << 3; | ||
1727 | } | ||
1728 | static inline u32 sim_control_recv_get_m(void) | ||
1729 | { | ||
1730 | return 0x1 << 3; | ||
1731 | } | ||
1732 | static inline u32 sim_control_recv_get_v(u32 r) | ||
1733 | { | ||
1734 | return (r >> 3) & 0x1; | ||
1735 | } | ||
1736 | static inline u32 sim_control_recv_get__init_v(void) | ||
1737 | { | ||
1738 | return 0x00000000; | ||
1739 | } | ||
1740 | static inline u32 sim_control_recv_get__init_f(void) | ||
1741 | { | ||
1742 | return 0x0; | ||
1743 | } | ||
1744 | static inline u32 sim_control_recv_get_disabled_v(void) | ||
1745 | { | ||
1746 | return 0x00000000; | ||
1747 | } | ||
1748 | static inline u32 sim_control_recv_get_disabled_f(void) | ||
1749 | { | ||
1750 | return 0x0; | ||
1751 | } | ||
1752 | static inline u32 sim_control_recv_get_enabled_v(void) | ||
1753 | { | ||
1754 | return 0x00000001; | ||
1755 | } | ||
1756 | static inline u32 sim_control_recv_get_enabled_f(void) | ||
1757 | { | ||
1758 | return 0x8; | ||
1759 | } | ||
1760 | static inline u32 sim_control_event_put_s(void) | ||
1761 | { | ||
1762 | return 1; | ||
1763 | } | ||
1764 | static inline u32 sim_control_event_put_f(u32 v) | ||
1765 | { | ||
1766 | return (v & 0x1) << 4; | ||
1767 | } | ||
1768 | static inline u32 sim_control_event_put_m(void) | ||
1769 | { | ||
1770 | return 0x1 << 4; | ||
1771 | } | ||
1772 | static inline u32 sim_control_event_put_v(u32 r) | ||
1773 | { | ||
1774 | return (r >> 4) & 0x1; | ||
1775 | } | ||
1776 | static inline u32 sim_control_event_put__init_v(void) | ||
1777 | { | ||
1778 | return 0x00000000; | ||
1779 | } | ||
1780 | static inline u32 sim_control_event_put__init_f(void) | ||
1781 | { | ||
1782 | return 0x0; | ||
1783 | } | ||
1784 | static inline u32 sim_control_event_put_disabled_v(void) | ||
1785 | { | ||
1786 | return 0x00000000; | ||
1787 | } | ||
1788 | static inline u32 sim_control_event_put_disabled_f(void) | ||
1789 | { | ||
1790 | return 0x0; | ||
1791 | } | ||
1792 | static inline u32 sim_control_event_put_enabled_v(void) | ||
1793 | { | ||
1794 | return 0x00000001; | ||
1795 | } | ||
1796 | static inline u32 sim_control_event_put_enabled_f(void) | ||
1797 | { | ||
1798 | return 0x10; | ||
1799 | } | ||
1800 | static inline u32 sim_control_event_get_s(void) | ||
1801 | { | ||
1802 | return 1; | ||
1803 | } | ||
1804 | static inline u32 sim_control_event_get_f(u32 v) | ||
1805 | { | ||
1806 | return (v & 0x1) << 5; | ||
1807 | } | ||
1808 | static inline u32 sim_control_event_get_m(void) | ||
1809 | { | ||
1810 | return 0x1 << 5; | ||
1811 | } | ||
1812 | static inline u32 sim_control_event_get_v(u32 r) | ||
1813 | { | ||
1814 | return (r >> 5) & 0x1; | ||
1815 | } | ||
1816 | static inline u32 sim_control_event_get__init_v(void) | ||
1817 | { | ||
1818 | return 0x00000000; | ||
1819 | } | ||
1820 | static inline u32 sim_control_event_get__init_f(void) | ||
1821 | { | ||
1822 | return 0x0; | ||
1823 | } | ||
1824 | static inline u32 sim_control_event_get_disabled_v(void) | ||
1825 | { | ||
1826 | return 0x00000000; | ||
1827 | } | ||
1828 | static inline u32 sim_control_event_get_disabled_f(void) | ||
1829 | { | ||
1830 | return 0x0; | ||
1831 | } | ||
1832 | static inline u32 sim_control_event_get_enabled_v(void) | ||
1833 | { | ||
1834 | return 0x00000001; | ||
1835 | } | ||
1836 | static inline u32 sim_control_event_get_enabled_f(void) | ||
1837 | { | ||
1838 | return 0x20; | ||
1839 | } | ||
1840 | static inline u32 sim_dma_r(void) | ||
1841 | { | ||
1842 | return 0x00000000; | ||
1843 | } | ||
1844 | static inline u32 sim_dma_target_s(void) | ||
1845 | { | ||
1846 | return 2; | ||
1847 | } | ||
1848 | static inline u32 sim_dma_target_f(u32 v) | ||
1849 | { | ||
1850 | return (v & 0x3) << 0; | ||
1851 | } | ||
1852 | static inline u32 sim_dma_target_m(void) | ||
1853 | { | ||
1854 | return 0x3 << 0; | ||
1855 | } | ||
1856 | static inline u32 sim_dma_target_v(u32 r) | ||
1857 | { | ||
1858 | return (r >> 0) & 0x3; | ||
1859 | } | ||
1860 | static inline u32 sim_dma_target_phys_init_v(void) | ||
1861 | { | ||
1862 | return 0x00000001; | ||
1863 | } | ||
1864 | static inline u32 sim_dma_target_phys_init_f(void) | ||
1865 | { | ||
1866 | return 0x1; | ||
1867 | } | ||
1868 | static inline u32 sim_dma_target_phys__init_v(void) | ||
1869 | { | ||
1870 | return 0x00000001; | ||
1871 | } | ||
1872 | static inline u32 sim_dma_target_phys__init_f(void) | ||
1873 | { | ||
1874 | return 0x1; | ||
1875 | } | ||
1876 | static inline u32 sim_dma_target_phys__prod_v(void) | ||
1877 | { | ||
1878 | return 0x00000001; | ||
1879 | } | ||
1880 | static inline u32 sim_dma_target_phys__prod_f(void) | ||
1881 | { | ||
1882 | return 0x1; | ||
1883 | } | ||
1884 | static inline u32 sim_dma_target_phys_nvm_v(void) | ||
1885 | { | ||
1886 | return 0x00000001; | ||
1887 | } | ||
1888 | static inline u32 sim_dma_target_phys_nvm_f(void) | ||
1889 | { | ||
1890 | return 0x1; | ||
1891 | } | ||
1892 | static inline u32 sim_dma_target_phys_pci_v(void) | ||
1893 | { | ||
1894 | return 0x00000002; | ||
1895 | } | ||
1896 | static inline u32 sim_dma_target_phys_pci_f(void) | ||
1897 | { | ||
1898 | return 0x2; | ||
1899 | } | ||
1900 | static inline u32 sim_dma_target_phys_pci_coherent_v(void) | ||
1901 | { | ||
1902 | return 0x00000003; | ||
1903 | } | ||
1904 | static inline u32 sim_dma_target_phys_pci_coherent_f(void) | ||
1905 | { | ||
1906 | return 0x3; | ||
1907 | } | ||
1908 | static inline u32 sim_dma_status_s(void) | ||
1909 | { | ||
1910 | return 1; | ||
1911 | } | ||
1912 | static inline u32 sim_dma_status_f(u32 v) | ||
1913 | { | ||
1914 | return (v & 0x1) << 3; | ||
1915 | } | ||
1916 | static inline u32 sim_dma_status_m(void) | ||
1917 | { | ||
1918 | return 0x1 << 3; | ||
1919 | } | ||
1920 | static inline u32 sim_dma_status_v(u32 r) | ||
1921 | { | ||
1922 | return (r >> 3) & 0x1; | ||
1923 | } | ||
1924 | static inline u32 sim_dma_status_init_v(void) | ||
1925 | { | ||
1926 | return 0x00000000; | ||
1927 | } | ||
1928 | static inline u32 sim_dma_status_init_f(void) | ||
1929 | { | ||
1930 | return 0x0; | ||
1931 | } | ||
1932 | static inline u32 sim_dma_status__init_v(void) | ||
1933 | { | ||
1934 | return 0x00000000; | ||
1935 | } | ||
1936 | static inline u32 sim_dma_status__init_f(void) | ||
1937 | { | ||
1938 | return 0x0; | ||
1939 | } | ||
1940 | static inline u32 sim_dma_status__prod_v(void) | ||
1941 | { | ||
1942 | return 0x00000000; | ||
1943 | } | ||
1944 | static inline u32 sim_dma_status__prod_f(void) | ||
1945 | { | ||
1946 | return 0x0; | ||
1947 | } | ||
1948 | static inline u32 sim_dma_status_invalid_v(void) | ||
1949 | { | ||
1950 | return 0x00000000; | ||
1951 | } | ||
1952 | static inline u32 sim_dma_status_invalid_f(void) | ||
1953 | { | ||
1954 | return 0x0; | ||
1955 | } | ||
1956 | static inline u32 sim_dma_status_valid_v(void) | ||
1957 | { | ||
1958 | return 0x00000001; | ||
1959 | } | ||
1960 | static inline u32 sim_dma_status_valid_f(void) | ||
1961 | { | ||
1962 | return 0x8; | ||
1963 | } | ||
1964 | static inline u32 sim_dma_size_s(void) | ||
1965 | { | ||
1966 | return 2; | ||
1967 | } | ||
1968 | static inline u32 sim_dma_size_f(u32 v) | ||
1969 | { | ||
1970 | return (v & 0x3) << 4; | ||
1971 | } | ||
1972 | static inline u32 sim_dma_size_m(void) | ||
1973 | { | ||
1974 | return 0x3 << 4; | ||
1975 | } | ||
1976 | static inline u32 sim_dma_size_v(u32 r) | ||
1977 | { | ||
1978 | return (r >> 4) & 0x3; | ||
1979 | } | ||
1980 | static inline u32 sim_dma_size_init_v(void) | ||
1981 | { | ||
1982 | return 0x00000000; | ||
1983 | } | ||
1984 | static inline u32 sim_dma_size_init_f(void) | ||
1985 | { | ||
1986 | return 0x0; | ||
1987 | } | ||
1988 | static inline u32 sim_dma_size__init_v(void) | ||
1989 | { | ||
1990 | return 0x00000000; | ||
1991 | } | ||
1992 | static inline u32 sim_dma_size__init_f(void) | ||
1993 | { | ||
1994 | return 0x0; | ||
1995 | } | ||
1996 | static inline u32 sim_dma_size__prod_v(void) | ||
1997 | { | ||
1998 | return 0x00000000; | ||
1999 | } | ||
2000 | static inline u32 sim_dma_size__prod_f(void) | ||
2001 | { | ||
2002 | return 0x0; | ||
2003 | } | ||
2004 | static inline u32 sim_dma_size_4kb_v(void) | ||
2005 | { | ||
2006 | return 0x00000000; | ||
2007 | } | ||
2008 | static inline u32 sim_dma_size_4kb_f(void) | ||
2009 | { | ||
2010 | return 0x0; | ||
2011 | } | ||
2012 | static inline u32 sim_dma_size_8kb_v(void) | ||
2013 | { | ||
2014 | return 0x00000001; | ||
2015 | } | ||
2016 | static inline u32 sim_dma_size_8kb_f(void) | ||
2017 | { | ||
2018 | return 0x10; | ||
2019 | } | ||
2020 | static inline u32 sim_dma_size_12kb_v(void) | ||
2021 | { | ||
2022 | return 0x00000002; | ||
2023 | } | ||
2024 | static inline u32 sim_dma_size_12kb_f(void) | ||
2025 | { | ||
2026 | return 0x20; | ||
2027 | } | ||
2028 | static inline u32 sim_dma_size_16kb_v(void) | ||
2029 | { | ||
2030 | return 0x00000003; | ||
2031 | } | ||
2032 | static inline u32 sim_dma_size_16kb_f(void) | ||
2033 | { | ||
2034 | return 0x30; | ||
2035 | } | ||
2036 | static inline u32 sim_dma_addr_lo_s(void) | ||
2037 | { | ||
2038 | return 20; | ||
2039 | } | ||
2040 | static inline u32 sim_dma_addr_lo_f(u32 v) | ||
2041 | { | ||
2042 | return (v & 0xfffff) << 12; | ||
2043 | } | ||
2044 | static inline u32 sim_dma_addr_lo_m(void) | ||
2045 | { | ||
2046 | return 0xfffff << 12; | ||
2047 | } | ||
2048 | static inline u32 sim_dma_addr_lo_v(u32 r) | ||
2049 | { | ||
2050 | return (r >> 12) & 0xfffff; | ||
2051 | } | ||
2052 | static inline u32 sim_dma_addr_lo__init_v(void) | ||
2053 | { | ||
2054 | return 0x00000000; | ||
2055 | } | ||
2056 | static inline u32 sim_dma_addr_lo__init_f(void) | ||
2057 | { | ||
2058 | return 0x0; | ||
2059 | } | ||
2060 | static inline u32 sim_dma_addr_lo__prod_v(void) | ||
2061 | { | ||
2062 | return 0x00000000; | ||
2063 | } | ||
2064 | static inline u32 sim_dma_addr_lo__prod_f(void) | ||
2065 | { | ||
2066 | return 0x0; | ||
2067 | } | ||
2068 | static inline u32 sim_dma_hi_r(void) | ||
2069 | { | ||
2070 | return 0x00000004; | ||
2071 | } | ||
2072 | static inline u32 sim_dma_hi_addr_s(void) | ||
2073 | { | ||
2074 | return 20; | ||
2075 | } | ||
2076 | static inline u32 sim_dma_hi_addr_f(u32 v) | ||
2077 | { | ||
2078 | return (v & 0xfffff) << 0; | ||
2079 | } | ||
2080 | static inline u32 sim_dma_hi_addr_m(void) | ||
2081 | { | ||
2082 | return 0xfffff << 0; | ||
2083 | } | ||
2084 | static inline u32 sim_dma_hi_addr_v(u32 r) | ||
2085 | { | ||
2086 | return (r >> 0) & 0xfffff; | ||
2087 | } | ||
2088 | static inline u32 sim_dma_hi_addr__init_v(void) | ||
2089 | { | ||
2090 | return 0x00000000; | ||
2091 | } | ||
2092 | static inline u32 sim_dma_hi_addr__init_f(void) | ||
2093 | { | ||
2094 | return 0x0; | ||
2095 | } | ||
2096 | static inline u32 sim_dma_hi_addr__prod_v(void) | ||
2097 | { | ||
2098 | return 0x00000000; | ||
2099 | } | ||
2100 | static inline u32 sim_dma_hi_addr__prod_f(void) | ||
2101 | { | ||
2102 | return 0x0; | ||
2103 | } | ||
2104 | static inline u32 sim_msg_signature_r(void) | ||
2105 | { | ||
2106 | return 0x00000000; | ||
2107 | } | ||
2108 | static inline u32 sim_msg_signature_valid_v(void) | ||
2109 | { | ||
2110 | return 0x43505256; | ||
2111 | } | ||
2112 | static inline u32 sim_msg_length_r(void) | ||
2113 | { | ||
2114 | return 0x00000004; | ||
2115 | } | ||
2116 | static inline u32 sim_msg_function_r(void) | ||
2117 | { | ||
2118 | return 0x00000008; | ||
2119 | } | ||
2120 | static inline u32 sim_msg_function_sim_escape_read_v(void) | ||
2121 | { | ||
2122 | return 0x00000023; | ||
2123 | } | ||
2124 | static inline u32 sim_msg_function_sim_escape_write_v(void) | ||
2125 | { | ||
2126 | return 0x00000024; | ||
2127 | } | ||
2128 | static inline u32 sim_msg_result_r(void) | ||
2129 | { | ||
2130 | return 0x0000000c; | ||
2131 | } | ||
2132 | static inline u32 sim_msg_result_success_v(void) | ||
2133 | { | ||
2134 | return 0x00000000; | ||
2135 | } | ||
2136 | static inline u32 sim_msg_result_rpc_pending_v(void) | ||
2137 | { | ||
2138 | return 0xFFFFFFFF; | ||
2139 | } | ||
2140 | static inline u32 sim_msg_sequence_r(void) | ||
2141 | { | ||
2142 | return 0x00000010; | ||
2143 | } | ||
2144 | static inline u32 sim_msg_spare_r(void) | ||
2145 | { | ||
2146 | return 0x00000014; | ||
2147 | } | ||
2148 | static inline u32 sim_msg_spare__init_v(void) | ||
2149 | { | ||
2150 | return 0x00000000; | ||
2151 | } | ||
2152 | |||
2153 | #endif /* __hw_sim__ */ | ||