1 /* SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020 Marvell International Ltd.
5 * https://spdx.org/licenses
13 * Configuration and status register (CSR) address and type definitions for
16 * This file is auto generated. Do not edit.
21 * Enumeration npa_af_int_vec_e
23 * NPA Admin Function Interrupt Vector Enumeration Enumerates the NPA AF
24 * MSI-X interrupt vectors.
26 #define NPA_AF_INT_VEC_E_AF_ERR (3)
27 #define NPA_AF_INT_VEC_E_AQ_DONE (2)
28 #define NPA_AF_INT_VEC_E_GEN (1)
29 #define NPA_AF_INT_VEC_E_POISON (4)
30 #define NPA_AF_INT_VEC_E_RVU (0)
33 * Enumeration npa_aq_comp_e
35 * NPA Admin Queue Completion Enumeration Enumerates the values of
36 * NPA_AQ_RES_S[COMPCODE].
38 #define NPA_AQ_COMP_E_CTX_FAULT (4)
39 #define NPA_AQ_COMP_E_CTX_POISON (3)
40 #define NPA_AQ_COMP_E_GOOD (1)
41 #define NPA_AQ_COMP_E_LOCKERR (5)
42 #define NPA_AQ_COMP_E_NOTDONE (0)
43 #define NPA_AQ_COMP_E_SWERR (2)
46 * Enumeration npa_aq_ctype_e
48 * NPA Admin Queue Context Type Enumeration Enumerates
49 * NPA_AQ_INST_S[CTYPE] values.
51 #define NPA_AQ_CTYPE_E_AURA (0)
52 #define NPA_AQ_CTYPE_E_POOL (1)
55 * Enumeration npa_aq_instop_e
57 * NPA Admin Queue Opcode Enumeration Enumerates NPA_AQ_INST_S[OP]
60 #define NPA_AQ_INSTOP_E_INIT (1)
61 #define NPA_AQ_INSTOP_E_LOCK (4)
62 #define NPA_AQ_INSTOP_E_NOP (0)
63 #define NPA_AQ_INSTOP_E_READ (3)
64 #define NPA_AQ_INSTOP_E_UNLOCK (5)
65 #define NPA_AQ_INSTOP_E_WRITE (2)
68 * Enumeration npa_aura_err_int_e
70 * NPA Aura Error Interrupt Enumeration Enumerates the bit index of
71 * NPA_AURA_S[ERR_INT], and NPA_AURA_S[ERR_INT_ENA].
73 #define NPA_AURA_ERR_INT_E_AURA_ADD_OVER (1)
74 #define NPA_AURA_ERR_INT_E_AURA_ADD_UNDER (2)
75 #define NPA_AURA_ERR_INT_E_AURA_FREE_UNDER (0)
76 #define NPA_AURA_ERR_INT_E_POOL_DIS (3)
77 #define NPA_AURA_ERR_INT_E_RX(a) (0 + (a))
80 * Enumeration npa_bpintf_e
82 * NPA Backpressure Interface Enumeration Enumerates index of
85 #define NPA_BPINTF_E_NIXX_RX(a) (0 + (a))
88 * Enumeration npa_inpq_e
90 * NPA Input Queue Enumeration Enumerates ALLOC/FREE input queues from
93 #define NPA_INPQ_E_AURA_OP (0xe)
94 #define NPA_INPQ_E_BPHY (7)
95 #define NPA_INPQ_E_DPI (6)
96 #define NPA_INPQ_E_INTERNAL_RSV (0xf)
97 #define NPA_INPQ_E_NIXX_RX(a) (0 + 2 * (a))
98 #define NPA_INPQ_E_NIXX_TX(a) (1 + 2 * (a))
99 #define NPA_INPQ_E_RX(a) (0 + (a))
100 #define NPA_INPQ_E_SSO (4)
101 #define NPA_INPQ_E_TIM (5)
104 * Enumeration npa_lf_int_vec_e
106 * NPA Local Function Interrupt Vector Enumeration Enumerates the NPA
107 * MSI-X interrupt vectors per LF.
109 #define NPA_LF_INT_VEC_E_ERR_INT (0x40)
110 #define NPA_LF_INT_VEC_E_POISON (0x41)
111 #define NPA_LF_INT_VEC_E_QINTX(a) (0 + (a))
114 * Enumeration npa_ndc0_port_e
116 * NPA NDC0 Port Enumeration Enumerates NPA NDC0 (NDC_IDX_E::NPA_U(0))
117 * ports and the PORT index of NDC_AF_PORT()_RT()_RW()_REQ_PC and
118 * NDC_AF_PORT()_RT()_RW()_LAT_PC.
120 #define NPA_NDC0_PORT_E_AURA0 (0)
121 #define NPA_NDC0_PORT_E_AURA1 (1)
122 #define NPA_NDC0_PORT_E_POOL0 (2)
123 #define NPA_NDC0_PORT_E_POOL1 (3)
124 #define NPA_NDC0_PORT_E_STACK0 (4)
125 #define NPA_NDC0_PORT_E_STACK1 (5)
128 * Enumeration npa_pool_err_int_e
130 * NPA Pool Error Interrupt Enumeration Enumerates the bit index of
131 * NPA_POOL_S[ERR_INT] and NPA_POOL_S[ERR_INT_ENA].
133 #define NPA_POOL_ERR_INT_E_OVFLS (0)
134 #define NPA_POOL_ERR_INT_E_PERR (2)
135 #define NPA_POOL_ERR_INT_E_RX(a) (0 + (a))
136 #define NPA_POOL_ERR_INT_E_RANGE (1)
139 * Structure npa_aq_inst_s
141 * NPA Admin Queue Instruction Structure This structure specifies the AQ
142 * instruction. Instructions and associated software structures are
143 * stored in memory as little-endian unless NPA_AF_GEN_CFG[AF_BE] is set.
144 * Hardware reads of NPA_AQ_INST_S do not allocate into LLC. Hardware
145 * reads and writes of the context structure selected by [CTYPE], [LF]
146 * and [CINDEX] use the NDC and LLC caching style configured for that
147 * context, i.e.: * NPA_AURA_HW_S reads and writes use
148 * NPA_AF_LF()_AURAS_CFG[CACHING] and NPA_AF_LF()_AURAS_CFG[WAY_MASK]. *
149 * NPA_POOL_HW_S reads and writes use NPA_AURA_HW_S[POOL_CACHING] and
150 * NPA_AURA_HW_S[POOL_WAY_MASK].
152 union npa_aq_inst_s {
154 struct npa_aq_inst_s_s {
158 u64 reserved_17_23 : 7;
160 u64 reserved_44_62 : 19;
164 /* struct npa_aq_inst_s_s cn; */
168 * Structure npa_aq_res_s
170 * NPA Admin Queue Result Structure NPA writes this structure after it
171 * completes the NPA_AQ_INST_S instruction. The result structure is
172 * exactly 16 bytes, and each instruction completion produces exactly one
173 * result structure. Results and associated software structures are
174 * stored in memory as little-endian unless NPA_AF_GEN_CFG[AF_BE] is set.
175 * When [OP] = NPA_AQ_INSTOP_E::INIT, WRITE or READ, this structure is
176 * immediately followed by context read or write data. See
177 * NPA_AQ_INSTOP_E. Hardware writes of NPA_AQ_RES_S and context data
178 * always allocate into LLC. Hardware reads of context data do not
183 struct npa_aq_res_s_s {
188 u64 reserved_17_63 : 47;
189 u64 reserved_64_127 : 64;
191 /* struct npa_aq_res_s_s cn; */
195 * Structure npa_aura_op_wdata_s
197 * NPA Aura Operation Write Data Structure This structure specifies the
198 * write data format of a 64-bit atomic load-and-add to
199 * NPA_LF_AURA_OP_ALLOC() and NPA_LF_POOL_OP_PC, and a 128-bit atomic
200 * CASP operation to NPA_LF_AURA_OP_ALLOC().
202 union npa_aura_op_wdata_s {
204 struct npa_aura_op_wdata_s_s {
206 u64 reserved_20_62 : 43;
209 /* struct npa_aura_op_wdata_s_s cn; */
213 * Structure npa_aura_s
215 * NPA Aura Context Structure This structure specifies the format used by
216 * software with the NPA admin queue to read and write an aura's
217 * NPA_AURA_HW_S structure maintained by hardware in LLC/DRAM.
221 struct npa_aura_s_s {
224 u64 reserved_65_66 : 2;
225 u64 pool_caching : 1;
226 u64 pool_way_mask : 16;
229 u64 pool_drop_ena : 1;
230 u64 aura_drop_ena : 1;
232 u64 reserved_98_103 : 6;
235 u64 reserved_118_119 : 2;
238 u64 reserved_164_167 : 4;
240 u64 reserved_177_179 : 3;
242 u64 reserved_189_191 : 3;
244 u64 reserved_228_231 : 4;
246 u64 reserved_240_243 : 4;
248 u64 fc_up_crossing : 1;
250 u64 fc_hyst_bits : 4;
251 u64 reserved_252_255 : 4;
254 u64 update_time : 16;
258 u64 thresh_int_ena : 1;
260 u64 reserved_363 : 1;
261 u64 thresh_qint_idx : 7;
262 u64 reserved_371 : 1;
263 u64 err_qint_idx : 7;
264 u64 reserved_379_383 : 5;
266 u64 reserved_420_447 : 28;
267 u64 reserved_448_511 : 64;
269 /* struct npa_aura_s_s cn; */
273 * Structure npa_pool_s
275 * NPA Pool Context Structure This structure specifies the format used by
276 * software with the NPA admin queue to read and write a pool's
277 * NPA_POOL_HW_S structure maintained by hardware in LLC/DRAM.
281 struct npa_pool_s_s {
285 u64 reserved_66_67 : 2;
286 u64 stack_caching : 1;
287 u64 reserved_69_71 : 3;
288 u64 stack_way_mask : 16;
290 u64 reserved_100_103 : 4;
292 u64 reserved_115_127 : 13;
293 u64 stack_max_pages : 32;
294 u64 stack_pages : 32;
296 u64 reserved_240_255 : 16;
297 u64 stack_offset : 4;
298 u64 reserved_260_263 : 4;
300 u64 reserved_270_271 : 2;
305 u64 fc_hyst_bits : 4;
306 u64 fc_up_crossing : 1;
307 u64 reserved_297_299 : 3;
308 u64 update_time : 16;
309 u64 reserved_316_319 : 4;
313 u64 reserved_512_535 : 24;
317 u64 thresh_int_ena : 1;
319 u64 reserved_555 : 1;
320 u64 thresh_qint_idx : 7;
321 u64 reserved_563 : 1;
322 u64 err_qint_idx : 7;
323 u64 reserved_571_575 : 5;
325 u64 reserved_612_639 : 28;
326 u64 reserved_640_703 : 64;
327 u64 reserved_704_767 : 64;
328 u64 reserved_768_831 : 64;
329 u64 reserved_832_895 : 64;
330 u64 reserved_896_959 : 64;
331 u64 reserved_960_1023 : 64;
333 /* struct npa_pool_s_s cn; */
337 * Structure npa_qint_hw_s
339 * NPA Queue Interrupt Context Hardware Structure This structure contains
340 * context state maintained by hardware for each queue interrupt (QINT)
341 * in NDC/LLC/DRAM. Software accesses this structure with the
342 * NPA_LF_QINT()_* registers. Hardware maintains a table of
343 * NPA_AF_CONST[QINTS] contiguous NPA_QINT_HW_S structures per LF
344 * starting at IOVA NPA_AF_LF()_QINTS_BASE. Always stored in byte
345 * invariant little-endian format (LE8).
347 union npa_qint_hw_s {
349 struct npa_qint_hw_s_s {
351 u32 reserved_22_30 : 9;
354 /* struct npa_qint_hw_s_s cn; */
358 * Register (RVU_PF_BAR0) npa_af_active_cycles_pc
360 * NPA AF Active Cycles Register
362 union npa_af_active_cycles_pc {
364 struct npa_af_active_cycles_pc_s {
367 /* struct npa_af_active_cycles_pc_s cn; */
370 static inline u64 NPA_AF_ACTIVE_CYCLES_PC(void)
371 __attribute__ ((pure, always_inline));
372 static inline u64 NPA_AF_ACTIVE_CYCLES_PC(void)
378 * Register (RVU_PF_BAR0) npa_af_aq_base
380 * NPA AF Admin Queue Base Address Register
382 union npa_af_aq_base {
384 struct npa_af_aq_base_s {
385 u64 reserved_0_6 : 7;
387 u64 reserved_53_63 : 11;
389 /* struct npa_af_aq_base_s cn; */
392 static inline u64 NPA_AF_AQ_BASE(void)
393 __attribute__ ((pure, always_inline));
394 static inline u64 NPA_AF_AQ_BASE(void)
400 * Register (RVU_PF_BAR0) npa_af_aq_cfg
402 * NPA AF Admin Queue Configuration Register
404 union npa_af_aq_cfg {
406 struct npa_af_aq_cfg_s {
408 u64 reserved_4_63 : 60;
410 /* struct npa_af_aq_cfg_s cn; */
413 static inline u64 NPA_AF_AQ_CFG(void)
414 __attribute__ ((pure, always_inline));
415 static inline u64 NPA_AF_AQ_CFG(void)
421 * Register (RVU_PF_BAR0) npa_af_aq_done
423 * NPA AF AQ Done Count Register
425 union npa_af_aq_done {
427 struct npa_af_aq_done_s {
429 u64 reserved_20_63 : 44;
431 /* struct npa_af_aq_done_s cn; */
434 static inline u64 NPA_AF_AQ_DONE(void)
435 __attribute__ ((pure, always_inline));
436 static inline u64 NPA_AF_AQ_DONE(void)
442 * Register (RVU_PF_BAR0) npa_af_aq_done_ack
444 * NPA AF AQ Done Count Ack Register This register is written by software
445 * to acknowledge interrupts.
447 union npa_af_aq_done_ack {
449 struct npa_af_aq_done_ack_s {
451 u64 reserved_20_63 : 44;
453 /* struct npa_af_aq_done_ack_s cn; */
456 static inline u64 NPA_AF_AQ_DONE_ACK(void)
457 __attribute__ ((pure, always_inline));
458 static inline u64 NPA_AF_AQ_DONE_ACK(void)
464 * Register (RVU_PF_BAR0) npa_af_aq_done_ena_w1c
466 * NPA AF AQ Done Interrupt Enable Clear Register This register clears
467 * interrupt enable bits.
469 union npa_af_aq_done_ena_w1c {
471 struct npa_af_aq_done_ena_w1c_s {
473 u64 reserved_1_63 : 63;
475 /* struct npa_af_aq_done_ena_w1c_s cn; */
478 static inline u64 NPA_AF_AQ_DONE_ENA_W1C(void)
479 __attribute__ ((pure, always_inline));
480 static inline u64 NPA_AF_AQ_DONE_ENA_W1C(void)
486 * Register (RVU_PF_BAR0) npa_af_aq_done_ena_w1s
488 * NPA AF AQ Done Interrupt Enable Set Register This register sets
489 * interrupt enable bits.
491 union npa_af_aq_done_ena_w1s {
493 struct npa_af_aq_done_ena_w1s_s {
495 u64 reserved_1_63 : 63;
497 /* struct npa_af_aq_done_ena_w1s_s cn; */
500 static inline u64 NPA_AF_AQ_DONE_ENA_W1S(void)
501 __attribute__ ((pure, always_inline));
502 static inline u64 NPA_AF_AQ_DONE_ENA_W1S(void)
508 * Register (RVU_PF_BAR0) npa_af_aq_done_int
510 * NPA AF AQ Done Interrupt Register
512 union npa_af_aq_done_int {
514 struct npa_af_aq_done_int_s {
516 u64 reserved_1_63 : 63;
518 /* struct npa_af_aq_done_int_s cn; */
521 static inline u64 NPA_AF_AQ_DONE_INT(void)
522 __attribute__ ((pure, always_inline));
523 static inline u64 NPA_AF_AQ_DONE_INT(void)
529 * Register (RVU_PF_BAR0) npa_af_aq_done_int_w1s
531 * INTERNAL: NPA AF AQ Done Interrupt Set Register
533 union npa_af_aq_done_int_w1s {
535 struct npa_af_aq_done_int_w1s_s {
537 u64 reserved_1_63 : 63;
539 /* struct npa_af_aq_done_int_w1s_s cn; */
542 static inline u64 NPA_AF_AQ_DONE_INT_W1S(void)
543 __attribute__ ((pure, always_inline));
544 static inline u64 NPA_AF_AQ_DONE_INT_W1S(void)
550 * Register (RVU_PF_BAR0) npa_af_aq_done_timer
552 * NPA AF Admin Queue Done Interrupt Timer Register Used to debug the
553 * queue interrupt coalescing timer.
555 union npa_af_aq_done_timer {
557 struct npa_af_aq_done_timer_s {
559 u64 reserved_16_63 : 48;
561 /* struct npa_af_aq_done_timer_s cn; */
564 static inline u64 NPA_AF_AQ_DONE_TIMER(void)
565 __attribute__ ((pure, always_inline));
566 static inline u64 NPA_AF_AQ_DONE_TIMER(void)
572 * Register (RVU_PF_BAR0) npa_af_aq_done_wait
574 * NPA AF AQ Done Interrupt Coalescing Wait Register Specifies the queue
575 * interrupt coalescing settings.
577 union npa_af_aq_done_wait {
579 struct npa_af_aq_done_wait_s {
581 u64 reserved_20_31 : 12;
583 u64 reserved_48_63 : 16;
585 /* struct npa_af_aq_done_wait_s cn; */
588 static inline u64 NPA_AF_AQ_DONE_WAIT(void)
589 __attribute__ ((pure, always_inline));
590 static inline u64 NPA_AF_AQ_DONE_WAIT(void)
596 * Register (RVU_PF_BAR0) npa_af_aq_door
598 * NPA AF Admin Queue Doorbell Register Software writes to this register
599 * to enqueue one or more entries to AQ.
601 union npa_af_aq_door {
603 struct npa_af_aq_door_s {
605 u64 reserved_16_63 : 48;
607 /* struct npa_af_aq_door_s cn; */
610 static inline u64 NPA_AF_AQ_DOOR(void)
611 __attribute__ ((pure, always_inline));
612 static inline u64 NPA_AF_AQ_DOOR(void)
618 * Register (RVU_PF_BAR0) npa_af_aq_status
620 * NPA AF Admin Queue Status Register
622 union npa_af_aq_status {
624 struct npa_af_aq_status_s {
625 u64 reserved_0_3 : 4;
627 u64 reserved_24_35 : 12;
629 u64 reserved_56_61 : 6;
633 struct npa_af_aq_status_cn {
634 u64 reserved_0_3 : 4;
636 u64 reserved_24_31 : 8;
637 u64 reserved_32_35 : 4;
639 u64 reserved_56_61 : 6;
645 static inline u64 NPA_AF_AQ_STATUS(void)
646 __attribute__ ((pure, always_inline));
647 static inline u64 NPA_AF_AQ_STATUS(void)
653 * Register (RVU_PF_BAR0) npa_af_avg_delay
655 * NPA AF Queue Average Delay Register
657 union npa_af_avg_delay {
659 struct npa_af_avg_delay_s {
661 u64 reserved_19_23 : 5;
663 u64 reserved_40_62 : 23;
664 u64 avg_timer_dis : 1;
666 /* struct npa_af_avg_delay_s cn; */
669 static inline u64 NPA_AF_AVG_DELAY(void)
670 __attribute__ ((pure, always_inline));
671 static inline u64 NPA_AF_AVG_DELAY(void)
677 * Register (RVU_PF_BAR0) npa_af_bar2_alias#
679 * INTERNAL: NPA Admin Function BAR2 Alias Registers These registers
680 * alias to the NPA BAR2 registers for the PF and function selected by
681 * NPA_AF_BAR2_SEL[PF_FUNC]. Internal: Not implemented. Placeholder for
684 union npa_af_bar2_aliasx {
686 struct npa_af_bar2_aliasx_s {
689 /* struct npa_af_bar2_aliasx_s cn; */
692 static inline u64 NPA_AF_BAR2_ALIASX(u64 a)
693 __attribute__ ((pure, always_inline));
694 static inline u64 NPA_AF_BAR2_ALIASX(u64 a)
696 return 0x9100000 + 8 * a;
700 * Register (RVU_PF_BAR0) npa_af_bar2_sel
702 * INTERNAL: NPA Admin Function BAR2 Select Register This register
703 * configures BAR2 accesses from the NPA_AF_BAR2_ALIAS() registers in
704 * BAR0. Internal: Not implemented. Placeholder for bug33464.
706 union npa_af_bar2_sel {
708 struct npa_af_bar2_sel_s {
709 u64 alias_pf_func : 16;
711 u64 reserved_17_63 : 47;
713 /* struct npa_af_bar2_sel_s cn; */
716 static inline u64 NPA_AF_BAR2_SEL(void)
717 __attribute__ ((pure, always_inline));
718 static inline u64 NPA_AF_BAR2_SEL(void)
724 * Register (RVU_PF_BAR0) npa_af_blk_rst
726 * NPA AF Block Reset Register
728 union npa_af_blk_rst {
730 struct npa_af_blk_rst_s {
732 u64 reserved_1_62 : 62;
735 /* struct npa_af_blk_rst_s cn; */
738 static inline u64 NPA_AF_BLK_RST(void)
739 __attribute__ ((pure, always_inline));
740 static inline u64 NPA_AF_BLK_RST(void)
746 * Register (RVU_PF_BAR0) npa_af_bp_test
748 * INTERNAL: NPA AF Backpressure Test Register
750 union npa_af_bp_test {
752 struct npa_af_bp_test_s {
754 u64 reserved_12_15 : 4;
758 /* struct npa_af_bp_test_s cn; */
761 static inline u64 NPA_AF_BP_TEST(void)
762 __attribute__ ((pure, always_inline));
763 static inline u64 NPA_AF_BP_TEST(void)
769 * Register (RVU_PF_BAR0) npa_af_const
771 * NPA AF Constants Register This register contains constants for
772 * software discovery.
776 struct npa_af_const_s {
777 u64 stack_page_bytes : 8;
778 u64 stack_page_ptrs : 8;
782 u64 reserved_43_63 : 21;
784 /* struct npa_af_const_s cn; */
787 static inline u64 NPA_AF_CONST(void)
788 __attribute__ ((pure, always_inline));
789 static inline u64 NPA_AF_CONST(void)
795 * Register (RVU_PF_BAR0) npa_af_const1
797 * NPA AF Constants Register 1 This register contains constants for
798 * software discovery.
800 union npa_af_const1 {
802 struct npa_af_const1_s {
803 u64 aura_log2bytes : 4;
804 u64 pool_log2bytes : 4;
805 u64 qint_log2bytes : 4;
806 u64 reserved_12_63 : 52;
808 /* struct npa_af_const1_s cn; */
811 static inline u64 NPA_AF_CONST1(void)
812 __attribute__ ((pure, always_inline));
813 static inline u64 NPA_AF_CONST1(void)
819 * Register (RVU_PF_BAR0) npa_af_dtx_filter_ctl
821 * NPA AF DTX LF Filter Control Register
823 union npa_af_dtx_filter_ctl {
825 struct npa_af_dtx_filter_ctl_s {
827 u64 reserved_1_3 : 3;
829 u64 reserved_11_63 : 53;
831 /* struct npa_af_dtx_filter_ctl_s cn; */
834 static inline u64 NPA_AF_DTX_FILTER_CTL(void)
835 __attribute__ ((pure, always_inline));
836 static inline u64 NPA_AF_DTX_FILTER_CTL(void)
842 * Register (RVU_PF_BAR0) npa_af_eco
844 * INTERNAL: NPA AF ECO Register
848 struct npa_af_eco_s {
850 u64 reserved_32_63 : 32;
852 /* struct npa_af_eco_s cn; */
855 static inline u64 NPA_AF_ECO(void)
856 __attribute__ ((pure, always_inline));
857 static inline u64 NPA_AF_ECO(void)
863 * Register (RVU_PF_BAR0) npa_af_err_int
865 * NPA Admin Function Error Interrupt Register
867 union npa_af_err_int {
869 struct npa_af_err_int_s {
870 u64 reserved_0_11 : 12;
872 u64 aq_res_fault : 1;
873 u64 aq_inst_fault : 1;
874 u64 reserved_15_63 : 49;
876 /* struct npa_af_err_int_s cn; */
879 static inline u64 NPA_AF_ERR_INT(void)
880 __attribute__ ((pure, always_inline));
881 static inline u64 NPA_AF_ERR_INT(void)
887 * Register (RVU_PF_BAR0) npa_af_err_int_ena_w1c
889 * NPA Admin Function Error Interrupt Enable Clear Register This register
890 * clears interrupt enable bits.
892 union npa_af_err_int_ena_w1c {
894 struct npa_af_err_int_ena_w1c_s {
895 u64 reserved_0_11 : 12;
897 u64 aq_res_fault : 1;
898 u64 aq_inst_fault : 1;
899 u64 reserved_15_63 : 49;
901 /* struct npa_af_err_int_ena_w1c_s cn; */
904 static inline u64 NPA_AF_ERR_INT_ENA_W1C(void)
905 __attribute__ ((pure, always_inline));
906 static inline u64 NPA_AF_ERR_INT_ENA_W1C(void)
912 * Register (RVU_PF_BAR0) npa_af_err_int_ena_w1s
914 * NPA Admin Function Error Interrupt Enable Set Register This register
915 * sets interrupt enable bits.
917 union npa_af_err_int_ena_w1s {
919 struct npa_af_err_int_ena_w1s_s {
920 u64 reserved_0_11 : 12;
922 u64 aq_res_fault : 1;
923 u64 aq_inst_fault : 1;
924 u64 reserved_15_63 : 49;
926 /* struct npa_af_err_int_ena_w1s_s cn; */
929 static inline u64 NPA_AF_ERR_INT_ENA_W1S(void)
930 __attribute__ ((pure, always_inline));
931 static inline u64 NPA_AF_ERR_INT_ENA_W1S(void)
937 * Register (RVU_PF_BAR0) npa_af_err_int_w1s
939 * NPA Admin Function Error Interrupt Set Register This register sets
942 union npa_af_err_int_w1s {
944 struct npa_af_err_int_w1s_s {
945 u64 reserved_0_11 : 12;
947 u64 aq_res_fault : 1;
948 u64 aq_inst_fault : 1;
949 u64 reserved_15_63 : 49;
951 /* struct npa_af_err_int_w1s_s cn; */
954 static inline u64 NPA_AF_ERR_INT_W1S(void)
955 __attribute__ ((pure, always_inline));
956 static inline u64 NPA_AF_ERR_INT_W1S(void)
962 * Register (RVU_PF_BAR0) npa_af_gen_cfg
964 * NPA AF General Configuration Register This register provides NPA
965 * control and status information.
967 union npa_af_gen_cfg {
969 struct npa_af_gen_cfg_s {
973 u64 force_cond_clk_en : 1;
974 u64 force_intf_clk_en : 1;
975 u64 reserved_5_9 : 5;
979 u64 reserved_16_63 : 48;
981 /* struct npa_af_gen_cfg_s cn; */
984 static inline u64 NPA_AF_GEN_CFG(void)
985 __attribute__ ((pure, always_inline));
986 static inline u64 NPA_AF_GEN_CFG(void)
992 * Register (RVU_PF_BAR0) npa_af_gen_int
994 * NPA AF General Interrupt Register This register contains general error
995 * interrupt summary bits.
997 union npa_af_gen_int {
999 struct npa_af_gen_int_s {
1002 u64 unmapped_pf_func : 1;
1003 u64 reserved_33_63 : 31;
1005 /* struct npa_af_gen_int_s cn; */
1008 static inline u64 NPA_AF_GEN_INT(void)
1009 __attribute__ ((pure, always_inline));
1010 static inline u64 NPA_AF_GEN_INT(void)
1016 * Register (RVU_PF_BAR0) npa_af_gen_int_ena_w1c
1018 * NPA AF General Interrupt Enable Clear Register This register clears
1019 * interrupt enable bits.
1021 union npa_af_gen_int_ena_w1c {
1023 struct npa_af_gen_int_ena_w1c_s {
1026 u64 unmapped_pf_func : 1;
1027 u64 reserved_33_63 : 31;
1029 /* struct npa_af_gen_int_ena_w1c_s cn; */
1032 static inline u64 NPA_AF_GEN_INT_ENA_W1C(void)
1033 __attribute__ ((pure, always_inline));
1034 static inline u64 NPA_AF_GEN_INT_ENA_W1C(void)
1040 * Register (RVU_PF_BAR0) npa_af_gen_int_ena_w1s
1042 * NPA AF General Interrupt Enable Set Register This register sets
1043 * interrupt enable bits.
1045 union npa_af_gen_int_ena_w1s {
1047 struct npa_af_gen_int_ena_w1s_s {
1050 u64 unmapped_pf_func : 1;
1051 u64 reserved_33_63 : 31;
1053 /* struct npa_af_gen_int_ena_w1s_s cn; */
1056 static inline u64 NPA_AF_GEN_INT_ENA_W1S(void)
1057 __attribute__ ((pure, always_inline));
1058 static inline u64 NPA_AF_GEN_INT_ENA_W1S(void)
1064 * Register (RVU_PF_BAR0) npa_af_gen_int_w1s
1066 * NPA AF General Interrupt Set Register This register sets interrupt
1069 union npa_af_gen_int_w1s {
1071 struct npa_af_gen_int_w1s_s {
1074 u64 unmapped_pf_func : 1;
1075 u64 reserved_33_63 : 31;
1077 /* struct npa_af_gen_int_w1s_s cn; */
1080 static inline u64 NPA_AF_GEN_INT_W1S(void)
1081 __attribute__ ((pure, always_inline));
1082 static inline u64 NPA_AF_GEN_INT_W1S(void)
1088 * Register (RVU_PF_BAR0) npa_af_inp_ctl
1090 * NPA AF Input Control Register
1092 union npa_af_inp_ctl {
1094 struct npa_af_inp_ctl_s {
1097 u64 reserved_32_63 : 32;
1099 /* struct npa_af_inp_ctl_s cn; */
1102 static inline u64 NPA_AF_INP_CTL(void)
1103 __attribute__ ((pure, always_inline));
1104 static inline u64 NPA_AF_INP_CTL(void)
1110 * Register (RVU_PF_BAR0) npa_af_lf#_auras_cfg
1112 * NPA AF Local Function Auras Configuration Registers
1114 union npa_af_lfx_auras_cfg {
1116 struct npa_af_lfx_auras_cfg_s {
1118 u64 loc_aura_size : 4;
1119 u64 loc_aura_offset : 14;
1122 u64 rmt_aura_size : 4;
1123 u64 rmt_aura_offset : 14;
1125 u64 reserved_61_63 : 3;
1127 struct npa_af_lfx_auras_cfg_cn96xxp1 {
1129 u64 loc_aura_size : 4;
1130 u64 loc_aura_offset : 14;
1132 u64 reserved_35 : 1;
1133 u64 rmt_aura_size : 4;
1134 u64 rmt_aura_offset : 14;
1136 u64 reserved_61_63 : 3;
1138 /* struct npa_af_lfx_auras_cfg_s cn96xxp3; */
1139 /* struct npa_af_lfx_auras_cfg_s cnf95xx; */
1142 static inline u64 NPA_AF_LFX_AURAS_CFG(u64 a)
1143 __attribute__ ((pure, always_inline));
1144 static inline u64 NPA_AF_LFX_AURAS_CFG(u64 a)
1146 return 0x4000 + 0x40000 * a;
1150 * Register (RVU_PF_BAR0) npa_af_lf#_loc_auras_base
1152 * NPA AF Local Function Auras Base Registers
1154 union npa_af_lfx_loc_auras_base {
1156 struct npa_af_lfx_loc_auras_base_s {
1157 u64 reserved_0_6 : 7;
1159 u64 reserved_53_63 : 11;
1161 /* struct npa_af_lfx_loc_auras_base_s cn; */
1164 static inline u64 NPA_AF_LFX_LOC_AURAS_BASE(u64 a)
1165 __attribute__ ((pure, always_inline));
1166 static inline u64 NPA_AF_LFX_LOC_AURAS_BASE(u64 a)
1168 return 0x4010 + 0x40000 * a;
1172 * Register (RVU_PF_BAR0) npa_af_lf#_qints_base
1174 * NPA AF Local Function Queue Interrupts Base Registers
1176 union npa_af_lfx_qints_base {
1178 struct npa_af_lfx_qints_base_s {
1179 u64 reserved_0_6 : 7;
1181 u64 reserved_53_63 : 11;
1183 /* struct npa_af_lfx_qints_base_s cn; */
1186 static inline u64 NPA_AF_LFX_QINTS_BASE(u64 a)
1187 __attribute__ ((pure, always_inline));
1188 static inline u64 NPA_AF_LFX_QINTS_BASE(u64 a)
1190 return 0x4110 + 0x40000 * a;
1194 * Register (RVU_PF_BAR0) npa_af_lf#_qints_cfg
1196 * NPA AF Local Function Queue Interrupts Configuration Registers This
1197 * register controls access to the LF's queue interrupt context table in
1198 * LLC/DRAM. The table consists of NPA_AF_CONST[QINTS] contiguous
1199 * NPA_QINT_HW_S structures. The size of each structure is 1 \<\<
1200 * NPA_AF_CONST1[QINT_LOG2BYTES] bytes.
1202 union npa_af_lfx_qints_cfg {
1204 struct npa_af_lfx_qints_cfg_s {
1205 u64 reserved_0_19 : 20;
1208 u64 reserved_38_63 : 26;
1210 /* struct npa_af_lfx_qints_cfg_s cn; */
1213 static inline u64 NPA_AF_LFX_QINTS_CFG(u64 a)
1214 __attribute__ ((pure, always_inline));
1215 static inline u64 NPA_AF_LFX_QINTS_CFG(u64 a)
1217 return 0x4100 + 0x40000 * a;
1221 * Register (RVU_PF_BAR0) npa_af_lf_rst
1223 * NPA Admin Function LF Reset Register
1225 union npa_af_lf_rst {
1227 struct npa_af_lf_rst_s {
1229 u64 reserved_8_11 : 4;
1231 u64 reserved_13_63 : 51;
1233 /* struct npa_af_lf_rst_s cn; */
1236 static inline u64 NPA_AF_LF_RST(void)
1237 __attribute__ ((pure, always_inline));
1238 static inline u64 NPA_AF_LF_RST(void)
1244 * Register (RVU_PF_BAR0) npa_af_ndc_cfg
1246 * NDC AF General Configuration Register This register provides NDC
1249 union npa_af_ndc_cfg {
1251 struct npa_af_ndc_cfg_s {
1253 u64 ndc_ign_pois : 1;
1258 u64 reserved_6_63 : 58;
1260 /* struct npa_af_ndc_cfg_s cn; */
1263 static inline u64 NPA_AF_NDC_CFG(void)
1264 __attribute__ ((pure, always_inline));
1265 static inline u64 NPA_AF_NDC_CFG(void)
1271 * Register (RVU_PF_BAR0) npa_af_ndc_sync
1273 * NPA AF NDC Sync Register Used to synchronize the NPA NDC.
1275 union npa_af_ndc_sync {
1277 struct npa_af_ndc_sync_s {
1279 u64 reserved_8_11 : 4;
1281 u64 reserved_13_63 : 51;
1283 /* struct npa_af_ndc_sync_s cn; */
1286 static inline u64 NPA_AF_NDC_SYNC(void)
1287 __attribute__ ((pure, always_inline));
1288 static inline u64 NPA_AF_NDC_SYNC(void)
1294 * Register (RVU_PF_BAR0) npa_af_ras
1296 * NPA AF RAS Interrupt Register This register is intended for delivery
1297 * of RAS events to the SCP, so should be ignored by OS drivers.
1301 struct npa_af_ras_s {
1302 u64 reserved_0_31 : 32;
1303 u64 aq_ctx_poison : 1;
1304 u64 aq_res_poison : 1;
1305 u64 aq_inst_poison : 1;
1306 u64 reserved_35_63 : 29;
1308 /* struct npa_af_ras_s cn; */
1311 static inline u64 NPA_AF_RAS(void)
1312 __attribute__ ((pure, always_inline));
1313 static inline u64 NPA_AF_RAS(void)
1319 * Register (RVU_PF_BAR0) npa_af_ras_ena_w1c
1321 * NPA AF RAS Interrupt Enable Clear Register This register clears
1322 * interrupt enable bits.
1324 union npa_af_ras_ena_w1c {
1326 struct npa_af_ras_ena_w1c_s {
1327 u64 reserved_0_31 : 32;
1328 u64 aq_ctx_poison : 1;
1329 u64 aq_res_poison : 1;
1330 u64 aq_inst_poison : 1;
1331 u64 reserved_35_63 : 29;
1333 /* struct npa_af_ras_ena_w1c_s cn; */
1336 static inline u64 NPA_AF_RAS_ENA_W1C(void)
1337 __attribute__ ((pure, always_inline));
1338 static inline u64 NPA_AF_RAS_ENA_W1C(void)
1344 * Register (RVU_PF_BAR0) npa_af_ras_ena_w1s
1346 * NPA AF RAS Interrupt Enable Set Register This register sets interrupt
1349 union npa_af_ras_ena_w1s {
1351 struct npa_af_ras_ena_w1s_s {
1352 u64 reserved_0_31 : 32;
1353 u64 aq_ctx_poison : 1;
1354 u64 aq_res_poison : 1;
1355 u64 aq_inst_poison : 1;
1356 u64 reserved_35_63 : 29;
1358 /* struct npa_af_ras_ena_w1s_s cn; */
1361 static inline u64 NPA_AF_RAS_ENA_W1S(void)
1362 __attribute__ ((pure, always_inline));
1363 static inline u64 NPA_AF_RAS_ENA_W1S(void)
1369 * Register (RVU_PF_BAR0) npa_af_ras_w1s
1371 * NPA AF RAS Interrupt Set Register This register sets interrupt bits.
1373 union npa_af_ras_w1s {
1375 struct npa_af_ras_w1s_s {
1376 u64 reserved_0_31 : 32;
1377 u64 aq_ctx_poison : 1;
1378 u64 aq_res_poison : 1;
1379 u64 aq_inst_poison : 1;
1380 u64 reserved_35_63 : 29;
1382 /* struct npa_af_ras_w1s_s cn; */
1385 static inline u64 NPA_AF_RAS_W1S(void)
1386 __attribute__ ((pure, always_inline));
1387 static inline u64 NPA_AF_RAS_W1S(void)
1393 * Register (RVU_PF_BAR0) npa_af_rvu_int
1395 * NPA AF RVU Interrupt Register This register contains RVU error
1396 * interrupt summary bits.
1398 union npa_af_rvu_int {
1400 struct npa_af_rvu_int_s {
1401 u64 unmapped_slot : 1;
1402 u64 reserved_1_63 : 63;
1404 /* struct npa_af_rvu_int_s cn; */
1407 static inline u64 NPA_AF_RVU_INT(void)
1408 __attribute__ ((pure, always_inline));
1409 static inline u64 NPA_AF_RVU_INT(void)
1415 * Register (RVU_PF_BAR0) npa_af_rvu_int_ena_w1c
1417 * NPA AF RVU Interrupt Enable Clear Register This register clears
1418 * interrupt enable bits.
1420 union npa_af_rvu_int_ena_w1c {
1422 struct npa_af_rvu_int_ena_w1c_s {
1423 u64 unmapped_slot : 1;
1424 u64 reserved_1_63 : 63;
1426 /* struct npa_af_rvu_int_ena_w1c_s cn; */
1429 static inline u64 NPA_AF_RVU_INT_ENA_W1C(void)
1430 __attribute__ ((pure, always_inline));
1431 static inline u64 NPA_AF_RVU_INT_ENA_W1C(void)
1437 * Register (RVU_PF_BAR0) npa_af_rvu_int_ena_w1s
1439 * NPA AF RVU Interrupt Enable Set Register This register sets interrupt
1442 union npa_af_rvu_int_ena_w1s {
1444 struct npa_af_rvu_int_ena_w1s_s {
1445 u64 unmapped_slot : 1;
1446 u64 reserved_1_63 : 63;
1448 /* struct npa_af_rvu_int_ena_w1s_s cn; */
1451 static inline u64 NPA_AF_RVU_INT_ENA_W1S(void)
1452 __attribute__ ((pure, always_inline));
1453 static inline u64 NPA_AF_RVU_INT_ENA_W1S(void)
1459 * Register (RVU_PF_BAR0) npa_af_rvu_int_w1s
1461 * NPA AF RVU Interrupt Set Register This register sets interrupt bits.
1463 union npa_af_rvu_int_w1s {
1465 struct npa_af_rvu_int_w1s_s {
1466 u64 unmapped_slot : 1;
1467 u64 reserved_1_63 : 63;
1469 /* struct npa_af_rvu_int_w1s_s cn; */
1472 static inline u64 NPA_AF_RVU_INT_W1S(void)
1473 __attribute__ ((pure, always_inline));
1474 static inline u64 NPA_AF_RVU_INT_W1S(void)
1480 * Register (RVU_PF_BAR0) npa_af_rvu_lf_cfg_debug
1482 * NPA Privileged LF Configuration Debug Register This debug register
1483 * allows software to lookup the reverse mapping from VF/PF slot to LF.
1484 * The forward mapping is programmed with NPA_PRIV_LF()_CFG.
1486 union npa_af_rvu_lf_cfg_debug {
1488 struct npa_af_rvu_lf_cfg_debug_s {
1492 u64 reserved_14_15 : 2;
1495 u64 reserved_40_63 : 24;
1497 /* struct npa_af_rvu_lf_cfg_debug_s cn; */
1500 static inline u64 NPA_AF_RVU_LF_CFG_DEBUG(void)
1501 __attribute__ ((pure, always_inline));
1502 static inline u64 NPA_AF_RVU_LF_CFG_DEBUG(void)
1508 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_alloc#
1510 * NPA Aura Allocate Operation Registers These registers are used to
1511 * allocate one or two pointers from a given aura's pool. A 64-bit atomic
1512 * load-and-add to NPA_LF_AURA_OP_ALLOC(0) allocates a single pointer. A
1513 * 128-bit atomic CASP operation to NPA_LF_AURA_OP_ALLOC(0..1) allocates
1514 * two pointers. The atomic write data format is NPA_AURA_OP_WDATA_S. For
1515 * CASP, the first SWAP word in the write data contains
1516 * NPA_AURA_OP_WDATA_S and the remaining write data words are ignored.
1517 * All other accesses to this register (e.g. reads and writes) are
1518 * RAZ/WI. RSL accesses to this register are RAZ/WI.
1520 union npa_lf_aura_op_allocx {
1522 struct npa_lf_aura_op_allocx_s {
1525 /* struct npa_lf_aura_op_allocx_s cn; */
1528 static inline u64 NPA_LF_AURA_OP_ALLOCX(u64 a)
1529 __attribute__ ((pure, always_inline));
1530 static inline u64 NPA_LF_AURA_OP_ALLOCX(u64 a)
1532 return 0x10 + 8 * a;
1536 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_cnt
1538 * NPA LF Aura Count Register A 64-bit atomic load-and-add to this
1539 * register returns a given aura's count. A write sets or adds the aura's
1540 * count. A read is RAZ. RSL accesses to this register are RAZ/WI.
1542 union npa_lf_aura_op_cnt {
1544 struct npa_lf_aura_op_cnt_s {
1546 u64 reserved_36_41 : 6;
1551 /* struct npa_lf_aura_op_cnt_s cn; */
1554 static inline u64 NPA_LF_AURA_OP_CNT(void)
1555 __attribute__ ((pure, always_inline));
1556 static inline u64 NPA_LF_AURA_OP_CNT(void)
1562 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_free0
1564 * NPA LF Aura Free Operation Register 0 A 128-bit write (STP) to
1565 * NPA_LF_AURA_OP_FREE0 and NPA_LF_AURA_OP_FREE1 frees a pointer into a
1566 * given aura's pool. All other accesses to these registers (e.g. reads
1567 * and 64-bit writes) are RAZ/WI. RSL accesses to this register are
1570 union npa_lf_aura_op_free0 {
1572 struct npa_lf_aura_op_free0_s {
1575 /* struct npa_lf_aura_op_free0_s cn; */
1578 static inline u64 NPA_LF_AURA_OP_FREE0(void)
1579 __attribute__ ((pure, always_inline));
1580 static inline u64 NPA_LF_AURA_OP_FREE0(void)
1586 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_free1
1588 * NPA LF Aura Free Operation Register 1 See NPA_LF_AURA_OP_FREE0. RSL
1589 * accesses to this register are RAZ/WI.
1591 union npa_lf_aura_op_free1 {
1593 struct npa_lf_aura_op_free1_s {
1595 u64 reserved_20_62 : 43;
1598 /* struct npa_lf_aura_op_free1_s cn; */
1601 static inline u64 NPA_LF_AURA_OP_FREE1(void)
1602 __attribute__ ((pure, always_inline));
1603 static inline u64 NPA_LF_AURA_OP_FREE1(void)
1609 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_int
1611 * NPA LF Aura Interrupt Operation Register A 64-bit atomic load-and-add
1612 * to this register reads
1613 * NPA_AURA_HW_S[ERR_INT,ERR_INT_ENA,THRESH_INT,THRESH_INT_ENA]. A write
1614 * optionally sets or clears these fields. A read is RAZ. RSL accesses
1615 * to this register are RAZ/WI.
1617 union npa_lf_aura_op_int {
1619 struct npa_lf_aura_op_int_s {
1621 u64 err_int_ena : 8;
1623 u64 thresh_int_ena : 1;
1624 u64 reserved_18_41 : 24;
1629 /* struct npa_lf_aura_op_int_s cn; */
1632 static inline u64 NPA_LF_AURA_OP_INT(void)
1633 __attribute__ ((pure, always_inline));
1634 static inline u64 NPA_LF_AURA_OP_INT(void)
1640 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_limit
1642 * NPA LF Aura Allocation Limit Register A 64-bit atomic load-and-add to
1643 * this register returns a given aura's limit. A write sets the aura's
1644 * limit. A read is RAZ. RSL accesses to this register are RAZ/WI.
1646 union npa_lf_aura_op_limit {
1648 struct npa_lf_aura_op_limit_s {
1650 u64 reserved_36_41 : 6;
1652 u64 reserved_43 : 1;
1655 /* struct npa_lf_aura_op_limit_s cn; */
1658 static inline u64 NPA_LF_AURA_OP_LIMIT(void)
1659 __attribute__ ((pure, always_inline));
1660 static inline u64 NPA_LF_AURA_OP_LIMIT(void)
1666 * Register (RVU_PFVF_BAR2) npa_lf_aura_op_thresh
1668 * NPA LF Aura Threshold Operation Register A 64-bit atomic load-and-add
1669 * to this register reads NPA_AURA_HW_S[THRESH_UP,THRESH]. A write to the
1670 * register writes NPA_AURA_HW_S[THRESH_UP,THRESH] and recomputes
1671 * NPA_AURA_HW_S[THRESH_INT]. A read is RAZ. RSL accesses to this
1672 * register are RAZ/WI.
1674 union npa_lf_aura_op_thresh {
1676 struct npa_lf_aura_op_thresh_s {
1678 u64 reserved_36_41 : 6;
1683 /* struct npa_lf_aura_op_thresh_s cn; */
1686 static inline u64 NPA_LF_AURA_OP_THRESH(void)
1687 __attribute__ ((pure, always_inline));
1688 static inline u64 NPA_LF_AURA_OP_THRESH(void)
1694 * Register (RVU_PFVF_BAR2) npa_lf_err_int
1696 * NPA LF Error Interrupt Register
1698 union npa_lf_err_int {
1700 struct npa_lf_err_int_s {
1704 u64 rmt_req_oor : 1;
1705 u64 reserved_4_11 : 8;
1708 u64 stack_fault : 1;
1710 u64 reserved_16_63 : 48;
1712 /* struct npa_lf_err_int_s cn; */
1715 static inline u64 NPA_LF_ERR_INT(void)
1716 __attribute__ ((pure, always_inline));
1717 static inline u64 NPA_LF_ERR_INT(void)
1723 * Register (RVU_PFVF_BAR2) npa_lf_err_int_ena_w1c
1725 * NPA LF Error Interrupt Enable Clear Register This register clears
1726 * interrupt enable bits.
1728 union npa_lf_err_int_ena_w1c {
1730 struct npa_lf_err_int_ena_w1c_s {
1734 u64 rmt_req_oor : 1;
1735 u64 reserved_4_11 : 8;
1738 u64 stack_fault : 1;
1740 u64 reserved_16_63 : 48;
1742 /* struct npa_lf_err_int_ena_w1c_s cn; */
1745 static inline u64 NPA_LF_ERR_INT_ENA_W1C(void)
1746 __attribute__ ((pure, always_inline));
1747 static inline u64 NPA_LF_ERR_INT_ENA_W1C(void)
1753 * Register (RVU_PFVF_BAR2) npa_lf_err_int_ena_w1s
1755 * NPA LF Error Interrupt Enable Set Register This register sets
1756 * interrupt enable bits.
1758 union npa_lf_err_int_ena_w1s {
1760 struct npa_lf_err_int_ena_w1s_s {
1764 u64 rmt_req_oor : 1;
1765 u64 reserved_4_11 : 8;
1768 u64 stack_fault : 1;
1770 u64 reserved_16_63 : 48;
1772 /* struct npa_lf_err_int_ena_w1s_s cn; */
1775 static inline u64 NPA_LF_ERR_INT_ENA_W1S(void)
1776 __attribute__ ((pure, always_inline));
1777 static inline u64 NPA_LF_ERR_INT_ENA_W1S(void)
1783 * Register (RVU_PFVF_BAR2) npa_lf_err_int_w1s
1785 * NPA LF Error Interrupt Set Register This register sets interrupt bits.
1787 union npa_lf_err_int_w1s {
1789 struct npa_lf_err_int_w1s_s {
1793 u64 rmt_req_oor : 1;
1794 u64 reserved_4_11 : 8;
1797 u64 stack_fault : 1;
1799 u64 reserved_16_63 : 48;
1801 /* struct npa_lf_err_int_w1s_s cn; */
1804 static inline u64 NPA_LF_ERR_INT_W1S(void)
1805 __attribute__ ((pure, always_inline));
1806 static inline u64 NPA_LF_ERR_INT_W1S(void)
1812 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_available
1814 * NPA LF Pool Available Count Operation Register A 64-bit atomic load-
1815 * and-add to this register returns a given pool's free pointer count.
1816 * Reads and writes are RAZ/WI. RSL accesses to this register are
1819 union npa_lf_pool_op_available {
1821 struct npa_lf_pool_op_available_s {
1823 u64 reserved_36_41 : 6;
1825 u64 reserved_43 : 1;
1828 /* struct npa_lf_pool_op_available_s cn; */
1831 static inline u64 NPA_LF_POOL_OP_AVAILABLE(void)
1832 __attribute__ ((pure, always_inline));
1833 static inline u64 NPA_LF_POOL_OP_AVAILABLE(void)
1839 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_int
1841 * NPA LF Pool Interrupt Operation Register A 64-bit atomic load-and-add
1842 * to this register reads
1843 * NPA_POOL_S[ERR_INT,ERR_INT_ENA,THRESH_INT,THRESH_INT_ENA]. A write
1844 * optionally sets or clears these fields. A read is RAZ. RSL accesses
1845 * to this register are RAZ/WI.
1847 union npa_lf_pool_op_int {
1849 struct npa_lf_pool_op_int_s {
1851 u64 err_int_ena : 8;
1853 u64 thresh_int_ena : 1;
1854 u64 reserved_18_41 : 24;
1859 /* struct npa_lf_pool_op_int_s cn; */
1862 static inline u64 NPA_LF_POOL_OP_INT(void)
1863 __attribute__ ((pure, always_inline));
1864 static inline u64 NPA_LF_POOL_OP_INT(void)
1870 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_pc
1872 * NPA LF Pool Performance Count Register A 64-bit atomic load-and-add to
1873 * this register reads NPA_POOL_S[OP_PC] from a given aura's pool. The
1874 * aura is selected by the atomic write data, whose format is
1875 * NPA_AURA_OP_WDATA_S. Reads and writes are RAZ/WI. RSL accesses to
1876 * this register are RAZ/WI.
1878 union npa_lf_pool_op_pc {
1880 struct npa_lf_pool_op_pc_s {
1883 u64 reserved_49_63 : 15;
1885 /* struct npa_lf_pool_op_pc_s cn; */
1888 static inline u64 NPA_LF_POOL_OP_PC(void)
1889 __attribute__ ((pure, always_inline));
1890 static inline u64 NPA_LF_POOL_OP_PC(void)
1896 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_ptr_end0
1898 * NPA LF Pool Pointer End Operation Register 0 A 128-bit write (STP) to
1899 * the NPA_LF_POOL_OP_PTR_END0 and NPA_LF_POOL_OP_PTR_END1 registers
1900 * writes to a given pool's pointer end value. All other accesses to
1901 * these registers (e.g. reads and 64-bit writes) are RAZ/WI. RSL
1902 * accesses to this register are RAZ/WI.
1904 union npa_lf_pool_op_ptr_end0 {
1906 struct npa_lf_pool_op_ptr_end0_s {
1909 /* struct npa_lf_pool_op_ptr_end0_s cn; */
1912 static inline u64 NPA_LF_POOL_OP_PTR_END0(void)
1913 __attribute__ ((pure, always_inline));
1914 static inline u64 NPA_LF_POOL_OP_PTR_END0(void)
1920 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_ptr_end1
1922 * NPA LF Pool Pointer End Operation Register 1 See
1923 * NPA_LF_POOL_OP_PTR_END0. RSL accesses to this register are RAZ/WI.
1925 union npa_lf_pool_op_ptr_end1 {
1927 struct npa_lf_pool_op_ptr_end1_s {
1929 u64 reserved_20_63 : 44;
1931 /* struct npa_lf_pool_op_ptr_end1_s cn; */
1934 static inline u64 NPA_LF_POOL_OP_PTR_END1(void)
1935 __attribute__ ((pure, always_inline));
1936 static inline u64 NPA_LF_POOL_OP_PTR_END1(void)
1942 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_ptr_start0
1944 * NPA LF Pool Pointer Start Operation Register 0 A 128-bit write (STP)
1945 * to the NPA_LF_POOL_OP_PTR_START0 and NPA_LF_POOL_OP_PTR_START1
1946 * registers writes to a given pool's pointer start value. All other
1947 * accesses to these registers (e.g. reads and 64-bit writes) are RAZ/WI.
1948 * RSL accesses to this register are RAZ/WI.
1950 union npa_lf_pool_op_ptr_start0 {
1952 struct npa_lf_pool_op_ptr_start0_s {
1955 /* struct npa_lf_pool_op_ptr_start0_s cn; */
1958 static inline u64 NPA_LF_POOL_OP_PTR_START0(void)
1959 __attribute__ ((pure, always_inline));
1960 static inline u64 NPA_LF_POOL_OP_PTR_START0(void)
1966 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_ptr_start1
1968 * NPA LF Pool Pointer Start Operation Register 1 See
1969 * NPA_LF_POOL_OP_PTR_START0. RSL accesses to this register are RAZ/WI.
1971 union npa_lf_pool_op_ptr_start1 {
1973 struct npa_lf_pool_op_ptr_start1_s {
1975 u64 reserved_20_63 : 44;
1977 /* struct npa_lf_pool_op_ptr_start1_s cn; */
1980 static inline u64 NPA_LF_POOL_OP_PTR_START1(void)
1981 __attribute__ ((pure, always_inline));
1982 static inline u64 NPA_LF_POOL_OP_PTR_START1(void)
1988 * Register (RVU_PFVF_BAR2) npa_lf_pool_op_thresh
1990 * NPA LF Pool Threshold Operation Register A 64-bit atomic load-and-add
1991 * to this register reads NPA_POOL_S[THRESH_UP,THRESH]. A write to the
1992 * register writes NPA_POOL_S[THRESH_UP,THRESH]. A read is RAZ. RSL
1993 * accesses to this register are RAZ/WI.
1995 union npa_lf_pool_op_thresh {
1997 struct npa_lf_pool_op_thresh_s {
1999 u64 reserved_36_41 : 6;
2004 /* struct npa_lf_pool_op_thresh_s cn; */
2007 static inline u64 NPA_LF_POOL_OP_THRESH(void)
2008 __attribute__ ((pure, always_inline));
2009 static inline u64 NPA_LF_POOL_OP_THRESH(void)
2015 * Register (RVU_PFVF_BAR2) npa_lf_qint#_cnt
2017 * NPA LF Queue Interrupt Count Registers
2019 union npa_lf_qintx_cnt {
2021 struct npa_lf_qintx_cnt_s {
2023 u64 reserved_22_63 : 42;
2025 /* struct npa_lf_qintx_cnt_s cn; */
2028 static inline u64 NPA_LF_QINTX_CNT(u64 a)
2029 __attribute__ ((pure, always_inline));
2030 static inline u64 NPA_LF_QINTX_CNT(u64 a)
2032 return 0x300 + 0x1000 * a;
2036 * Register (RVU_PFVF_BAR2) npa_lf_qint#_ena_w1c
2038 * NPA LF Queue Interrupt Enable Clear Registers This register clears
2039 * interrupt enable bits.
2041 union npa_lf_qintx_ena_w1c {
2043 struct npa_lf_qintx_ena_w1c_s {
2045 u64 reserved_1_63 : 63;
2047 /* struct npa_lf_qintx_ena_w1c_s cn; */
2050 static inline u64 NPA_LF_QINTX_ENA_W1C(u64 a)
2051 __attribute__ ((pure, always_inline));
2052 static inline u64 NPA_LF_QINTX_ENA_W1C(u64 a)
2054 return 0x330 + 0x1000 * a;
2058 * Register (RVU_PFVF_BAR2) npa_lf_qint#_ena_w1s
2060 * NPA LF Queue Interrupt Enable Set Registers This register sets
2061 * interrupt enable bits.
2063 union npa_lf_qintx_ena_w1s {
2065 struct npa_lf_qintx_ena_w1s_s {
2067 u64 reserved_1_63 : 63;
2069 /* struct npa_lf_qintx_ena_w1s_s cn; */
2072 static inline u64 NPA_LF_QINTX_ENA_W1S(u64 a)
2073 __attribute__ ((pure, always_inline));
2074 static inline u64 NPA_LF_QINTX_ENA_W1S(u64 a)
2076 return 0x320 + 0x1000 * a;
2080 * Register (RVU_PFVF_BAR2) npa_lf_qint#_int
2082 * NPA LF Queue Interrupt Registers
2084 union npa_lf_qintx_int {
2086 struct npa_lf_qintx_int_s {
2088 u64 reserved_1_63 : 63;
2090 /* struct npa_lf_qintx_int_s cn; */
2093 static inline u64 NPA_LF_QINTX_INT(u64 a)
2094 __attribute__ ((pure, always_inline));
2095 static inline u64 NPA_LF_QINTX_INT(u64 a)
2097 return 0x310 + 0x1000 * a;
2101 * Register (RVU_PFVF_BAR2) npa_lf_qint#_int_w1s
2103 * INTERNAL: NPA LF Queue Interrupt Set Registers
2105 union npa_lf_qintx_int_w1s {
2107 struct npa_lf_qintx_int_w1s_s {
2109 u64 reserved_1_63 : 63;
2111 /* struct npa_lf_qintx_int_w1s_s cn; */
2114 static inline u64 NPA_LF_QINTX_INT_W1S(u64 a)
2115 __attribute__ ((pure, always_inline));
2116 static inline u64 NPA_LF_QINTX_INT_W1S(u64 a)
2118 return 0x318 + 0x1000 * a;
2122 * Register (RVU_PFVF_BAR2) npa_lf_ras
2124 * NPA LF RAS Interrupt Register
2128 struct npa_lf_ras_s {
2129 u64 aura_poison : 1;
2130 u64 pool_poison : 1;
2131 u64 stack_poison : 1;
2132 u64 qint_poison : 1;
2133 u64 reserved_4_63 : 60;
2135 /* struct npa_lf_ras_s cn; */
2138 static inline u64 NPA_LF_RAS(void)
2139 __attribute__ ((pure, always_inline));
2140 static inline u64 NPA_LF_RAS(void)
2146 * Register (RVU_PFVF_BAR2) npa_lf_ras_ena_w1c
2148 * NPA LF RAS Interrupt Enable Clear Register This register clears
2149 * interrupt enable bits.
2151 union npa_lf_ras_ena_w1c {
2153 struct npa_lf_ras_ena_w1c_s {
2154 u64 aura_poison : 1;
2155 u64 pool_poison : 1;
2156 u64 stack_poison : 1;
2157 u64 qint_poison : 1;
2158 u64 reserved_4_63 : 60;
2160 /* struct npa_lf_ras_ena_w1c_s cn; */
2163 static inline u64 NPA_LF_RAS_ENA_W1C(void)
2164 __attribute__ ((pure, always_inline));
2165 static inline u64 NPA_LF_RAS_ENA_W1C(void)
2171 * Register (RVU_PFVF_BAR2) npa_lf_ras_ena_w1s
2173 * NPA LF RAS Interrupt Enable Set Register This register sets interrupt
2176 union npa_lf_ras_ena_w1s {
2178 struct npa_lf_ras_ena_w1s_s {
2179 u64 aura_poison : 1;
2180 u64 pool_poison : 1;
2181 u64 stack_poison : 1;
2182 u64 qint_poison : 1;
2183 u64 reserved_4_63 : 60;
2185 /* struct npa_lf_ras_ena_w1s_s cn; */
2188 static inline u64 NPA_LF_RAS_ENA_W1S(void)
2189 __attribute__ ((pure, always_inline));
2190 static inline u64 NPA_LF_RAS_ENA_W1S(void)
2196 * Register (RVU_PFVF_BAR2) npa_lf_ras_w1s
2198 * NPA LF RAS Interrupt Set Register This register sets interrupt bits.
2200 union npa_lf_ras_w1s {
2202 struct npa_lf_ras_w1s_s {
2203 u64 aura_poison : 1;
2204 u64 pool_poison : 1;
2205 u64 stack_poison : 1;
2206 u64 qint_poison : 1;
2207 u64 reserved_4_63 : 60;
2209 /* struct npa_lf_ras_w1s_s cn; */
2212 static inline u64 NPA_LF_RAS_W1S(void)
2213 __attribute__ ((pure, always_inline));
2214 static inline u64 NPA_LF_RAS_W1S(void)
2220 * Register (RVU_PF_BAR0) npa_priv_af_int_cfg
2222 * NPA Privileged AF Interrupt Configuration Register
2224 union npa_priv_af_int_cfg {
2226 struct npa_priv_af_int_cfg_s {
2227 u64 msix_offset : 11;
2228 u64 reserved_11 : 1;
2230 u64 reserved_20_63 : 44;
2232 /* struct npa_priv_af_int_cfg_s cn; */
2235 static inline u64 NPA_PRIV_AF_INT_CFG(void)
2236 __attribute__ ((pure, always_inline));
2237 static inline u64 NPA_PRIV_AF_INT_CFG(void)
2243 * Register (RVU_PF_BAR0) npa_priv_lf#_cfg
2245 * NPA Privileged Local Function Configuration Registers These registers
2246 * allow each NPA local function (LF) to be provisioned to a VF/PF slot
2247 * for RVU. See also NPA_AF_RVU_LF_CFG_DEBUG. Software should read this
2248 * register after write to ensure that the LF is mapped to [PF_FUNC]
2249 * before issuing transactions to the mapped PF and function. [SLOT]
2250 * must be zero. Internal: Hardware ignores [SLOT] and always assumes
2253 union npa_priv_lfx_cfg {
2255 struct npa_priv_lfx_cfg_s {
2258 u64 reserved_24_62 : 39;
2261 /* struct npa_priv_lfx_cfg_s cn; */
2264 static inline u64 NPA_PRIV_LFX_CFG(u64 a)
2265 __attribute__ ((pure, always_inline));
2266 static inline u64 NPA_PRIV_LFX_CFG(u64 a)
2268 return 0x10010 + 0x100 * a;
2272 * Register (RVU_PF_BAR0) npa_priv_lf#_int_cfg
2274 * NPA Privileged LF Interrupt Configuration Registers
2276 union npa_priv_lfx_int_cfg {
2278 struct npa_priv_lfx_int_cfg_s {
2279 u64 msix_offset : 11;
2280 u64 reserved_11 : 1;
2282 u64 reserved_20_63 : 44;
2284 /* struct npa_priv_lfx_int_cfg_s cn; */
2287 static inline u64 NPA_PRIV_LFX_INT_CFG(u64 a)
2288 __attribute__ ((pure, always_inline));
2289 static inline u64 NPA_PRIV_LFX_INT_CFG(u64 a)
2291 return 0x10020 + 0x100 * a;
2294 #endif /* __CSRS_NPA_H__ */