Lines Matching refs:offset
1048 u32 offset = 0; in qed_dump_str_param() local
1051 offset += qed_dump_str(char_buf + offset, dump, param_name); in qed_dump_str_param()
1055 *(char_buf + offset) = 1; in qed_dump_str_param()
1056 offset++; in qed_dump_str_param()
1059 offset += qed_dump_str(char_buf + offset, dump, param_val); in qed_dump_str_param()
1062 offset += qed_dump_align(char_buf + offset, dump, offset); in qed_dump_str_param()
1064 return BYTES_TO_DWORDS(offset); in qed_dump_str_param()
1074 u32 offset = 0; in qed_dump_num_param() local
1077 offset += qed_dump_str(char_buf + offset, dump, param_name); in qed_dump_num_param()
1081 *(char_buf + offset) = 0; in qed_dump_num_param()
1082 offset++; in qed_dump_num_param()
1085 offset += qed_dump_align(char_buf + offset, dump, offset); in qed_dump_num_param()
1088 offset = BYTES_TO_DWORDS(offset); in qed_dump_num_param()
1090 *(dump_buf + offset) = param_val; in qed_dump_num_param()
1091 offset++; in qed_dump_num_param()
1093 return offset; in qed_dump_num_param()
1106 u32 offset = 0; in qed_dump_fw_ver_param() local
1130 offset += qed_dump_str_param(dump_buf + offset, in qed_dump_fw_ver_param()
1132 offset += qed_dump_str_param(dump_buf + offset, in qed_dump_fw_ver_param()
1134 offset += qed_dump_num_param(dump_buf + offset, dump, "fw-timestamp", in qed_dump_fw_ver_param()
1137 return offset; in qed_dump_fw_ver_param()
1231 u32 offset = 0; in qed_dump_common_global_params() local
1237 offset += qed_dump_section_hdr(dump_buf + offset, in qed_dump_common_global_params()
1241 offset += qed_dump_fw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump); in qed_dump_common_global_params()
1242 offset += qed_dump_mfw_ver_param(p_hwfn, in qed_dump_common_global_params()
1243 p_ptt, dump_buf + offset, dump); in qed_dump_common_global_params()
1244 offset += qed_dump_chip_revision_param(p_hwfn, in qed_dump_common_global_params()
1245 p_ptt, dump_buf + offset, dump); in qed_dump_common_global_params()
1246 offset += qed_dump_num_param(dump_buf + offset, in qed_dump_common_global_params()
1248 offset += qed_dump_str_param(dump_buf + offset, in qed_dump_common_global_params()
1252 offset += qed_dump_str_param(dump_buf + offset, in qed_dump_common_global_params()
1256 offset += qed_dump_num_param(dump_buf + offset, in qed_dump_common_global_params()
1259 offset += qed_dump_num_param(dump_buf + offset, in qed_dump_common_global_params()
1262 return offset; in qed_dump_common_global_params()
1268 static u32 qed_dump_last_section(u32 *dump_buf, u32 offset, bool dump) in qed_dump_last_section() argument
1270 u32 start_offset = offset; in qed_dump_last_section()
1273 offset += qed_dump_section_hdr(dump_buf + offset, dump, "last", 0); in qed_dump_last_section()
1277 *(dump_buf + offset) = ~crc32(0xffffffff, in qed_dump_last_section()
1279 DWORDS_TO_BYTES(offset)); in qed_dump_last_section()
1281 offset++; in qed_dump_last_section()
1283 return offset - start_offset; in qed_dump_last_section()
1756 u32 offset = 0; in qed_grc_dump_regs_hdr() local
1758 offset += qed_dump_section_hdr(dump_buf + offset, in qed_grc_dump_regs_hdr()
1760 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_regs_hdr()
1762 offset += qed_dump_str_param(dump_buf + offset, in qed_grc_dump_regs_hdr()
1766 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_regs_hdr()
1769 offset += qed_dump_str_param(dump_buf + offset, in qed_grc_dump_regs_hdr()
1772 return offset; in qed_grc_dump_regs_hdr()
1945 u32 offset = 0; in qed_grc_dump_reg_entry() local
1947 offset += qed_grc_dump_reg_entry_hdr(dump_buf, dump, addr, len); in qed_grc_dump_reg_entry()
1948 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_reg_entry()
1950 dump_buf + offset, in qed_grc_dump_reg_entry()
1954 return offset; in qed_grc_dump_reg_entry()
1972 u32 offset = 0, reg_offset = 0; in qed_grc_dump_reg_entry_skip() local
1974 offset += qed_grc_dump_reg_entry_hdr(dump_buf, dump, addr, total_len); in qed_grc_dump_reg_entry_skip()
1977 return offset + total_len; in qed_grc_dump_reg_entry_skip()
1982 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_reg_entry_skip()
1984 dump_buf + offset, in qed_grc_dump_reg_entry_skip()
1992 memset(dump_buf + offset, 0, DWORDS_TO_BYTES(curr_len)); in qed_grc_dump_reg_entry_skip()
1993 offset += curr_len; in qed_grc_dump_reg_entry_skip()
1999 return offset; in qed_grc_dump_reg_entry_skip()
2013 u32 i, offset = 0, input_offset = 0; in qed_grc_dump_regs_entries() local
2051 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_regs_entries()
2053 dump_buf + offset, in qed_grc_dump_regs_entries()
2063 return offset; in qed_grc_dump_regs_entries()
2078 u32 num_dumped_reg_entries, offset; in qed_grc_dump_split_data() local
2088 offset = qed_grc_dump_regs_hdr(dump_buf, in qed_grc_dump_split_data()
2095 offset += qed_grc_dump_regs_entries(p_hwfn, in qed_grc_dump_split_data()
2098 dump_buf + offset, in qed_grc_dump_split_data()
2113 return num_dumped_reg_entries > 0 ? offset : 0; in qed_grc_dump_split_data()
2129 u32 offset = 0, input_offset = 0; in qed_grc_dump_registers() local
2172 offset += qed_grc_dump_split_data(p_hwfn, p_ptt, in qed_grc_dump_registers()
2174 dump_buf + offset, in qed_grc_dump_registers()
2192 return offset; in qed_grc_dump_registers()
2200 u32 offset = 0, num_regs = 0; in qed_grc_dump_reset_regs() local
2204 offset += qed_grc_dump_regs_hdr(dump_buf, in qed_grc_dump_reset_regs()
2220 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_reset_regs()
2222 dump_buf + offset, in qed_grc_dump_reset_regs()
2235 return offset; in qed_grc_dump_reset_regs()
2246 u32 block_id, offset = 0, stall_regs_offset; in qed_grc_dump_modified_regs() local
2252 offset += qed_grc_dump_regs_hdr(dump_buf, in qed_grc_dump_modified_regs()
2285 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_modified_regs()
2287 dump_buf + offset, in qed_grc_dump_modified_regs()
2294 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_modified_regs()
2296 dump_buf + offset, in qed_grc_dump_modified_regs()
2313 stall_regs_offset = offset; in qed_grc_dump_modified_regs()
2314 offset += qed_grc_dump_regs_hdr(dump_buf, in qed_grc_dump_modified_regs()
2329 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_modified_regs()
2331 dump_buf + offset, in qed_grc_dump_modified_regs()
2346 return offset; in qed_grc_dump_modified_regs()
2354 u32 offset = 0, addr; in qed_grc_dump_special_regs() local
2356 offset += qed_grc_dump_regs_hdr(dump_buf, in qed_grc_dump_special_regs()
2363 offset += qed_grc_dump_reg_entry_skip(p_hwfn, in qed_grc_dump_special_regs()
2365 dump_buf + offset, in qed_grc_dump_special_regs()
2372 offset += in qed_grc_dump_special_regs()
2375 dump_buf + offset, in qed_grc_dump_special_regs()
2382 return offset; in qed_grc_dump_special_regs()
2408 u32 offset = 0; in qed_grc_dump_mem_hdr() local
2421 offset += qed_dump_section_hdr(dump_buf + offset, in qed_grc_dump_mem_hdr()
2434 offset += qed_dump_str_param(dump_buf + offset, in qed_grc_dump_mem_hdr()
2440 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_mem_hdr()
2445 offset += qed_dump_num_param(dump_buf + offset, dump, "len", len); in qed_grc_dump_mem_hdr()
2449 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_mem_hdr()
2454 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_mem_hdr()
2466 offset += qed_dump_str_param(dump_buf + offset, dump, "type", buf); in qed_grc_dump_mem_hdr()
2468 return offset; in qed_grc_dump_mem_hdr()
2487 u32 offset = 0; in qed_grc_dump_mem() local
2489 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_mem()
2490 dump_buf + offset, in qed_grc_dump_mem()
2497 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_mem()
2499 dump_buf + offset, in qed_grc_dump_mem()
2503 return offset; in qed_grc_dump_mem()
2512 u32 i, offset = 0, input_offset = 0; in qed_grc_dump_mem_entries() local
2582 offset += qed_grc_dump_mem(p_hwfn, in qed_grc_dump_mem_entries()
2584 dump_buf + offset, in qed_grc_dump_mem_entries()
2597 return offset; in qed_grc_dump_mem_entries()
2609 u32 offset = 0, input_offset = 0; in qed_grc_dump_memories() local
2628 offset += qed_grc_dump_mem_entries(p_hwfn, in qed_grc_dump_memories()
2631 dump_buf + offset, in qed_grc_dump_memories()
2640 return offset; in qed_grc_dump_memories()
2658 u32 rd_reg_addr, offset = 0; in qed_grc_dump_ctx_data() local
2668 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_ctx_data()
2669 dump_buf + offset, in qed_grc_dump_ctx_data()
2678 return offset + total_size; in qed_grc_dump_ctx_data()
2687 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_ctx_data()
2689 dump_buf + offset, in qed_grc_dump_ctx_data()
2698 return offset; in qed_grc_dump_ctx_data()
2705 u32 offset = 0; in qed_grc_dump_ctx() local
2714 offset += qed_grc_dump_ctx_data(p_hwfn, in qed_grc_dump_ctx()
2716 dump_buf + offset, in qed_grc_dump_ctx()
2723 offset += qed_grc_dump_ctx_data(p_hwfn, in qed_grc_dump_ctx()
2725 dump_buf + offset, in qed_grc_dump_ctx()
2732 offset += qed_grc_dump_ctx_data(p_hwfn, in qed_grc_dump_ctx()
2734 dump_buf + offset, in qed_grc_dump_ctx()
2741 offset += qed_grc_dump_ctx_data(p_hwfn, in qed_grc_dump_ctx()
2743 dump_buf + offset, in qed_grc_dump_ctx()
2750 return offset; in qed_grc_dump_ctx()
2836 u32 row, offset = 0; in qed_grc_dump_vfc_cam() local
2838 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_vfc_cam()
2839 dump_buf + offset, in qed_grc_dump_vfc_cam()
2848 return offset + total_size; in qed_grc_dump_vfc_cam()
2856 offset += qed_grc_dump_read_from_vfc(p_hwfn, in qed_grc_dump_vfc_cam()
2864 dump_buf + offset); in qed_grc_dump_vfc_cam()
2867 return offset; in qed_grc_dump_vfc_cam()
2881 u32 row, offset = 0; in qed_grc_dump_vfc_ram() local
2883 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_vfc_ram()
2884 dump_buf + offset, in qed_grc_dump_vfc_ram()
2895 return offset + total_size; in qed_grc_dump_vfc_ram()
2904 offset += qed_grc_dump_read_from_vfc(p_hwfn, in qed_grc_dump_vfc_ram()
2912 dump_buf + offset); in qed_grc_dump_vfc_ram()
2915 return offset; in qed_grc_dump_vfc_ram()
2923 u32 offset = 0; in qed_grc_dump_vfc() local
2932 offset += qed_grc_dump_vfc_cam(p_hwfn, in qed_grc_dump_vfc()
2934 dump_buf + offset, in qed_grc_dump_vfc()
2939 offset += qed_grc_dump_vfc_ram(p_hwfn, in qed_grc_dump_vfc()
2941 dump_buf + offset, in qed_grc_dump_vfc()
2947 return offset; in qed_grc_dump_vfc()
2955 u32 offset = 0; in qed_grc_dump_rss() local
2970 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_rss()
2971 dump_buf + offset, in qed_grc_dump_rss()
2982 offset += total_dwords; in qed_grc_dump_rss()
2992 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_rss()
2994 dump_buf + offset, in qed_grc_dump_rss()
3005 return offset; in qed_grc_dump_rss()
3014 u32 block_size, ram_size, offset = 0, reg_val, i; in qed_grc_dump_big_ram() local
3031 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_big_ram()
3032 dump_buf + offset, in qed_grc_dump_big_ram()
3042 return offset + ram_size; in qed_grc_dump_big_ram()
3052 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_big_ram()
3054 dump_buf + offset, in qed_grc_dump_big_ram()
3061 return offset; in qed_grc_dump_big_ram()
3069 u32 offset = 0, addr; in qed_grc_dump_mcp() local
3080 offset += qed_grc_dump_mem(p_hwfn, in qed_grc_dump_mcp()
3082 dump_buf + offset, in qed_grc_dump_mcp()
3090 offset += qed_grc_dump_mem(p_hwfn, in qed_grc_dump_mcp()
3092 dump_buf + offset, in qed_grc_dump_mcp()
3101 offset += qed_grc_dump_registers(p_hwfn, in qed_grc_dump_mcp()
3103 dump_buf + offset, in qed_grc_dump_mcp()
3107 offset += qed_grc_dump_regs_hdr(dump_buf + offset, in qed_grc_dump_mcp()
3111 offset += qed_grc_dump_reg_entry(p_hwfn, in qed_grc_dump_mcp()
3113 dump_buf + offset, in qed_grc_dump_mcp()
3123 return offset; in qed_grc_dump_mcp()
3132 u32 offset = 0, tbus_lo_offset, tbus_hi_offset; in qed_grc_dump_phy() local
3156 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_phy()
3157 dump_buf + offset, in qed_grc_dump_phy()
3165 offset += PHY_DUMP_SIZE_DWORDS; in qed_grc_dump_phy()
3169 bytes_buf = (u8 *)(dump_buf + offset); in qed_grc_dump_phy()
3187 offset += PHY_DUMP_SIZE_DWORDS; in qed_grc_dump_phy()
3190 return offset; in qed_grc_dump_phy()
3210 u32 hw_dump_size_dwords = 0, offset = 0; in qed_grc_dump_mcp_hw_dump() local
3225 offset += qed_dump_section_hdr(dump_buf + offset, in qed_grc_dump_mcp_hw_dump()
3227 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump_mcp_hw_dump()
3235 hw_dump_size_bytes, dump_buf + offset); in qed_grc_dump_mcp_hw_dump()
3242 offset += hw_dump_size_dwords; in qed_grc_dump_mcp_hw_dump()
3244 return offset; in qed_grc_dump_mcp_hw_dump()
3253 u32 block_id, line_id, offset = 0, addr, len; in qed_grc_dump_static_debug() local
3309 offset += qed_grc_dump_mem_hdr(p_hwfn, in qed_grc_dump_static_debug()
3310 dump_buf + offset, in qed_grc_dump_static_debug()
3318 offset += block_dwords; in qed_grc_dump_static_debug()
3324 memset(dump_buf + offset, 0, in qed_grc_dump_static_debug()
3326 offset += block_dwords; in qed_grc_dump_static_debug()
3346 offset += qed_grc_dump_addr_range(p_hwfn, in qed_grc_dump_static_debug()
3348 dump_buf + offset, in qed_grc_dump_static_debug()
3367 return offset; in qed_grc_dump_static_debug()
3379 u32 dwords_read, offset = 0; in qed_grc_dump() local
3391 offset += qed_dump_common_global_params(p_hwfn, in qed_grc_dump()
3393 dump_buf + offset, dump, 4); in qed_grc_dump()
3394 offset += qed_dump_str_param(dump_buf + offset, in qed_grc_dump()
3396 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump()
3400 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump()
3404 offset += qed_dump_num_param(dump_buf + offset, in qed_grc_dump()
3409 offset += qed_grc_dump_reset_regs(p_hwfn, in qed_grc_dump()
3411 dump_buf + offset, dump); in qed_grc_dump()
3434 offset += qed_grc_dump_modified_regs(p_hwfn, in qed_grc_dump()
3436 dump_buf + offset, dump); in qed_grc_dump()
3453 offset += qed_grc_dump_registers(p_hwfn, in qed_grc_dump()
3456 offset, in qed_grc_dump()
3461 offset += qed_grc_dump_special_regs(p_hwfn, in qed_grc_dump()
3463 dump_buf + offset, dump); in qed_grc_dump()
3467 offset += qed_grc_dump_memories(p_hwfn, p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3471 offset += qed_grc_dump_mcp(p_hwfn, in qed_grc_dump()
3472 p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3476 offset += qed_grc_dump_ctx(p_hwfn, in qed_grc_dump()
3477 p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3481 offset += qed_grc_dump_rss(p_hwfn, in qed_grc_dump()
3482 p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3487 offset += qed_grc_dump_big_ram(p_hwfn, in qed_grc_dump()
3489 dump_buf + offset, in qed_grc_dump()
3495 p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3496 offset += dwords_read; in qed_grc_dump()
3505 offset += qed_grc_dump_phy(p_hwfn, in qed_grc_dump()
3506 p_ptt, dump_buf + offset, dump); in qed_grc_dump()
3511 offset += qed_grc_dump_mcp_hw_dump(p_hwfn, in qed_grc_dump()
3513 dump_buf + offset, dump); in qed_grc_dump()
3519 offset += qed_grc_dump_static_debug(p_hwfn, in qed_grc_dump()
3521 dump_buf + offset, dump); in qed_grc_dump()
3524 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_grc_dump()
3539 *num_dumped_dwords = offset; in qed_grc_dump()
3559 u32 i, next_reg_offset = 0, offset = 0; in qed_idle_chk_dump_failure() local
3580 offset += IDLE_CHK_RESULT_HDR_DWORDS; in qed_idle_chk_dump_failure()
3588 (struct dbg_idle_chk_result_reg_hdr *)(dump_buf + offset); in qed_idle_chk_dump_failure()
3592 offset += IDLE_CHK_RESULT_REG_HDR_DWORDS + in qed_idle_chk_dump_failure()
3597 offset += IDLE_CHK_RESULT_REG_HDR_DWORDS; in qed_idle_chk_dump_failure()
3608 for (i = 0; i < reg_hdr->size; i++, next_reg_offset++, offset++) in qed_idle_chk_dump_failure()
3609 dump_buf[offset] = cond_reg_values[next_reg_offset]; in qed_idle_chk_dump_failure()
3619 offset += IDLE_CHK_RESULT_REG_HDR_DWORDS + reg->size; in qed_idle_chk_dump_failure()
3636 (dump_buf + offset); in qed_idle_chk_dump_failure()
3659 offset += IDLE_CHK_RESULT_REG_HDR_DWORDS; in qed_idle_chk_dump_failure()
3668 offset += qed_grc_dump_addr_range(p_hwfn, in qed_idle_chk_dump_failure()
3670 dump_buf + offset, in qed_idle_chk_dump_failure()
3678 return offset; in qed_idle_chk_dump_failure()
3690 u32 i, offset = 0; in qed_idle_chk_dump_rule_entries() local
3740 dump_buf + offset, in qed_idle_chk_dump_rule_entries()
3747 offset += num_reg_entries * entry_dump_size; in qed_idle_chk_dump_rule_entries()
3807 offset += qed_idle_chk_dump_failure(p_hwfn, in qed_idle_chk_dump_rule_entries()
3809 dump_buf + offset, in qed_idle_chk_dump_rule_entries()
3820 return offset; in qed_idle_chk_dump_rule_entries()
3831 u32 num_failing_rules_offset, offset = 0, in qed_idle_chk_dump() local
3835 offset += qed_dump_common_global_params(p_hwfn, in qed_idle_chk_dump()
3837 dump_buf + offset, dump, 1); in qed_idle_chk_dump()
3838 offset += qed_dump_str_param(dump_buf + offset, in qed_idle_chk_dump()
3842 offset += qed_dump_section_hdr(dump_buf + offset, dump, "idle_chk", 1); in qed_idle_chk_dump()
3843 num_failing_rules_offset = offset; in qed_idle_chk_dump()
3844 offset += qed_dump_num_param(dump_buf + offset, dump, "num_rules", 0); in qed_idle_chk_dump()
3872 offset += in qed_idle_chk_dump()
3876 offset, in qed_idle_chk_dump()
3893 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_idle_chk_dump()
3895 return offset; in qed_idle_chk_dump()
4102 u32 trace_meta_size_dwords = 0, running_bundle_id, offset = 0; in qed_mcp_trace_dump() local
4121 offset += qed_dump_common_global_params(p_hwfn, in qed_mcp_trace_dump()
4123 dump_buf + offset, dump, 1); in qed_mcp_trace_dump()
4124 offset += qed_dump_str_param(dump_buf + offset, in qed_mcp_trace_dump()
4143 offset += qed_dump_section_hdr(dump_buf + offset, in qed_mcp_trace_dump()
4145 offset += qed_dump_num_param(dump_buf + offset, in qed_mcp_trace_dump()
4149 offset += qed_grc_dump_addr_range(p_hwfn, in qed_mcp_trace_dump()
4151 dump_buf + offset, in qed_mcp_trace_dump()
4162 offset += qed_dump_section_hdr(dump_buf + offset, in qed_mcp_trace_dump()
4182 offset += qed_dump_num_param(dump_buf + offset, in qed_mcp_trace_dump()
4191 dump_buf + offset); in qed_mcp_trace_dump()
4193 offset += trace_meta_size_dwords; in qed_mcp_trace_dump()
4196 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_mcp_trace_dump()
4198 *num_dumped_dwords = offset; in qed_mcp_trace_dump()
4212 u32 dwords_read, size_param_offset, offset = 0, addr, len; in qed_reg_fifo_dump() local
4218 offset += qed_dump_common_global_params(p_hwfn, in qed_reg_fifo_dump()
4220 dump_buf + offset, dump, 1); in qed_reg_fifo_dump()
4221 offset += qed_dump_str_param(dump_buf + offset, in qed_reg_fifo_dump()
4227 offset += qed_dump_section_hdr(dump_buf + offset, in qed_reg_fifo_dump()
4229 size_param_offset = offset; in qed_reg_fifo_dump()
4230 offset += qed_dump_num_param(dump_buf + offset, dump, "size", 0); in qed_reg_fifo_dump()
4236 offset += REG_FIFO_DEPTH_DWORDS; in qed_reg_fifo_dump()
4253 offset += qed_grc_dump_addr_range(p_hwfn, in qed_reg_fifo_dump()
4255 dump_buf + offset, in qed_reg_fifo_dump()
4269 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_reg_fifo_dump()
4271 *num_dumped_dwords = offset; in qed_reg_fifo_dump()
4282 u32 dwords_read, size_param_offset, offset = 0, addr, len; in qed_igu_fifo_dump() local
4288 offset += qed_dump_common_global_params(p_hwfn, in qed_igu_fifo_dump()
4290 dump_buf + offset, dump, 1); in qed_igu_fifo_dump()
4291 offset += qed_dump_str_param(dump_buf + offset, in qed_igu_fifo_dump()
4297 offset += qed_dump_section_hdr(dump_buf + offset, in qed_igu_fifo_dump()
4299 size_param_offset = offset; in qed_igu_fifo_dump()
4300 offset += qed_dump_num_param(dump_buf + offset, dump, "size", 0); in qed_igu_fifo_dump()
4306 offset += IGU_FIFO_DEPTH_DWORDS; in qed_igu_fifo_dump()
4323 offset += qed_grc_dump_addr_range(p_hwfn, in qed_igu_fifo_dump()
4325 dump_buf + offset, in qed_igu_fifo_dump()
4339 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_igu_fifo_dump()
4341 *num_dumped_dwords = offset; in qed_igu_fifo_dump()
4353 u32 size_param_offset, override_window_dwords, offset = 0, addr; in qed_protection_override_dump() local
4358 offset += qed_dump_common_global_params(p_hwfn, in qed_protection_override_dump()
4360 dump_buf + offset, dump, 1); in qed_protection_override_dump()
4361 offset += qed_dump_str_param(dump_buf + offset, in qed_protection_override_dump()
4367 offset += qed_dump_section_hdr(dump_buf + offset, in qed_protection_override_dump()
4369 size_param_offset = offset; in qed_protection_override_dump()
4370 offset += qed_dump_num_param(dump_buf + offset, dump, "size", 0); in qed_protection_override_dump()
4373 offset += PROTECTION_OVERRIDE_DEPTH_DWORDS; in qed_protection_override_dump()
4383 offset += qed_grc_dump_addr_range(p_hwfn, in qed_protection_override_dump()
4385 dump_buf + offset, in qed_protection_override_dump()
4395 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_protection_override_dump()
4397 *num_dumped_dwords = offset; in qed_protection_override_dump()
4412 u32 offset = 0; in qed_fw_asserts_dump() local
4416 offset += qed_dump_common_global_params(p_hwfn, in qed_fw_asserts_dump()
4418 dump_buf + offset, dump, 1); in qed_fw_asserts_dump()
4419 offset += qed_dump_str_param(dump_buf + offset, in qed_fw_asserts_dump()
4438 offset += qed_dump_section_hdr(dump_buf + offset, in qed_fw_asserts_dump()
4440 offset += qed_dump_str_param(dump_buf + offset, in qed_fw_asserts_dump()
4442 offset += qed_dump_num_param(dump_buf + offset, in qed_fw_asserts_dump()
4449 offset += asserts->list_element_dword_size; in qed_fw_asserts_dump()
4467 offset += in qed_fw_asserts_dump()
4469 dump_buf + offset, in qed_fw_asserts_dump()
4476 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_fw_asserts_dump()
4478 return offset; in qed_fw_asserts_dump()
4491 u32 page_id, end_page_id, offset = 0; in qed_ilt_dump_pages_range() local
4494 return offset; in qed_ilt_dump_pages_range()
4513 *(dump_buf + offset) = page_id; in qed_ilt_dump_pages_range()
4514 offset++; in qed_ilt_dump_pages_range()
4518 memcpy(dump_buf + offset, in qed_ilt_dump_pages_range()
4520 offset += BYTES_TO_DWORDS(mem_desc->size); in qed_ilt_dump_pages_range()
4524 return offset; in qed_ilt_dump_pages_range()
4539 u32 pf_start_line, start_page_id, offset = 0; in qed_ilt_dump_pages_section() local
4556 offset += in qed_ilt_dump_pages_section()
4557 qed_dump_section_hdr(dump_buf + offset, dump, section_name, 1); in qed_ilt_dump_pages_section()
4560 size_param_offset = offset; in qed_ilt_dump_pages_section()
4561 offset += qed_dump_num_param(dump_buf + offset, dump, "size", 0); in qed_ilt_dump_pages_section()
4562 base_data_offset = offset; in qed_ilt_dump_pages_section()
4574 offset += qed_ilt_dump_pages_range(dump_buf + offset, in qed_ilt_dump_pages_section()
4584 offset += qed_ilt_dump_pages_range(dump_buf + offset, in qed_ilt_dump_pages_section()
4603 offset += qed_ilt_dump_pages_range(dump_buf + offset, in qed_ilt_dump_pages_section()
4614 offset += qed_ilt_dump_pages_range(dump_buf + offset, in qed_ilt_dump_pages_section()
4625 dump, "size", offset - base_data_offset); in qed_ilt_dump_pages_section()
4627 return offset; in qed_ilt_dump_pages_section()
4637 u32 valid_conn_vf_cids, valid_conn_vf_pages, offset = 0; in qed_ilt_dump() local
4653 offset += qed_dump_common_global_params(p_hwfn, p_ptt, in qed_ilt_dump()
4654 dump_buf + offset, dump, 22); in qed_ilt_dump()
4655 offset += qed_dump_str_param(dump_buf + offset, in qed_ilt_dump()
4657 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4660 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4664 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4668 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4673 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4678 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4682 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4685 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4689 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4693 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4697 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4701 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4705 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4709 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4713 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4717 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4721 offset += /* 18 */ qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4725 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4728 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4732 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4736 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4745 offset += qed_dump_section_hdr(dump_buf + offset, in qed_ilt_dump()
4747 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4750 conn_type < NUM_OF_CONNECTION_TYPES_E4; conn_type++, offset++) { in qed_ilt_dump()
4755 *(dump_buf + offset) = num_pf_cids; in qed_ilt_dump()
4760 offset += qed_dump_section_hdr(dump_buf + offset, in qed_ilt_dump()
4762 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4765 conn_type < NUM_OF_CONNECTION_TYPES_E4; conn_type++, offset++) { in qed_ilt_dump()
4770 *(dump_buf + offset) = num_vf_cids; in qed_ilt_dump()
4776 offset += qed_dump_section_hdr(dump_buf + offset, in qed_ilt_dump()
4778 offset += qed_dump_num_param(dump_buf + offset, in qed_ilt_dump()
4788 page_id++, offset += PAGE_MEM_DESC_SIZE_DWORDS) in qed_ilt_dump()
4789 memcpy(dump_buf + offset, in qed_ilt_dump()
4793 offset += num_pages * PAGE_MEM_DESC_SIZE_DWORDS; in qed_ilt_dump()
4802 offset += qed_ilt_dump_pages_section(p_hwfn, in qed_ilt_dump()
4803 dump_buf + offset, in qed_ilt_dump()
4810 offset += qed_ilt_dump_pages_section(p_hwfn, in qed_ilt_dump()
4811 dump_buf + offset, in qed_ilt_dump()
4818 offset += qed_dump_last_section(dump_buf, offset, dump); in qed_ilt_dump()
4820 return offset; in qed_ilt_dump()
4835 (u32 *)(bin_ptr + buf_hdrs[buf_id].offset), in qed_dbg_set_bin_ptr()
5893 u32 *offset, in qed_read_from_cyclic_buf() argument
5905 val_ptr[i] = bytes_buf[*offset]; in qed_read_from_cyclic_buf()
5906 *offset = qed_cyclic_add(*offset, 1, buf_size); in qed_read_from_cyclic_buf()
5915 static u8 qed_read_byte_from_buf(void *buf, u32 *offset) in qed_read_byte_from_buf() argument
5917 return ((u8 *)buf)[(*offset)++]; in qed_read_byte_from_buf()
5923 static u32 qed_read_dword_from_buf(void *buf, u32 *offset) in qed_read_dword_from_buf() argument
5925 u32 dword_val = *(u32 *)&((u8 *)buf)[*offset]; in qed_read_dword_from_buf()
5927 *offset += 4; in qed_read_dword_from_buf()
5935 static void qed_read_str_from_buf(void *buf, u32 *offset, u32 size, char *dest) in qed_read_str_from_buf() argument
5937 const char *source_str = &((const char *)buf)[*offset]; in qed_read_str_from_buf()
5941 *offset += size; in qed_read_str_from_buf()
5947 static char *qed_get_buf_ptr(void *buf, u32 offset) in qed_get_buf_ptr() argument
5949 return buf ? (char *)buf + offset : s_temp_buf; in qed_get_buf_ptr()
5962 size_t offset = 0; in qed_read_param() local
5966 offset += strlen(*param_name) + 1; in qed_read_param()
5969 if (*(char_buf + offset++)) { in qed_read_param()
5971 *param_str_val = char_buf + offset; in qed_read_param()
5973 offset += strlen(*param_str_val) + 1; in qed_read_param()
5974 if (offset & 0x3) in qed_read_param()
5975 offset += (4 - (offset & 0x3)); in qed_read_param()
5979 if (offset & 0x3) in qed_read_param()
5980 offset += (4 - (offset & 0x3)); in qed_read_param()
5981 *param_num_val = *(u32 *)(char_buf + offset); in qed_read_param()
5982 offset += 4; in qed_read_param()
5985 return (u32)offset / 4; in qed_read_param()
6328 u32 offset = 0, signature, i; in qed_mcp_trace_alloc_meta_data() local
6343 signature = qed_read_dword_from_buf(meta_buf_bytes, &offset); in qed_mcp_trace_alloc_meta_data()
6348 meta->modules_num = qed_read_byte_from_buf(meta_buf_bytes, &offset); in qed_mcp_trace_alloc_meta_data()
6356 u8 module_len = qed_read_byte_from_buf(meta_buf_bytes, &offset); in qed_mcp_trace_alloc_meta_data()
6365 qed_read_str_from_buf(meta_buf_bytes, &offset, module_len, in qed_mcp_trace_alloc_meta_data()
6372 signature = qed_read_dword_from_buf(meta_buf_bytes, &offset); in qed_mcp_trace_alloc_meta_data()
6377 meta->formats_num = qed_read_dword_from_buf(meta_buf_bytes, &offset); in qed_mcp_trace_alloc_meta_data()
6390 &offset); in qed_mcp_trace_alloc_meta_data()
6401 &offset, in qed_mcp_trace_alloc_meta_data()
6547 u32 offset, results_offset, results_buf_bytes; in qed_parse_mcp_trace_dump() local
6584 offset = trace->trace_oldest; in qed_parse_mcp_trace_dump()
6585 data_size = qed_cyclic_sub(trace->trace_prod, offset, trace->size); in qed_parse_mcp_trace_dump()
6622 offset, in qed_parse_mcp_trace_dump()
7084 (u32 *)(bin_ptr + buf_hdrs[buf_id].offset), in qed_dbg_user_set_bin_ptr()
7806 u32 offset = 0, feature_size; in qed_dbg_all_data() local
7826 rc = qed_dbg_idle_chk(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7829 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7832 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7838 rc = qed_dbg_idle_chk(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7841 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7844 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7850 rc = qed_dbg_reg_fifo(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7853 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7856 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7862 rc = qed_dbg_igu_fifo(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7865 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7868 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7874 rc = qed_dbg_protection_override(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7878 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7882 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7890 rc = qed_dbg_fw_asserts(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7893 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7897 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7906 rc = qed_dbg_ilt(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7909 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7914 offset += feature_size + REGDUMP_HEADER_SIZE; in qed_dbg_all_data()
7927 rc = qed_dbg_grc(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7930 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7934 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7943 rc = qed_dbg_mcp_trace(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
7946 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7949 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7960 (u8 *)buffer + offset + in qed_dbg_all_data()
7964 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7967 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7976 (u8 *)buffer + offset + REGDUMP_HEADER_SIZE, in qed_dbg_all_data()
7979 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7982 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
7992 (u8 *)buffer + offset + REGDUMP_HEADER_SIZE, in qed_dbg_all_data()
7995 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
7998 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()
8006 rc = qed_dbg_nvm_image(cdev, (u8 *)buffer + offset + in qed_dbg_all_data()
8010 *(u32 *)((u8 *)buffer + offset) = in qed_dbg_all_data()
8013 offset += (feature_size + REGDUMP_HEADER_SIZE); in qed_dbg_all_data()