-
Notifications
You must be signed in to change notification settings - Fork 8
/
revere.h
3715 lines (3339 loc) · 114 KB
/
revere.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SPDX-License-Identifier: BSD-3-Clause
/*
* Revere-AMU commands definitions.
* THIS IS A GENERATED FILE!
*
* Generated Wed Jun 12 18:51:24 2019 by vinste01,
* from commit ab10f91ca8c2b4fdf5bcc76b581e30a5a096812e.
*
* Notes: we need __packed and u64.
*/
#ifndef _REVERE_H_INCLUDED
#define _REVERE_H_INCLUDED
/**********************************************************************
* Commands and responses
**********************************************************************/
enum rvr_opcode {
RVR_PF_PROBE = 1,
RVR_F_PROBE = 2,
RVR_PF_F_ENABLE = 3,
RVR_PF_F_DISABLE = 4,
/* No opcode 5 */
RVR_PF_AMI_SW_MAP = 6,
RVR_PF_AMI_SW_UNMAP = 7,
RVR_PF_AMI_SW_CONFIGURE = 8,
RVR_PF_AMI_SW_SAVE = 9,
RVR_PF_AMI_SW_RESET = 10,
RVR_F_AMI_SW_CONFIGURE = 11,
RVR_F_AMI_SW_SAVE = 12,
RVR_F_AMI_SW_RESET = 13,
RVR_F_AMI_SW_ENABLE = 14,
RVR_F_AMI_SW_DISABLE = 15,
RVR_PF_ASN_CREATE = 16,
RVR_PF_ASN_DESTROY = 17,
RVR_PF_AMS_RING_CONFIGURE = 18,
RVR_PF_AMS_RING_SAVE = 19,
RVR_F_AMS_RING_CONFIGURE = 20,
RVR_F_AMS_RING_SAVE = 21,
/* No opcode 22 */
RVR_PF_AMI_HW_MAP = 23,
RVR_PF_AMI_HW_UNMAP = 24,
RVR_PF_AMI_HW_CONFIGURE = 25,
RVR_PF_AMI_HW_SAVE = 26,
RVR_PF_AMI_HW_RESET = 27,
/* No opcode 28 */
RVR_F_PROF_TABLE_FLUSH = 29,
RVR_F_AMI_HW_CONFIGURE = 30,
RVR_F_AMI_HW_SAVE = 31,
RVR_F_AMI_HW_RESET = 32,
RVR_F_AMI_HW_ENABLE = 33,
RVR_F_AMI_HW_DISABLE = 34,
RVR_F_AMS_PROF_CONFIGURE = 35,
RVR_F_AMS_TRACE_CONFIGURE = 36,
RVR_PF_PROBE_AHA = 37,
RVR_PF_F_TRAP_CONFIGURE = 38,
RVR_PF_F_TRAP_RESP = 39,
RVR_F_GET_AMI_MAP = 40,
};
/**********************************************************************
* F-AMI-HW-CONFIGURE (opcode 30)
**********************************************************************/
/*
* F-AMI-HW-CONFIGURE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_HW_ID (16b)
* AMI-HW within the Function to be configured
* @0x8 [19:0] ([83:64]) PASID (20b)
* PASID value
* @0x8 [20:20] ([84:84]) PASID_ENABLED (1b)
* 1: Enable PASID
* 0: Disable PASID
*/
#define RVR_F_AMI_HW_CONFIGURE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_CONFIGURE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_CONFIGURE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_CONFIGURE_CMD_AMI_HW_ID_OFFSET 4
#define RVR_F_AMI_HW_CONFIGURE_CMD_AMI_HW_ID_SHIFT 0
#define RVR_F_AMI_HW_CONFIGURE_CMD_AMI_HW_ID_MASK 0xffff
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_OFFSET 8
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_SHIFT 0
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_MASK 0xfffff
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_ENABLED_OFFSET 8
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_ENABLED_SHIFT 20
#define RVR_F_AMI_HW_CONFIGURE_CMD_PASID_ENABLED_MASK 0x1
struct rvr_f_ami_hw_configure_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_hw_id:16;
u64 _reserved_2:16;
u64 pasid:20;
u64 pasid_enabled:1;
u64 _reserved_3:11;
} __packed;
/*
* F-AMI-HW-CONFIGURE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-HW configured successfully
* 1: AMI-HW is not mapped in Function
* 2: AMI-HW is not disabled
*/
#define RVR_F_AMI_HW_CONFIGURE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_CONFIGURE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_CONFIGURE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_AMI_HW_CONFIGURED_SUCCESSFULLY 0
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_AMI_HW_IS_NOT_MAPPED_IN_FUNCTION 1
#define RVR_F_AMI_HW_CONFIGURE_RESP_STATUS_AMI_HW_IS_NOT_DISABLED 2
struct rvr_f_ami_hw_configure_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-HW-DISABLE (opcode 34)
**********************************************************************/
/*
* F-AMI-HW-DISABLE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_HW_ID (16b)
* AMI-HW within the Function to be disabled
*/
#define RVR_F_AMI_HW_DISABLE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_DISABLE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_DISABLE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_DISABLE_CMD_AMI_HW_ID_OFFSET 4
#define RVR_F_AMI_HW_DISABLE_CMD_AMI_HW_ID_SHIFT 0
#define RVR_F_AMI_HW_DISABLE_CMD_AMI_HW_ID_MASK 0xffff
struct rvr_f_ami_hw_disable_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_hw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-HW-DISABLE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-HW disabled successfully
* 1: AMI-HW is not mapped in Function
*/
#define RVR_F_AMI_HW_DISABLE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_DISABLE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_DISABLE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_DISABLE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_HW_DISABLE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_HW_DISABLE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_HW_DISABLE_RESP_STATUS_AMI_HW_DISABLED_SUCCESSFULLY 0
#define RVR_F_AMI_HW_DISABLE_RESP_STATUS_AMI_HW_IS_NOT_MAPPED_IN_FUNCTION 1
struct rvr_f_ami_hw_disable_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-HW-ENABLE (opcode 33)
**********************************************************************/
/*
* F-AMI-HW-ENABLE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_HW_ID (16b)
* AMI-HW within the Function to be enabled
*/
#define RVR_F_AMI_HW_ENABLE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_ENABLE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_ENABLE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_ENABLE_CMD_AMI_HW_ID_OFFSET 4
#define RVR_F_AMI_HW_ENABLE_CMD_AMI_HW_ID_SHIFT 0
#define RVR_F_AMI_HW_ENABLE_CMD_AMI_HW_ID_MASK 0xffff
struct rvr_f_ami_hw_enable_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_hw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-HW-ENABLE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-HW enabled successfully
* 1: AMI-HW is not mapped in Function
*/
#define RVR_F_AMI_HW_ENABLE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_ENABLE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_ENABLE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_ENABLE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_HW_ENABLE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_HW_ENABLE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_HW_ENABLE_RESP_STATUS_AMI_HW_ENABLED_SUCCESSFULLY 0
#define RVR_F_AMI_HW_ENABLE_RESP_STATUS_AMI_HW_IS_NOT_MAPPED_IN_FUNCTION 1
struct rvr_f_ami_hw_enable_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-HW-RESET (opcode 32)
**********************************************************************/
/*
* F-AMI-HW-RESET command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_HW_ID (16b)
* AMI-HW within the Function to be reset
*/
#define RVR_F_AMI_HW_RESET_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_RESET_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_RESET_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_RESET_CMD_AMI_HW_ID_OFFSET 4
#define RVR_F_AMI_HW_RESET_CMD_AMI_HW_ID_SHIFT 0
#define RVR_F_AMI_HW_RESET_CMD_AMI_HW_ID_MASK 0xffff
struct rvr_f_ami_hw_reset_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_hw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-HW-RESET response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-HW reset successfully
* 1: Invalid AMI_HW_ID
*/
#define RVR_F_AMI_HW_RESET_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_RESET_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_RESET_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_RESET_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_HW_RESET_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_HW_RESET_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_HW_RESET_RESP_STATUS_AMI_HW_RESET_SUCCESSFULLY 0
#define RVR_F_AMI_HW_RESET_RESP_STATUS_INVALID_AMI_HW_ID 1
struct rvr_f_ami_hw_reset_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-HW-SAVE (opcode 31)
**********************************************************************/
/*
* F-AMI-HW-SAVE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_HW_ID (16b)
* AMI-HW within the Function to be saved
*/
#define RVR_F_AMI_HW_SAVE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_SAVE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_SAVE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_SAVE_CMD_AMI_HW_ID_OFFSET 4
#define RVR_F_AMI_HW_SAVE_CMD_AMI_HW_ID_SHIFT 0
#define RVR_F_AMI_HW_SAVE_CMD_AMI_HW_ID_MASK 0xffff
struct rvr_f_ami_hw_save_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_hw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-HW-SAVE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-HW saved successfully
* 1: Invalid AMI_HW_ID
* @0x4 [19:0] ([51:32]) PASID (20b)
* PASID value
* @0x4 [20:20] ([52:52]) PASID_ENABLED (1b)
* 1: PASID is enabled
* 0: PASID is disabled
*/
#define RVR_F_AMI_HW_SAVE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_HW_SAVE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_HW_SAVE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_HW_SAVE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_HW_SAVE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_HW_SAVE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_HW_SAVE_RESP_STATUS_AMI_HW_SAVED_SUCCESSFULLY 0
#define RVR_F_AMI_HW_SAVE_RESP_STATUS_INVALID_AMI_HW_ID 1
#define RVR_F_AMI_HW_SAVE_RESP_PASID_OFFSET 4
#define RVR_F_AMI_HW_SAVE_RESP_PASID_SHIFT 0
#define RVR_F_AMI_HW_SAVE_RESP_PASID_MASK 0xfffff
#define RVR_F_AMI_HW_SAVE_RESP_PASID_ENABLED_OFFSET 4
#define RVR_F_AMI_HW_SAVE_RESP_PASID_ENABLED_SHIFT 20
#define RVR_F_AMI_HW_SAVE_RESP_PASID_ENABLED_MASK 0x1
struct rvr_f_ami_hw_save_resp {
u64 opcode:16;
u64 status:16;
u64 pasid:20;
u64 pasid_enabled:1;
u64 _reserved_:11;
} __packed;
/**********************************************************************
* F-AMI-SW-CONFIGURE (opcode 11)
**********************************************************************/
/*
* F-AMI-SW-CONFIGURE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI-SW within the Function to be configured
* @0x8 [19:0] ([83:64]) PASID (20b)
* PASID value
* @0x8 [20:20] ([84:84]) PASID_ENABLED (1b)
* 1: Enable PASID
* 0: Disable PASID
* @0xc [10:0] ([106:96]) TX_VECTOR (11b)
* Value to use for TX_VECTOR
* @0xc [31:31] ([127:127]) TX_IRQ_ENABLE (1b)
* 1: Enable TX Interrupt Generation
* 0: Disable TX Interrupt Generation
* @0x10 [10:0] ([138:128]) RX_VECTOR (11b)
* Value to use for RX_VECTOR
* @0x10 [31:31] ([159:159]) RX_IRQ_ENABLE (1b)
* 1: Enable RX Interrupt Generation
* 0: Disable RX Interrupt Generation
* @0x18 [63:12] ([255:204]) TYPEB_TBL_BASE (52b)
* Bits [63:12] of the address of TYPEB_AMI_SW table
*/
#define RVR_F_AMI_SW_CONFIGURE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_CONFIGURE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMI_SW_CONFIGURE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_AMI_SW_ID_MASK 0xffff
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_OFFSET 8
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_MASK 0xfffff
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_ENABLED_OFFSET 8
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_ENABLED_SHIFT 20
#define RVR_F_AMI_SW_CONFIGURE_CMD_PASID_ENABLED_MASK 0x1
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_VECTOR_OFFSET 12
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_VECTOR_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_VECTOR_MASK 0x7ff
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_IRQ_ENABLE_OFFSET 12
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_IRQ_ENABLE_SHIFT 31
#define RVR_F_AMI_SW_CONFIGURE_CMD_TX_IRQ_ENABLE_MASK 0x1
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_VECTOR_OFFSET 16
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_VECTOR_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_VECTOR_MASK 0x7ff
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_IRQ_ENABLE_OFFSET 16
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_IRQ_ENABLE_SHIFT 31
#define RVR_F_AMI_SW_CONFIGURE_CMD_RX_IRQ_ENABLE_MASK 0x1
#define RVR_F_AMI_SW_CONFIGURE_CMD_TYPEB_TBL_BASE_OFFSET 24
#define RVR_F_AMI_SW_CONFIGURE_CMD_TYPEB_TBL_BASE_SHIFT 12
#define RVR_F_AMI_SW_CONFIGURE_CMD_TYPEB_TBL_BASE_MASK 0xfffffffffffff
struct rvr_f_ami_sw_configure_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
u64 pasid:20;
u64 pasid_enabled:1;
u64 _reserved_3:11;
u64 tx_vector:11;
u64 _reserved_4:20;
u64 tx_irq_enable:1;
u64 rx_vector:11;
u64 _reserved_5:20;
u64 rx_irq_enable:1;
u64 _reserved_6:32;
u64 _reserved_7:12;
u64 typeb_tbl_base:52;
} __packed;
/*
* F-AMI-SW-CONFIGURE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-SW configured successfully
* 1: AMI_SW_ID is not mapped in Function
* 2: AMI-SW is not disabled
*/
#define RVR_F_AMI_SW_CONFIGURE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_CONFIGURE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_CONFIGURE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_AMI_SW_CONFIGURED_SUCCESSFULLY 0
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_AMI_SW_ID_IS_NOT_MAPPED_IN_FUNCTION 1
#define RVR_F_AMI_SW_CONFIGURE_RESP_STATUS_AMI_SW_IS_NOT_DISABLED 2
struct rvr_f_ami_sw_configure_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-SW-DISABLE (opcode 15)
**********************************************************************/
/*
* F-AMI-SW-DISABLE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI-SW within the Function to be enabled
*/
#define RVR_F_AMI_SW_DISABLE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_DISABLE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_DISABLE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_DISABLE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMI_SW_DISABLE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMI_SW_DISABLE_CMD_AMI_SW_ID_MASK 0xffff
struct rvr_f_ami_sw_disable_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-SW-DISABLE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-SW disabled successfully
* 1: AMI-SW is not mapped in Function
*/
#define RVR_F_AMI_SW_DISABLE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_DISABLE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_DISABLE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_DISABLE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_SW_DISABLE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_SW_DISABLE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_SW_DISABLE_RESP_STATUS_AMI_SW_DISABLED_SUCCESSFULLY 0
#define RVR_F_AMI_SW_DISABLE_RESP_STATUS_AMI_SW_IS_NOT_MAPPED_IN_FUNCTION 1
struct rvr_f_ami_sw_disable_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-SW-ENABLE (opcode 14)
**********************************************************************/
/*
* F-AMI-SW-ENABLE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI-SW within the Function to be enabled
*/
#define RVR_F_AMI_SW_ENABLE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_ENABLE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_ENABLE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_ENABLE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMI_SW_ENABLE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMI_SW_ENABLE_CMD_AMI_SW_ID_MASK 0xffff
struct rvr_f_ami_sw_enable_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-SW-ENABLE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-SW enabled successfully
* 1: AMI-SW is not mapped in Function
*/
#define RVR_F_AMI_SW_ENABLE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_ENABLE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_ENABLE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_ENABLE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_SW_ENABLE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_SW_ENABLE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_SW_ENABLE_RESP_STATUS_AMI_SW_ENABLED_SUCCESSFULLY 0
#define RVR_F_AMI_SW_ENABLE_RESP_STATUS_AMI_SW_IS_NOT_MAPPED_IN_FUNCTION 1
struct rvr_f_ami_sw_enable_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-SW-RESET (opcode 13)
**********************************************************************/
/*
* F-AMI-SW-RESET command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI-SW within the Function to be reset
*/
#define RVR_F_AMI_SW_RESET_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_RESET_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_RESET_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_RESET_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMI_SW_RESET_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMI_SW_RESET_CMD_AMI_SW_ID_MASK 0xffff
struct rvr_f_ami_sw_reset_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-SW-RESET response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-SW reset successfully
* 1: Invalid AMI_SW_ID
*/
#define RVR_F_AMI_SW_RESET_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_RESET_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_RESET_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_RESET_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_SW_RESET_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_SW_RESET_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_SW_RESET_RESP_STATUS_AMI_SW_RESET_SUCCESSFULLY 0
#define RVR_F_AMI_SW_RESET_RESP_STATUS_INVALID_AMI_SW_ID 1
struct rvr_f_ami_sw_reset_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMI-SW-SAVE (opcode 12)
**********************************************************************/
/*
* F-AMI-SW-SAVE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI-SW within the Function to be saved
*/
#define RVR_F_AMI_SW_SAVE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_SAVE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_SAVE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_SAVE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMI_SW_SAVE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMI_SW_SAVE_CMD_AMI_SW_ID_MASK 0xffff
struct rvr_f_ami_sw_save_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
} __packed;
/*
* F-AMI-SW-SAVE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMI-SW saved successfully
* 1: invalid AMI_SW_ID
* @0x4 [19:0] ([51:32]) PASID (20b)
* PASID value
* @0x4 [20:20] ([52:52]) PASID_ENABLED (1b)
* 1: PASID is enabled
* 0: PASID is disabled
* @0x8 [10:0] ([74:64]) TX_VECTOR (11b)
* TX_VECTOR value
* @0x8 [31:31] ([95:95]) TX_IRQ_ENABLE (1b)
* 1: Enable TX Interrupt Generation
* 0: Disable TX Interrupt Generation
* @0xc [10:0] ([106:96]) RX_VECTOR (11b)
* RX_VECTOR value
* @0xc [31:31] ([127:127]) RX_IRQ_ENABLE (1b)
* 1: Enable RX Interrupt Generation
* 0: Disable RX Interrupt Generation
* @0x10 [63:12] ([191:140]) TYPEB_TBL_BASE (52b)
* Bits [63:12] of the address of TYPEB_AMI_SW table
*/
#define RVR_F_AMI_SW_SAVE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMI_SW_SAVE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMI_SW_SAVE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMI_SW_SAVE_RESP_STATUS_OFFSET 0
#define RVR_F_AMI_SW_SAVE_RESP_STATUS_SHIFT 16
#define RVR_F_AMI_SW_SAVE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMI_SW_SAVE_RESP_STATUS_AMI_SW_SAVED_SUCCESSFULLY 0
#define RVR_F_AMI_SW_SAVE_RESP_STATUS_INVALID_AMI_SW_ID 1
#define RVR_F_AMI_SW_SAVE_RESP_PASID_OFFSET 4
#define RVR_F_AMI_SW_SAVE_RESP_PASID_SHIFT 0
#define RVR_F_AMI_SW_SAVE_RESP_PASID_MASK 0xfffff
#define RVR_F_AMI_SW_SAVE_RESP_PASID_ENABLED_OFFSET 4
#define RVR_F_AMI_SW_SAVE_RESP_PASID_ENABLED_SHIFT 20
#define RVR_F_AMI_SW_SAVE_RESP_PASID_ENABLED_MASK 0x1
#define RVR_F_AMI_SW_SAVE_RESP_TX_VECTOR_OFFSET 8
#define RVR_F_AMI_SW_SAVE_RESP_TX_VECTOR_SHIFT 0
#define RVR_F_AMI_SW_SAVE_RESP_TX_VECTOR_MASK 0x7ff
#define RVR_F_AMI_SW_SAVE_RESP_TX_IRQ_ENABLE_OFFSET 8
#define RVR_F_AMI_SW_SAVE_RESP_TX_IRQ_ENABLE_SHIFT 31
#define RVR_F_AMI_SW_SAVE_RESP_TX_IRQ_ENABLE_MASK 0x1
#define RVR_F_AMI_SW_SAVE_RESP_RX_VECTOR_OFFSET 12
#define RVR_F_AMI_SW_SAVE_RESP_RX_VECTOR_SHIFT 0
#define RVR_F_AMI_SW_SAVE_RESP_RX_VECTOR_MASK 0x7ff
#define RVR_F_AMI_SW_SAVE_RESP_RX_IRQ_ENABLE_OFFSET 12
#define RVR_F_AMI_SW_SAVE_RESP_RX_IRQ_ENABLE_SHIFT 31
#define RVR_F_AMI_SW_SAVE_RESP_RX_IRQ_ENABLE_MASK 0x1
#define RVR_F_AMI_SW_SAVE_RESP_TYPEB_TBL_BASE_OFFSET 16
#define RVR_F_AMI_SW_SAVE_RESP_TYPEB_TBL_BASE_SHIFT 12
#define RVR_F_AMI_SW_SAVE_RESP_TYPEB_TBL_BASE_MASK 0xfffffffffffff
struct rvr_f_ami_sw_save_resp {
u64 opcode:16;
u64 status:16;
u64 pasid:20;
u64 pasid_enabled:1;
u64 _reserved_:11;
u64 tx_vector:11;
u64 _reserved_2:20;
u64 tx_irq_enable:1;
u64 rx_vector:11;
u64 _reserved_3:20;
u64 rx_irq_enable:1;
u64 _reserved_4:12;
u64 typeb_tbl_base:52;
} __packed;
/**********************************************************************
* F-AMS-PROF-CONFIGURE (opcode 35)
**********************************************************************/
/*
* F-AMS-PROF-CONFIGURE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_ID (16b)
* AMI within F_OWNER to be configured
* @0x4 [16:16] ([48:48]) AMI_TYPE (1b)
* 0: AMI-SW
* 1: AMI-HW
* @0x4 [22:17] ([54:49]) AMS_ID (6b)
* AMS within AMI to be configured
* @0x4 [23:23] ([55:55]) AMS_TYPE (1b)
* 0: RX AMS
* 1: TX AMS
* @0x8 [63:0] ([127:64]) PROF_MASK (64b)
* Profiling mask
* @0x10 [63:3] ([191:131]) PROF_TBL_BASE (61b)
* Bits[63:3] of the 64-bit Profiling table base pointer
* PROF_TBL_BASE_PTR
* @0x18 [15:0] ([207:192]) PROF_CTL (16b)
* Profiling controls configured in the associated ASN
*/
#define RVR_F_AMS_PROF_CONFIGURE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMS_PROF_CONFIGURE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMS_PROF_CONFIGURE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_ID_OFFSET 4
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_ID_SHIFT 0
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_ID_MASK 0xffff
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_TYPE_OFFSET 4
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_TYPE_SHIFT 16
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMI_TYPE_MASK 0x1
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_ID_OFFSET 4
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_ID_SHIFT 17
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_ID_MASK 0x3f
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_TYPE_OFFSET 4
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_TYPE_SHIFT 23
#define RVR_F_AMS_PROF_CONFIGURE_CMD_AMS_TYPE_MASK 0x1
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_MASK_OFFSET 8
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_MASK_SHIFT 0
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_MASK_MASK 0xffffffffffffffff
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_TBL_BASE_OFFSET 16
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_TBL_BASE_SHIFT 3
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_TBL_BASE_MASK 0x1fffffffffffffff
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_CTL_OFFSET 24
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_CTL_SHIFT 0
#define RVR_F_AMS_PROF_CONFIGURE_CMD_PROF_CTL_MASK 0xffff
struct rvr_f_ams_prof_configure_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_id:16;
u64 ami_type:1;
u64 ams_id:6;
u64 ams_type:1;
u64 _reserved_2:8;
u64 prof_mask:64;
u64 _reserved_3:3;
u64 prof_tbl_base:61;
u64 prof_ctl:16;
u64 _reserved_4:16;
} __packed;
/*
* F-AMS-PROF-CONFIGURE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: Profiling configured successfully
* 1: Invalid AMI_ID
* 2: Invalid AMS_ID
* 3: Function is not the monitoring owner
*/
#define RVR_F_AMS_PROF_CONFIGURE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMS_PROF_CONFIGURE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMS_PROF_CONFIGURE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_OFFSET 0
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_SHIFT 16
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_PROFILING_CONFIGURED_SUCCESSFULLY 0
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_INVALID_AMI_ID 1
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_INVALID_AMS_ID 2
#define RVR_F_AMS_PROF_CONFIGURE_RESP_STATUS_FUNCTION_IS_NOT_THE_MONITORING_OWNER 3
struct rvr_f_ams_prof_configure_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMS-RING-CONFIGURE (opcode 20)
**********************************************************************/
/*
* F-AMS-RING-CONFIGURE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI_SW within the Function to be configured
* @0x8 [5:0] ([69:64]) AMS_ID (6b)
* AMS within AMI_SW to be configured
* @0x8 [6:6] ([70:70]) AMS_TYPE (1b)
* 0: RX AMS
* 1: TX AMS
* @0xc [0:0] ([96:96]) RX_MODE (1b)
* 0: Back-pressure
* 1: Overwriting
* @0xc [5:1] ([101:97]) LOG2_SIZE (5b)
* Size of the ring in slots as log~2~(SIZE)
* @0xc [9:6] ([105:102]) THRESHOLD (4b)
* Controls the change of TX_DIGEST or RX_DIGEST bits
* @0x10 [63:3] ([191:131]) RING_BASE (61b)
* Bits [63:3] of the 64-bit virtual address of the slot array
* (RING_BASE_PTR)
*/
#define RVR_F_AMS_RING_CONFIGURE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMS_RING_CONFIGURE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMS_RING_CONFIGURE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMI_SW_ID_MASK 0xffff
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_ID_OFFSET 8
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_ID_SHIFT 0
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_ID_MASK 0x3f
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_TYPE_OFFSET 8
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_TYPE_SHIFT 6
#define RVR_F_AMS_RING_CONFIGURE_CMD_AMS_TYPE_MASK 0x1
#define RVR_F_AMS_RING_CONFIGURE_CMD_RX_MODE_OFFSET 12
#define RVR_F_AMS_RING_CONFIGURE_CMD_RX_MODE_SHIFT 0
#define RVR_F_AMS_RING_CONFIGURE_CMD_RX_MODE_MASK 0x1
#define RVR_F_AMS_RING_CONFIGURE_CMD_LOG2_SIZE_OFFSET 12
#define RVR_F_AMS_RING_CONFIGURE_CMD_LOG2_SIZE_SHIFT 1
#define RVR_F_AMS_RING_CONFIGURE_CMD_LOG2_SIZE_MASK 0x1f
#define RVR_F_AMS_RING_CONFIGURE_CMD_THRESHOLD_OFFSET 12
#define RVR_F_AMS_RING_CONFIGURE_CMD_THRESHOLD_SHIFT 6
#define RVR_F_AMS_RING_CONFIGURE_CMD_THRESHOLD_MASK 0xf
#define RVR_F_AMS_RING_CONFIGURE_CMD_RING_BASE_OFFSET 16
#define RVR_F_AMS_RING_CONFIGURE_CMD_RING_BASE_SHIFT 3
#define RVR_F_AMS_RING_CONFIGURE_CMD_RING_BASE_MASK 0x1fffffffffffffff
struct rvr_f_ams_ring_configure_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 _reserved_2:16;
u64 ams_id:6;
u64 ams_type:1;
u64 _reserved_3:25;
u64 rx_mode:1;
u64 log2_size:5;
u64 threshold:4;
u64 _reserved_4:22;
u64 _reserved_5:3;
u64 ring_base:61;
} __packed;
/*
* F-AMS-RING-CONFIGURE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMS ring configured successfully
* 1: AMI-SW is not mapped in Function
* 2: LOG2_SIZE out of range
* 3: AMI-SW is not disabled
*/
#define RVR_F_AMS_RING_CONFIGURE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMS_RING_CONFIGURE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMS_RING_CONFIGURE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_OFFSET 0
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_SHIFT 16
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_AMS_RING_CONFIGURED_SUCCESSFULLY 0
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_AMI_SW_IS_NOT_MAPPED_IN_FUNCTION 1
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_LOG2_SIZE_OUT_OF_RANGE 2
#define RVR_F_AMS_RING_CONFIGURE_RESP_STATUS_AMI_SW_IS_NOT_DISABLED 3
struct rvr_f_ams_ring_configure_resp {
u64 opcode:16;
u64 status:16;
} __packed;
/**********************************************************************
* F-AMS-RING-SAVE (opcode 21)
**********************************************************************/
/*
* F-AMS-RING-SAVE command
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x4 [15:0] ([47:32]) AMI_SW_ID (16b)
* AMI_SW within the Function to be saved
* @0x4 [21:16] ([53:48]) AMS_ID (6b)
* AMS within AMI_SW to be saved
* @0x4 [22:22] ([54:54]) AMS_TYPE (1b)
* 0: RX AMS
* 1: TX AMS
*/
#define RVR_F_AMS_RING_SAVE_CMD_OPCODE_OFFSET 0
#define RVR_F_AMS_RING_SAVE_CMD_OPCODE_SHIFT 0
#define RVR_F_AMS_RING_SAVE_CMD_OPCODE_MASK 0xffff
#define RVR_F_AMS_RING_SAVE_CMD_AMI_SW_ID_OFFSET 4
#define RVR_F_AMS_RING_SAVE_CMD_AMI_SW_ID_SHIFT 0
#define RVR_F_AMS_RING_SAVE_CMD_AMI_SW_ID_MASK 0xffff
#define RVR_F_AMS_RING_SAVE_CMD_AMS_ID_OFFSET 4
#define RVR_F_AMS_RING_SAVE_CMD_AMS_ID_SHIFT 16
#define RVR_F_AMS_RING_SAVE_CMD_AMS_ID_MASK 0x3f
#define RVR_F_AMS_RING_SAVE_CMD_AMS_TYPE_OFFSET 4
#define RVR_F_AMS_RING_SAVE_CMD_AMS_TYPE_SHIFT 22
#define RVR_F_AMS_RING_SAVE_CMD_AMS_TYPE_MASK 0x1
struct rvr_f_ams_ring_save_cmd {
u64 opcode:16;
u64 _reserved_:16;
u64 ami_sw_id:16;
u64 ams_id:6;
u64 ams_type:1;
u64 _reserved_2:9;
} __packed;
/*
* F-AMS-RING-SAVE response
*
* @0x0 [15:0] OPCODE (16b)
* Command Opcode
* @0x0 [31:16] Status (16b)
* Status Code
* 0: AMS ring saved successfully
* 1: Invalid AMI_SW_ID
* 2: Invalid AMS_ID
* @0x4 [1:1] ([33:33]) RX_MODE (1b)
* 0: Back-pressure
* 1: Overwriting
* @0x4 [6:2] ([38:34]) LOG2_SIZE (5b)
* Size of the ring in slots as log~2~(SIZE)
* @0x4 [10:7] ([42:39]) THRESHOLD (4b)
* Controls the change of TX_DIGEST or RX_DIGEST bits
* @0x8 [63:3] ([127:67]) RING_BASE (61b)
* Bits [63:3] of the 64-bit virtual address of the slot array
* (RING_BASE_PTR)
*/
#define RVR_F_AMS_RING_SAVE_RESP_OPCODE_OFFSET 0
#define RVR_F_AMS_RING_SAVE_RESP_OPCODE_SHIFT 0
#define RVR_F_AMS_RING_SAVE_RESP_OPCODE_MASK 0xffff
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_OFFSET 0
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_SHIFT 16
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_MASK 0xffff
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_AMS_RING_SAVED_SUCCESSFULLY 0
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_INVALID_AMI_SW_ID 1
#define RVR_F_AMS_RING_SAVE_RESP_STATUS_INVALID_AMS_ID 2
#define RVR_F_AMS_RING_SAVE_RESP_RX_MODE_OFFSET 4
#define RVR_F_AMS_RING_SAVE_RESP_RX_MODE_SHIFT 1
#define RVR_F_AMS_RING_SAVE_RESP_RX_MODE_MASK 0x1
#define RVR_F_AMS_RING_SAVE_RESP_LOG2_SIZE_OFFSET 4
#define RVR_F_AMS_RING_SAVE_RESP_LOG2_SIZE_SHIFT 2
#define RVR_F_AMS_RING_SAVE_RESP_LOG2_SIZE_MASK 0x1f
#define RVR_F_AMS_RING_SAVE_RESP_THRESHOLD_OFFSET 4
#define RVR_F_AMS_RING_SAVE_RESP_THRESHOLD_SHIFT 7
#define RVR_F_AMS_RING_SAVE_RESP_THRESHOLD_MASK 0xf
#define RVR_F_AMS_RING_SAVE_RESP_RING_BASE_OFFSET 8
#define RVR_F_AMS_RING_SAVE_RESP_RING_BASE_SHIFT 3
#define RVR_F_AMS_RING_SAVE_RESP_RING_BASE_MASK 0x1fffffffffffffff
struct rvr_f_ams_ring_save_resp {
u64 opcode:16;
u64 status:16;
u64 _reserved_:1;
u64 rx_mode:1;
u64 log2_size:5;
u64 threshold:4;
u64 _reserved_2:21;
u64 _reserved_3:3;