src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_grc_dump_mcp_hw_dump(struct ecore_hwfn *p_hwfn,
				    struct ecore_ptt *p_ptt,
				    u32 *dump_buf, bool dump)
{
	u32 hw_dump_offset_bytes = 0, hw_dump_size_bytes = 0;
	u32 hw_dump_size_dwords = 0, offset = 0;
	enum dbg_status status;

	/* Read HW dump image from NVRAM */
	status = qed_find_nvram_image(p_hwfn,
				      p_ptt,
				      NVM_TYPE_HW_DUMP_OUT,
				      &hw_dump_offset_bytes,
				      &hw_dump_size_bytes);
	if (status != DBG_STATUS_OK)
		return 0;

	hw_dump_size_dwords = BYTES_TO_DWORDS(hw_dump_size_bytes);

	/* Dump HW dump image section */
	offset += qed_dump_section_hdr(dump_buf + offset,
				       dump, "mcp_hw_dump", 1);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "size", hw_dump_size_dwords);

	/* Read MCP HW dump image into dump buffer */
	if (dump && hw_dump_size_dwords) {
		status = qed_nvram_read(p_hwfn,
					p_ptt,
					hw_dump_offset_bytes,
					hw_dump_size_bytes, dump_buf + offset);
		if (status != DBG_STATUS_OK) {
			DP_NOTICE(p_hwfn, false,
				  "Failed to read MCP HW Dump image from NVRAM\n");
			return 0;
		}
	}
	offset += hw_dump_size_dwords;

	return offset;
}
/* Dumps the MCP HW dump from NVRAM. Returns the dumped size in dwords. */
Dumps the MCP HW dump from NVRAM. Returns the dumped size in dwords.
Dumps the MCP HW dump from NVRAM . Returns the dumped size in dwords .
static u32 qed_grc_dump_mcp_hw_dump(struct ecore_hwfn *p_hwfn,
				    struct ecore_ptt *p_ptt,
				    u32 *dump_buf, bool dump)
{
	u32 hw_dump_offset_bytes = 0, hw_dump_size_bytes = 0;
	u32 hw_dump_size_dwords = 0, offset = 0;
	enum dbg_status status;
	status = qed_find_nvram_image(p_hwfn,
				      p_ptt,
				      NVM_TYPE_HW_DUMP_OUT,
				      &hw_dump_offset_bytes,
				      &hw_dump_size_bytes);
	if (status != DBG_STATUS_OK)
		return 0;
	hw_dump_size_dwords = BYTES_TO_DWORDS(hw_dump_size_bytes);
	offset += qed_dump_section_hdr(dump_buf + offset,
				       dump, "mcp_hw_dump", 1);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "size", hw_dump_size_dwords);
	if (dump && hw_dump_size_dwords) {
		status = qed_nvram_read(p_hwfn,
					p_ptt,
					hw_dump_offset_bytes,
					hw_dump_size_bytes, dump_buf + offset);
		if (status != DBG_STATUS_OK) {
			DP_NOTICE(p_hwfn, false,
				  "Failed to read MCP HW Dump image from NVRAM\n");
			return 0;
		}
	}
	offset += hw_dump_size_dwords;
	return offset;
}
static u32 qed_grc_dump_mcp_hw_dump ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump ) { u32 hw_dump_offset_bytes = 0 , hw_dump_size_bytes = 0 ; u32 hw_dump_size_dwords = 0 , offset = 0 ; enum dbg_status status ; status = qed_find_nvram_image ( p_hwfn , p_ptt , NVM_TYPE_HW_DUMP_OUT , & hw_dump_offset_bytes , & hw_dump_size_bytes ) ; if ( status != DBG_STATUS_OK ) return 0 ; hw_dump_size_dwords = BYTES_TO_DWORDS ( hw_dump_size_bytes ) ; offset += qed_dump_section_hdr ( dump_buf + offset , dump , " " , 1 ) ; offset += qed_dump_num_param ( dump_buf + offset , dump , " " , hw_dump_size_dwords ) ; if ( dump && hw_dump_size_dwords ) { status = qed_nvram_read ( p_hwfn , p_ptt , hw_dump_offset_bytes , hw_dump_size_bytes , dump_buf + offset ) ; if ( status != DBG_STATUS_OK ) { DP_NOTICE ( p_hwfn , false , " \n " ) ; return 0 ; } } offset += hw_dump_size_dwords ; return offset ; }
Dumps the MCP HW dump from NVRAM.
Dumps the MCP HW dump from NVRAM .
/* Read HW dump image from NVRAM */ /* Dump HW dump image section */ /* Read MCP HW dump image into dump buffer */