29 #define SWITCHTEC_MRPC_PAYLOAD_SIZE 1024 30 #define SWITCHTEC_MAX_PFF_CSR 255 31 #define SWITCHTEC_MAX_PARTITIONS 48 33 #define MICROSEMI_VENDOR_ID 0x11f8 35 #define BIT(x) (1 << x) 36 #define SWITCHTEC_EVENT_OCCURRED BIT(0) 37 #define SWITCHTEC_EVENT_CLEAR BIT(0) 38 #define SWITCHTEC_EVENT_EN_LOG BIT(1) 39 #define SWITCHTEC_EVENT_EN_CLI BIT(2) 40 #define SWITCHTEC_EVENT_EN_IRQ BIT(3) 41 #define SWITCHTEC_EVENT_FATAL BIT(4) 44 #pragma warning(disable: 4201) 50 SWITCHTEC_GAS_MRPC_OFFSET = 0x0000,
51 SWITCHTEC_GAS_TOP_CFG_OFFSET = 0x1000,
52 SWITCHTEC_GAS_SW_EVENT_OFFSET = 0x1800,
53 SWITCHTEC_GAS_SYS_INFO_OFFSET = 0x2000,
54 SWITCHTEC_GAS_FLASH_INFO_OFFSET = 0x2200,
55 SWITCHTEC_GAS_PART_CFG_OFFSET = 0x4000,
56 SWITCHTEC_GAS_NTB_OFFSET = 0x10000,
57 SWITCHTEC_GAS_PFF_CSR_OFFSET = 0x134000,
61 uint8_t input_data[SWITCHTEC_MRPC_PAYLOAD_SIZE];
62 uint8_t output_data[SWITCHTEC_MRPC_PAYLOAD_SIZE];
69 SWITCHTEC_MRPC_STATUS_INPROGRESS = 1,
70 SWITCHTEC_MRPC_STATUS_DONE = 2,
71 SWITCHTEC_MRPC_STATUS_ERROR = 0xFF,
72 SWITCHTEC_MRPC_STATUS_INTERRUPTED = 0x100,
77 uint8_t stack_valid[6];
78 uint8_t partition_count;
81 uint8_t pff_port[255];
90 uint64_t event_report_ctrl;
92 uint64_t part_event_bitmap;
94 uint32_t global_summary;
95 uint32_t reserved3[3];
96 uint32_t stack_error_event_hdr;
97 uint32_t stack_error_event_data;
98 uint32_t reserved4[4];
99 uint32_t ppu_error_event_hdr;
100 uint32_t ppu_error_event_data;
101 uint32_t reserved5[4];
102 uint32_t isp_error_event_hdr;
103 uint32_t isp_error_event_data;
104 uint32_t reserved6[4];
105 uint32_t sys_reset_event_hdr;
106 uint32_t reserved7[5];
107 uint32_t fw_exception_hdr;
108 uint32_t reserved8[5];
110 uint32_t reserved9[5];
111 uint32_t fw_non_fatal_hdr;
112 uint32_t reserved10[5];
113 uint32_t fw_fatal_hdr;
114 uint32_t reserved11[5];
115 uint32_t twi_mrpc_comp_hdr;
116 uint32_t twi_mrpc_comp_data;
117 uint32_t reserved12[4];
118 uint32_t twi_mrpc_comp_async_hdr;
119 uint32_t twi_mrpc_comp_async_data;
120 uint32_t reserved13[4];
121 uint32_t cli_mrpc_comp_hdr;
122 uint32_t cli_mrpc_comp_data;
123 uint32_t reserved14[4];
124 uint32_t cli_mrpc_comp_async_hdr;
125 uint32_t cli_mrpc_comp_async_data;
126 uint32_t reserved15[4];
127 uint32_t gpio_interrupt_hdr;
128 uint32_t gpio_interrupt_data;
129 uint32_t reserved16[4];
131 uint32_t gfms_event_data;
132 uint32_t reserved17[4];
133 uint32_t reserved18[60];
134 struct event customer_events[6];
135 uint32_t reserved19[320];
139 SWITCHTEC_CFG0_RUNNING = 0x04,
140 SWITCHTEC_CFG1_RUNNING = 0x05,
141 SWITCHTEC_IMG0_RUNNING = 0x03,
142 SWITCHTEC_IMG1_RUNNING = 0x07,
147 uint32_t device_version;
148 uint32_t firmware_version;
150 uint32_t vendor_table_revision;
151 uint32_t table_format_version;
152 uint32_t partition_id;
153 uint32_t cfg_file_fmt_version;
154 uint16_t cfg_running;
155 uint16_t img_running;
156 uint32_t reserved2[57];
159 char product_revision[4];
160 char component_vendor[8];
161 uint16_t component_id;
162 uint8_t component_revision;
166 uint32_t flash_part_map_upd_idx;
170 uint32_t build_version;
171 uint32_t build_string;
178 uint32_t flash_length;
196 uint32_t usp_port_mode;
197 uint32_t usp_pff_inst_id;
198 uint32_t vep_pff_inst_id;
199 uint32_t dsp_pff_inst_id[47];
200 uint32_t reserved1[11];
201 uint16_t vep_vector_number;
202 uint16_t usp_vector_number;
203 uint32_t port_event_bitmap;
204 uint32_t reserved2[3];
205 uint32_t part_event_summary;
206 uint32_t reserved3[3];
207 uint32_t part_reset_hdr;
208 uint32_t part_reset_data[5];
209 uint32_t mrpc_comp_hdr;
210 uint32_t mrpc_comp_data[5];
211 uint32_t mrpc_comp_async_hdr;
212 uint32_t mrpc_comp_async_data[5];
213 uint32_t dyn_binding_hdr;
214 uint32_t dyn_binding_data[5];
215 uint32_t reserved4[120];
216 struct event customer_events[6];
217 uint32_t reserved5[3];
221 SWITCHTEC_NTB_REG_INFO_OFFSET = 0x0000,
222 SWITCHTEC_NTB_REG_CTRL_OFFSET = 0x4000,
223 SWITCHTEC_NTB_REG_DBMSG_OFFSET = 0x64000,
227 uint8_t partition_count;
228 uint8_t partition_id;
231 uint16_t requester_id;
235 NTB_CTRL_PART_OP_LOCK = 0x1,
236 NTB_CTRL_PART_OP_CFG = 0x2,
237 NTB_CTRL_PART_OP_RESET = 0x3,
239 NTB_CTRL_PART_STATUS_NORMAL = 0x1,
240 NTB_CTRL_PART_STATUS_LOCKED = 0x2,
241 NTB_CTRL_PART_STATUS_LOCKING = 0x3,
242 NTB_CTRL_PART_STATUS_CONFIGURING = 0x4,
243 NTB_CTRL_PART_STATUS_RESETTING = 0x5,
245 NTB_CTRL_BAR_VALID = 1 << 0,
246 NTB_CTRL_BAR_DIR_WIN_EN = 1 << 4,
247 NTB_CTRL_BAR_LUT_WIN_EN = 1 << 5,
249 NTB_CTRL_REQ_ID_EN = 1 << 0,
251 NTB_CTRL_LUT_EN = 1 << 0,
253 NTB_PART_CTRL_ID_PROT_DIS = 1 << 0,
257 uint32_t partition_status;
258 uint32_t partition_op;
259 uint32_t partition_ctrl;
262 uint16_t lut_table_entries;
263 uint16_t lut_table_offset;
265 uint16_t req_id_table_size;
266 uint16_t req_id_table_offset;
267 uint32_t req_id_error;
268 uint32_t reserved1[7];
274 uint32_t reserved2[216];
275 uint32_t req_id_table[256];
276 uint32_t reserved3[512];
277 uint64_t lut_entry[512];
280 #define NTB_DBMSG_IMSG_STATUS BIT_ULL(32) 281 #define NTB_DBMSG_IMSG_MASK BIT_ULL(40) 284 uint32_t reserved1[1024];
289 uint8_t idb_vec_map[64];
305 uint8_t reserved3[3928];
306 uint8_t msix_table[1024];
307 uint8_t reserved4[3072];
309 uint8_t reserved5[4072];
315 uint8_t __pad_info[SWITCHTEC_NTB_REG_CTRL_OFFSET -
316 SWITCHTEC_NTB_REG_INFO_OFFSET];
321 uint8_t __pad_ctrl[SWITCHTEC_NTB_REG_DBMSG_OFFSET -
322 SWITCHTEC_NTB_REG_CTRL_OFFSET];
329 SWITCHTEC_PART_CFG_EVENT_RESET = 1 << 0,
330 SWITCHTEC_PART_CFG_EVENT_MRPC_CMP = 1 << 1,
331 SWITCHTEC_PART_CFG_EVENT_MRPC_ASYNC_CMP = 1 << 2,
332 SWITCHTEC_PART_CFG_EVENT_DYN_PART_CMP = 1 << 3,
338 uint32_t pci_cfg_header[15];
339 uint32_t pci_cap_region[48];
340 uint32_t pcie_cap_region[448];
341 uint32_t indirect_gas_window[128];
342 uint32_t indirect_gas_window_off;
343 uint32_t reserved[127];
344 uint32_t pff_event_summary;
345 uint32_t reserved2[3];
346 uint32_t aer_in_p2p_hdr;
347 uint32_t aer_in_p2p_data[5];
348 uint32_t aer_in_vep_hdr;
349 uint32_t aer_in_vep_data[5];
351 uint32_t dpc_data[5];
353 uint32_t cts_data[5];
355 uint32_t uec_data[5];
356 uint32_t hotplug_hdr;
357 uint32_t hotplug_data[5];
359 uint32_t ier_data[5];
360 uint32_t threshold_hdr;
361 uint32_t threshold_data[5];
362 uint32_t power_mgmt_hdr;
363 uint32_t power_mgmt_data[5];
364 uint32_t tlp_throttling_hdr;
365 uint32_t tlp_throttling_data[5];
366 uint32_t force_speed_hdr;
367 uint32_t force_speed_data[5];
368 uint32_t credit_timeout_hdr;
369 uint32_t credit_timeout_data[5];
370 uint32_t link_state_hdr;
371 uint32_t link_state_data[5];
372 uint32_t reserved3[66];
373 struct event customer_events[6];
374 uint32_t reserved4[72];
380 uint8_t __pad_mrpc[SWITCHTEC_GAS_TOP_CFG_OFFSET];
385 uint8_t __pad_top_cfg[SWITCHTEC_GAS_SW_EVENT_OFFSET -
386 SWITCHTEC_GAS_TOP_CFG_OFFSET];
391 uint8_t __pad_sw_event[SWITCHTEC_GAS_SYS_INFO_OFFSET -
392 SWITCHTEC_GAS_SW_EVENT_OFFSET];
397 uint8_t __pad_sys_info[SWITCHTEC_GAS_FLASH_INFO_OFFSET -
398 SWITCHTEC_GAS_SYS_INFO_OFFSET];
403 uint8_t __pad_flash_info[SWITCHTEC_GAS_PART_CFG_OFFSET -
404 SWITCHTEC_GAS_FLASH_INFO_OFFSET];
409 uint8_t __pad_part_cfg[SWITCHTEC_GAS_NTB_OFFSET -
410 SWITCHTEC_GAS_PART_CFG_OFFSET];
415 uint8_t __pad_ntb[SWITCHTEC_GAS_PFF_CSR_OFFSET -
416 SWITCHTEC_GAS_NTB_OFFSET];
uint32_t gfms_event_hdr
Event specific for PAX.