@@ -98,6 +98,18 @@ struct hl_eq_fw_alive {
98
98
__u8 pad [7 ];
99
99
};
100
100
101
+ enum hl_pcie_addr_dec_cause {
102
+ PCIE_ADDR_DEC_HBW_ERR_RESP ,
103
+ PCIE_ADDR_DEC_LBW_ERR_RESP ,
104
+ PCIE_ADDR_DEC_TLP_BLOCKED_BY_RR
105
+ };
106
+
107
+ struct hl_eq_pcie_addr_dec_data {
108
+ /* enum hl_pcie_addr_dec_cause */
109
+ __u8 addr_dec_cause ;
110
+ __u8 pad [7 ];
111
+ };
112
+
101
113
struct hl_eq_entry {
102
114
struct hl_eq_header hdr ;
103
115
union {
@@ -106,6 +118,7 @@ struct hl_eq_entry {
106
118
struct hl_eq_sm_sei_data sm_sei_data ;
107
119
struct cpucp_pkt_sync_err pkt_sync_err ;
108
120
struct hl_eq_fw_alive fw_alive ;
121
+ struct hl_eq_pcie_addr_dec_data pcie_addr_dec_data ;
109
122
__le64 data [7 ];
110
123
};
111
124
};
@@ -116,7 +129,7 @@ struct hl_eq_entry {
116
129
#define EQ_CTL_READY_MASK 0x80000000
117
130
118
131
#define EQ_CTL_EVENT_TYPE_SHIFT 16
119
- #define EQ_CTL_EVENT_TYPE_MASK 0x03FF0000
132
+ #define EQ_CTL_EVENT_TYPE_MASK 0x0FFF0000
120
133
121
134
#define EQ_CTL_INDEX_SHIFT 0
122
135
#define EQ_CTL_INDEX_MASK 0x0000FFFF
@@ -300,7 +313,7 @@ enum pq_init_status {
300
313
* The packet's arguments specify the desired sensor and the field to
301
314
* set.
302
315
*
303
- * CPUCP_PACKET_PCIE_THROUGHPUT_GET
316
+ * CPUCP_PACKET_PCIE_THROUGHPUT_GET -
304
317
* Get throughput of PCIe.
305
318
* The packet's arguments specify the transaction direction (TX/RX).
306
319
* The window measurement is 10[msec], and the return value is in KB/sec.
@@ -309,19 +322,19 @@ enum pq_init_status {
309
322
* Replay count measures number of "replay" events, which is basicly
310
323
* number of retries done by PCIe.
311
324
*
312
- * CPUCP_PACKET_TOTAL_ENERGY_GET
325
+ * CPUCP_PACKET_TOTAL_ENERGY_GET -
313
326
* Total Energy is measurement of energy from the time FW Linux
314
327
* is loaded. It is calculated by multiplying the average power
315
328
* by time (passed from armcp start). The units are in MilliJouls.
316
329
*
317
- * CPUCP_PACKET_PLL_INFO_GET
330
+ * CPUCP_PACKET_PLL_INFO_GET -
318
331
* Fetch frequencies of PLL from the required PLL IP.
319
332
* The packet's arguments specify the device PLL type
320
333
* Pll type is the PLL from device pll_index enum.
321
334
* The result is composed of 4 outputs, each is 16-bit
322
335
* frequency in MHz.
323
336
*
324
- * CPUCP_PACKET_POWER_GET
337
+ * CPUCP_PACKET_POWER_GET -
325
338
* Fetch the present power consumption of the device (Current * Voltage).
326
339
*
327
340
* CPUCP_PACKET_NIC_PFC_SET -
@@ -345,6 +358,24 @@ enum pq_init_status {
345
358
* CPUCP_PACKET_MSI_INFO_SET -
346
359
* set the index number for each supported msi type going from
347
360
* host to device
361
+ *
362
+ * CPUCP_PACKET_NIC_XPCS91_REGS_GET -
363
+ * Fetch the un/correctable counters values from the NIC MAC.
364
+ *
365
+ * CPUCP_PACKET_NIC_STAT_REGS_GET -
366
+ * Fetch various NIC MAC counters from the NIC STAT.
367
+ *
368
+ * CPUCP_PACKET_NIC_STAT_REGS_CLR -
369
+ * Clear the various NIC MAC counters in the NIC STAT.
370
+ *
371
+ * CPUCP_PACKET_NIC_STAT_REGS_ALL_GET -
372
+ * Fetch all NIC MAC counters from the NIC STAT.
373
+ *
374
+ * CPUCP_PACKET_IS_IDLE_CHECK -
375
+ * Check if the device is IDLE in regard to the DMA/compute engines
376
+ * and QMANs. The f/w will return a bitmask where each bit represents
377
+ * a different engine or QMAN according to enum cpucp_idle_mask.
378
+ * The bit will be 1 if the engine is NOT idle.
348
379
*/
349
380
350
381
enum cpucp_packet_id {
@@ -385,6 +416,11 @@ enum cpucp_packet_id {
385
416
CPUCP_PACKET_NIC_LPBK_SET , /* internal */
386
417
CPUCP_PACKET_NIC_MAC_CFG , /* internal */
387
418
CPUCP_PACKET_MSI_INFO_SET , /* internal */
419
+ CPUCP_PACKET_NIC_XPCS91_REGS_GET , /* internal */
420
+ CPUCP_PACKET_NIC_STAT_REGS_GET , /* internal */
421
+ CPUCP_PACKET_NIC_STAT_REGS_CLR , /* internal */
422
+ CPUCP_PACKET_NIC_STAT_REGS_ALL_GET , /* internal */
423
+ CPUCP_PACKET_IS_IDLE_CHECK , /* internal */
388
424
};
389
425
390
426
#define CPUCP_PACKET_FENCE_VAL 0xFE8CE7A5
@@ -414,6 +450,11 @@ enum cpucp_packet_id {
414
450
#define CPUCP_PKT_VAL_LPBK_IN2_SHIFT 1
415
451
#define CPUCP_PKT_VAL_LPBK_IN2_MASK 0x000000000000001Eull
416
452
453
+ #define CPUCP_PKT_VAL_MAC_CNT_IN1_SHIFT 0
454
+ #define CPUCP_PKT_VAL_MAC_CNT_IN1_MASK 0x0000000000000001ull
455
+ #define CPUCP_PKT_VAL_MAC_CNT_IN2_SHIFT 1
456
+ #define CPUCP_PKT_VAL_MAC_CNT_IN2_MASK 0x00000000FFFFFFFEull
457
+
417
458
/* heartbeat status bits */
418
459
#define CPUCP_PKT_HB_STATUS_EQ_FAULT_SHIFT 0
419
460
#define CPUCP_PKT_HB_STATUS_EQ_FAULT_MASK 0x00000001
@@ -467,7 +508,8 @@ struct cpucp_packet {
467
508
__le32 status_mask ;
468
509
};
469
510
470
- __le32 reserved ;
511
+ /* For NIC requests */
512
+ __le32 port_index ;
471
513
};
472
514
473
515
struct cpucp_unmask_irq_arr_packet {
@@ -476,6 +518,12 @@ struct cpucp_unmask_irq_arr_packet {
476
518
__le32 irqs [0 ];
477
519
};
478
520
521
+ struct cpucp_nic_status_packet {
522
+ struct cpucp_packet cpucp_pkt ;
523
+ __le32 length ;
524
+ __le32 data [0 ];
525
+ };
526
+
479
527
struct cpucp_array_data_packet {
480
528
struct cpucp_packet cpucp_pkt ;
481
529
__le32 length ;
@@ -595,6 +643,18 @@ enum pll_index {
595
643
PLL_MAX
596
644
};
597
645
646
+ enum rl_index {
647
+ TPC_RL = 0 ,
648
+ MME_RL ,
649
+ };
650
+
651
+ enum pvt_index {
652
+ PVT_SW ,
653
+ PVT_SE ,
654
+ PVT_NW ,
655
+ PVT_NE
656
+ };
657
+
598
658
/* Event Queue Packets */
599
659
600
660
struct eq_generic_event {
@@ -721,4 +781,36 @@ struct cpucp_nic_info {
721
781
__u8 reserved [6 ];
722
782
};
723
783
784
+ /*
785
+ * struct cpucp_nic_status - describes the status of a NIC port.
786
+ * @port: NIC port index.
787
+ * @bad_format_cnt: e.g. CRC.
788
+ * @responder_out_of_sequence_psn_cnt: e.g NAK.
789
+ * @high_ber_reinit_cnt: link reinit due to high BER.
790
+ * @correctable_err_cnt: e.g. bit-flip.
791
+ * @uncorrectable_err_cnt: e.g. MAC errors.
792
+ * @retraining_cnt: re-training counter.
793
+ * @up: is port up.
794
+ * @pcs_link: has PCS link.
795
+ * @phy_ready: is PHY ready.
796
+ * @auto_neg: is Autoneg enabled.
797
+ * @timeout_retransmission_cnt: timeout retransmission events
798
+ * @high_ber_cnt: high ber events
799
+ */
800
+ struct cpucp_nic_status {
801
+ __le32 port ;
802
+ __le32 bad_format_cnt ;
803
+ __le32 responder_out_of_sequence_psn_cnt ;
804
+ __le32 high_ber_reinit ;
805
+ __le32 correctable_err_cnt ;
806
+ __le32 uncorrectable_err_cnt ;
807
+ __le32 retraining_cnt ;
808
+ __u8 up ;
809
+ __u8 pcs_link ;
810
+ __u8 phy_ready ;
811
+ __u8 auto_neg ;
812
+ __le32 timeout_retransmission_cnt ;
813
+ __le32 high_ber_cnt ;
814
+ };
815
+
724
816
#endif /* CPUCP_IF_H */
0 commit comments