src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_grc_dump_memories(struct ecore_hwfn *p_hwfn,
				 struct ecore_ptt *p_ptt,
				 u32 *dump_buf, bool dump)
{
	struct virt_mem_desc *dbg_buf =
	    &p_hwfn->dbg_arrays[BIN_BUF_DBG_DUMP_MEM];
	u32 offset = 0, input_offset = 0;

	while (input_offset < BYTES_TO_DWORDS(dbg_buf->size)) {
		const struct dbg_dump_split_hdr *split_hdr;
		struct virt_mem_desc curr_input_mems_arr;
		enum init_split_types split_type;
		u32 split_data_size;

		split_hdr =
		    (const struct dbg_dump_split_hdr *)dbg_buf->ptr +
		    input_offset++;
		split_type = GET_FIELD(split_hdr->hdr,
				       DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID);
		split_data_size = GET_FIELD(split_hdr->hdr,
					    DBG_DUMP_SPLIT_HDR_DATA_SIZE);
		curr_input_mems_arr.ptr = (u32 *)dbg_buf->ptr + input_offset;
		curr_input_mems_arr.size = DWORDS_TO_BYTES(split_data_size);

		if (split_type == SPLIT_TYPE_NONE)
			offset += qed_grc_dump_mem_entries(p_hwfn,
							   p_ptt,
							   curr_input_mems_arr,
							   dump_buf + offset,
							   dump);
		else
			DP_NOTICE(p_hwfn, false,
				  "Dumping split memories is currently not supported\n");

		input_offset += split_data_size;
	}

	return offset;
}
/* Dumps GRC memories according to the input array dump_mem.
 * Returns the dumped size in dwords.
 */
Dumps GRC memories according to the input array dump_mem.
Returns the dumped size in dwords.
Dumps GRC memories according to the input array dump_mem . Returns the dumped size in dwords .
static u32 qed_grc_dump_memories(struct ecore_hwfn *p_hwfn,
				 struct ecore_ptt *p_ptt,
				 u32 *dump_buf, bool dump)
{
	struct virt_mem_desc *dbg_buf =
	    &p_hwfn->dbg_arrays[BIN_BUF_DBG_DUMP_MEM];
	u32 offset = 0, input_offset = 0;
	while (input_offset < BYTES_TO_DWORDS(dbg_buf->size)) {
		const struct dbg_dump_split_hdr *split_hdr;
		struct virt_mem_desc curr_input_mems_arr;
		enum init_split_types split_type;
		u32 split_data_size;
		split_hdr =
		    (const struct dbg_dump_split_hdr *)dbg_buf->ptr +
		    input_offset++;
		split_type = GET_FIELD(split_hdr->hdr,
				       DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID);
		split_data_size = GET_FIELD(split_hdr->hdr,
					    DBG_DUMP_SPLIT_HDR_DATA_SIZE);
		curr_input_mems_arr.ptr = (u32 *)dbg_buf->ptr + input_offset;
		curr_input_mems_arr.size = DWORDS_TO_BYTES(split_data_size);
		if (split_type == SPLIT_TYPE_NONE)
			offset += qed_grc_dump_mem_entries(p_hwfn,
							   p_ptt,
							   curr_input_mems_arr,
							   dump_buf + offset,
							   dump);
		else
			DP_NOTICE(p_hwfn, false,
				  "Dumping split memories is currently not supported\n");
		input_offset += split_data_size;
	}
	return offset;
}
static u32 qed_grc_dump_memories ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump ) { struct virt_mem_desc * dbg_buf = & p_hwfn -> dbg_arrays [ BIN_BUF_DBG_DUMP_MEM ] ; u32 offset = 0 , input_offset = 0 ; while ( input_offset < BYTES_TO_DWORDS ( dbg_buf -> size ) ) { const struct dbg_dump_split_hdr * split_hdr ; struct virt_mem_desc curr_input_mems_arr ; enum init_split_types split_type ; u32 split_data_size ; split_hdr = ( const struct dbg_dump_split_hdr * ) dbg_buf -> ptr + input_offset ++ ; split_type = GET_FIELD ( split_hdr -> hdr , DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID ) ; split_data_size = GET_FIELD ( split_hdr -> hdr , DBG_DUMP_SPLIT_HDR_DATA_SIZE ) ; curr_input_mems_arr . ptr = ( u32 * ) dbg_buf -> ptr + input_offset ; curr_input_mems_arr . size = DWORDS_TO_BYTES ( split_data_size ) ; if ( split_type == SPLIT_TYPE_NONE ) offset += qed_grc_dump_mem_entries ( p_hwfn , p_ptt , curr_input_mems_arr , dump_buf + offset , dump ) ; else DP_NOTICE ( p_hwfn , false , " \n " ) ; input_offset += split_data_size ; } return offset ; }
Dumps GRC memories according to the input array dump_mem.
Dumps GRC memories according to the input array dump_mem .