Skip to content

Commit

Permalink
SBE:Putring: Added more debug information
Browse files Browse the repository at this point in the history
Change-Id: I20ef41aec0492544ee84963b12701e8d5f410f79
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41668
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: PARVATHI RACHAKONDA <prachako@in.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41669
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
prasrang authored and sgupta2m committed Sep 20, 2017
1 parent e52f9ab commit c765315
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/import/chips/p9/procedures/xml/error_info/hwpErrors.mk
Expand Up @@ -80,3 +80,4 @@ ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_fastarray_errors.xml
ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_suspend_io_errors.xml
ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_ppe_utils.xml
ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_suspend_powman_errors.xml
ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_ring_errors.xml
@@ -0,0 +1,55 @@
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: src/import/chips/p9/procedures/xml/error_info/p9_sbe_ring_errors.xml $ -->
<!-- -->
<!-- OpenPOWER sbe Project -->
<!-- -->
<!-- Contributors Listed Below - COPYRIGHT 2017 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
<!-- implied. See the License for the specific language governing -->
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->

<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<sbeError/>
<rc>RC_P9_PUTRING_CHECKWORD_DATA_MISMATCH</rc>
<description>putring failed due to checkword mismatch</description>
<ffdc>TARGET</ffdc>
<ffdc>CHIPLET_ID</ffdc>
<ffdc>SCOM_ADDRESS</ffdc>
<ffdc>SCOM_DATA</ffdc>
<ffdc>BITS_DECODED</ffdc>
<ffdc>RINGID</ffdc>
<ffdc>RINGMODE</ffdc>
<ffdc>RETURN_CODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<sbeError/>
<rc>RC_P9_PUTRING_OPCG_DONE_TIMEOUT</rc>
<description>putring failed due to opcg done timeout</description>
<ffdc>TARGET</ffdc>
<ffdc>CHIPLET_ID</ffdc>
<ffdc>SCOM_ADDRESS</ffdc>
<ffdc>SCOM_DATA</ffdc>
<ffdc>ROTATE_COUNT</ffdc>
<ffdc>RINGID</ffdc>
<ffdc>RETURN_CODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
</hwpErrors>
37 changes: 31 additions & 6 deletions src/import/chips/p9/utils/p9_putRingUtils.C
Expand Up @@ -219,7 +219,8 @@ fapi2::ReturnCode standardScan(
const uint8_t i_chipletId,
opType_t i_operation,
uint64_t i_opVal,
uint64_t i_scanData)
uint64_t i_scanData,
const uint16_t i_ringId)
{
FAPI_INF(">> standardScan");

Expand Down Expand Up @@ -332,7 +333,16 @@ fapi2::ReturnCode standardScan(
{
l_rc = fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
FAPI_ERR("Max attempts exceeded checking OPCG_DONE");
break;
FAPI_ASSERT(false,
fapi2::P9_PUTRING_OPCG_DONE_TIMEOUT()
.set_TARGET(l_parent)
.set_CHIPLET_ID(l_chiplet)
.set_SCOM_ADDRESS(l_scomAddress)
.set_SCOM_DATA(l_scomData)
.set_ROTATE_COUNT(l_rotateCount)
.set_RINGID(i_ringId)
.set_RETURN_CODE(l_rc),
"ROTATE operation failed due to timeout");
}
}// end of for loop
}
Expand Down Expand Up @@ -362,6 +372,8 @@ fapi2::ReturnCode standardScan(
}
while(0);

fapi_try_exit:

FAPI_INF("<< standardScan");
return l_rc;
}
Expand Down Expand Up @@ -546,9 +558,21 @@ fapi2::ReturnCode verifyHeader(const fapi2::Target<fapi2::TARGET_TYPE_ALL>&

if(l_readHeader != i_header)
{
FAPI_ERR("Read header(%016x) data incorrect", uint64_t(l_readHeader));
FAPI_ERR("Read CHECKWORD (%016x) data incorrect and total bit decoded 0x%016x",
uint64_t(l_readHeader), (uint64_t)i_bitsDecoded);
l_rc = fapi2::FAPI2_RC_PLAT_ERR_RING_HEADER_CHECK;
break;
FAPI_ASSERT(false,
fapi2::P9_PUTRING_CHECKWORD_DATA_MISMATCH()
.set_TARGET(i_target)
.set_CHIPLET_ID(l_chiplet)
.set_SCOM_ADDRESS(l_scomAddress)
.set_SCOM_DATA(l_readHeader)
.set_BITS_DECODED(i_bitsDecoded)
.set_RINGID(i_ringId)
.set_RINGMODE(i_ringMode)
.set_RETURN_CODE(l_rc),
"CHECKWORD DATA mismatch");

}

if ((i_ringMode & fapi2::RING_MODE_SET_PULSE_NSL))
Expand All @@ -565,14 +589,15 @@ fapi2::ReturnCode verifyHeader(const fapi2::Target<fapi2::TARGET_TYPE_ALL>&

if(l_rc != fapi2::FAPI2_RC_SUCCESS)
{
FAPI_ERR("Error during writing header %016x", l_header);
FAPI_ERR("Error during writing header %016x for NSL mode", l_header);
break;
}

}
}
while(0);

fapi_try_exit:
return l_rc;

}
Expand Down Expand Up @@ -1449,7 +1474,7 @@ fapi2::ReturnCode rs4DecompressionSvc(
}

// Verify header
l_rc = verifyHeader(i_target, l_header, l_chipletId, i_ringMode);
l_rc = verifyHeader(i_target, l_header, l_chipletId, i_ringMode, l_bitsDecoded, l_ringId);

if(l_rc)
{
Expand Down
4 changes: 3 additions & 1 deletion src/import/chips/p9/utils/p9_putRingUtils.H
Expand Up @@ -141,13 +141,15 @@ void getRingProperties(const RingID i_ringId,
/// @param[in] i_operation Type of operation to perform - ROTATE/SCAN
/// @param[in] i_opVal Number of bits for the operation
/// @param[in] i_scanData This value has to be scanned when i_operation is SCAN
/// @param[in] i_ringId Ring id value for debug info
/// @return FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode standardScan(
const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target,
const uint8_t i_chipletId,
opType_t i_operation,
uint64_t i_opVal,
uint64_t i_scanData = 0);
uint64_t i_scanData = 0,
const uint16_t i_ringId = 0);

/// @brief Function to set the Scan Region
/// @param[in] i_target Chiplet Target of Scan
Expand Down

0 comments on commit c765315

Please sign in to comment.