From a801fcf53301760bc456217d1e6a0790a840bc1f Mon Sep 17 00:00:00 2001 From: Louis Stermole Date: Thu, 16 Jan 2020 13:32:19 -0500 Subject: Fix exp_draminit to print response structure and error code when training fails Change-Id: Ia02b9261c03b24d799cf96cd655aace3b52b0481 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89761 Reviewed-by: RYAN P KING Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: STEPHEN GLANCY Reviewed-by: Mark Pizzutillo Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89795 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M Crowell --- .../procedures/hwp/memory/lib/exp_draminit_utils.C | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C index bb4595806..25a23285a 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018,2019 */ +/* Contributors Listed Below - COPYRIGHT 2018,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -324,6 +324,8 @@ fapi2::ReturnCode check_host_fw_response(const fapi2::Target& i_ const host_fw_response_struct& i_rsp, const host_fw_command_struct& i_cmd) { + fapi2::buffer l_error_code; + + l_error_code.insertFromRight<0, BITS_PER_BYTE>(i_rsp.response_argument[4]). + insertFromRight(i_rsp.response_argument[3]). + insertFromRight<2 * BITS_PER_BYTE, BITS_PER_BYTE>(i_rsp.response_argument[2]). + insertFromRight<3 * BITS_PER_BYTE, BITS_PER_BYTE>(i_rsp.response_argument[1]); + // Check if cmd was successful FAPI_ASSERT(i_rsp.response_argument[0] == omi::response_arg::SUCCESS && i_rsp.request_identifier == i_cmd.request_identifier, fapi2::MSS_EXP_RSP_ARG_FAILED(). set_TARGET(i_target). set_RSP_ID(i_rsp.response_id). - set_ERROR_CODE(i_rsp.response_argument[1]). + set_ERROR_CODE(l_error_code). set_EXPECTED_REQID(i_cmd.request_identifier). set_ACTUAL_REQID(i_rsp.request_identifier), - "Failed to initialize the PHY for %s, response=0x%X " + "Failed to initialize the PHY for %s, response=0x%X, error_code=0x%08X " "RSP RQ ID: %u CMD RQ ID: %u", - mss::c_str(i_target), i_rsp.response_argument[0], i_rsp.request_identifier, i_cmd.request_identifier); + mss::c_str(i_target), i_rsp.response_argument[0], l_error_code, + i_rsp.request_identifier, i_cmd.request_identifier); return fapi2::FAPI2_RC_SUCCESS; -- cgit v1.2.1