summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep09
diff options
context:
space:
mode:
authorChris Steffen <cwsteffen@us.ibm.com>2016-08-23 09:16:28 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-09-09 14:04:23 -0400
commit00afe5381181cd79773a6b99a1a79e361b2ceaa1 (patch)
tree9c69663397cc53c4ea6dd54f7f64cc954a4c790d /src/usr/isteps/istep09
parent7e9dbe112504b4767c404c35f3bb6c5216d5eed0 (diff)
downloadblackbird-hostboot-00afe5381181cd79773a6b99a1a79e361b2ceaa1.tar.gz
blackbird-hostboot-00afe5381181cd79773a6b99a1a79e361b2ceaa1.zip
P9 I/O Xbus Dccal/Linktrain Update
Dccal - Added a mode flag to pick which calibration needs to be run. - Updated to shorten timers for simulation - Updated wrapper to call the dccal procedure multiple times. Linktrain - Updated linktraining to shorten timers for simulation Change-Id: I455d335182d5840e2f9534de5e95563ecd4c34c7 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29007 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Gary A. Peterson <garyp@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29008 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep09')
-rw-r--r--src/usr/isteps/istep09/call_fabric_io_dccal.C393
-rw-r--r--src/usr/isteps/istep09/call_fabric_io_run_training.C29
-rw-r--r--src/usr/isteps/istep09/makefile7
3 files changed, 345 insertions, 84 deletions
diff --git a/src/usr/isteps/istep09/call_fabric_io_dccal.C b/src/usr/isteps/istep09/call_fabric_io_dccal.C
index 0dbfd9d48..45c32fc6d 100644
--- a/src/usr/isteps/istep09/call_fabric_io_dccal.C
+++ b/src/usr/isteps/istep09/call_fabric_io_dccal.C
@@ -70,7 +70,7 @@ using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
using namespace TARGETING;
-using namespace HWAS;
+
//
// Wrapper function to call fabric_io_dccal
//
@@ -115,85 +115,350 @@ void* call_fabric_io_dccal( void *io_pArgs )
break;
}
+ //This HWP is broken into substeps, we want to deconfigure
+ //bad targets if one of the substeps fails so check this error
+ // between each substep.
+ bool l_subStepError = false;
+
for (const auto & l_PbusConnection: l_PbusConnections)
{
- const TARGETING::Target* l_thisPbusTarget = l_PbusConnection.first;
- const TARGETING::Target* l_connectedPbusTarget =
- l_PbusConnection.second;
+ bool l_firstTargetValid = true;
+ bool l_secondTargetValid = true;
- const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
- l_thisPbusFapi2Target(
- (const_cast<TARGETING::Target*>(l_thisPbusTarget)));
+ //Set up fapi2 targets for each end of the connections
+ const TARGETING::Target* l_firstPbusTarget = l_PbusConnection.first;
+ const TARGETING::Target* l_secondPbusTarget = l_PbusConnection.second;
const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
- l_connectedPbusFapi2Target(
- (const_cast<TARGETING::Target*>(l_connectedPbusTarget)));
+ l_firstPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_firstPbusTarget)));
+ const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
+ l_secondPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_secondPbusTarget)));
// group is either 0 or 1
- uint8_t l_group = 0;
- for (l_group = 0; l_group < 2; l_group++)
+ std::vector<uint8_t> l_groups = {0,1};
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP on "
+ "this %cbus target %.8X on all groups",
+ (ii ? 'X' : 'O'),
+ TARGETING::get_huid(l_firstPbusTarget) );
+
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::TxZcalRunBus,
+ l_firstPbusFapi2Target,
+ l_groups[0] );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_firstPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ l_errl = NULL;
+
+ //Note that the first target is invalid
+ l_firstTargetValid = false;
+ //Note that this substep had an error
+ l_subStepError = true;
+
+ }
+
+ if(l_firstTargetValid)
+ {
+ for(auto l_group : l_groups)
+ {
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::TxZcalSetGrp,
+ l_firstPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_firstPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ l_errl = NULL;
+ //Note that this target is invalid
+ l_firstTargetValid = false;
+ //Note that this substep had an error
+ l_subStepError = true;
+ //if any of the groups have an error just break out
+ break;
+ }
+ }
+ }
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP on "
+ "this %cbus target %.8X on all groups",
+ (ii ? 'X' : 'O'),
+ TARGETING::get_huid(l_secondPbusTarget) );
+
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::TxZcalRunBus,
+ l_secondPbusFapi2Target,
+ l_groups[0] );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_secondPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ l_errl = NULL;
+ // Note that the second target is invalid
+ l_secondTargetValid = false;
+ // Note that an error was detected during this substep
+ l_subStepError = true;
+
+ }
+
+ if(l_secondTargetValid)
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Running p9_io_xbus_dccal HWP on "
- "this %cbus target %.8X, group %d",
- (ii ? 'X' : 'O'),
- TARGETING::get_huid(l_thisPbusTarget), l_group );
-
- FAPI_INVOKE_HWP( l_errl, p9_io_xbus_dccal,
- l_thisPbusFapi2Target, l_group );
-
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "%s : %cbus connection p9_io_xbus_dccal "
- "with group %d. Target 0x%.8X",
- (l_errl ? "ERROR" : "SUCCESS"), (ii ? 'X' : 'O'),
- l_group, TARGETING::get_huid(l_thisPbusTarget) );
- if ( l_errl )
+ for(auto l_group : l_groups)
{
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_thisPbusTarget).addToLog(l_errl);
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::TxZcalSetGrp,
+ l_secondPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_secondPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+
+ //set l_errl to null for future use
+ l_errl = NULL;
+
+ //one of the channels is bad on this target, its not valid
+ l_secondTargetValid = false;
- // Create IStep error log and cross ref error that occurred
- l_StepError.addErrorDetails( l_errl );
+ //if any errors were found on this substep, we will skip the remainder
+ l_subStepError = true;
- // Commit Error
- errlCommit( l_errl, HWPF_COMP_ID );
- // We want to continue the training despite the error, so
- // no break
- l_errl = NULL;
+ //if any of the groups have an error just break out
+ break;
+ }
}
+ }
+ }
+
+ if(l_subStepError)
+ {
+ //Try the next connection set
+ continue;
+ }
+
+ for (const auto & l_PbusConnection: l_PbusConnections)
+ {
+ //Initially assume both targets are valid
+ uint8_t l_firstTargetValid = true;
+ uint8_t l_secondTargetValid = true;
+
+ //Set up fapi2 targets for each end of the connections
+ const TARGETING::Target* l_firstPbusTarget = l_PbusConnection.first;
+ const TARGETING::Target* l_secondPbusTarget = l_PbusConnection.second;
+
+ const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
+ l_firstPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_firstPbusTarget)));
+ const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
+ l_secondPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_secondPbusTarget)));
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Running p9_io_xbus_dccal HWP on "
- "connected %cbus target %.8X, group %d",
+ // group is either 0 or 1
+ std::vector<uint8_t> l_groups = {0,1};
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP with mode = %.8X on "
+ "this %cbus target %.8X on all groups",
(ii ? 'X' : 'O'),
- TARGETING::get_huid(l_connectedPbusTarget), l_group );
-
- // call the HWP with each bus connection
- FAPI_INVOKE_HWP( l_errl, p9_io_xbus_dccal,
- l_connectedPbusFapi2Target, l_group);
-
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "%s : %cbus connection p9_io_xbus_dccal "
- "with group %d. Target 0x%.8X",
- (l_errl ? "ERROR" : "SUCCESS"), (ii ? 'X' : 'O'),
- l_group, TARGETING::get_huid(l_connectedPbusTarget) );
- if ( l_errl )
+ XbusDccalMode::RxDccalStartGrp,
+ TARGETING::get_huid(l_firstPbusTarget) );
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP with mode = %.8X on "
+ "this %cbus target %.8X on all groups",
+ (ii ? 'X' : 'O'),
+ XbusDccalMode::RxDccalStartGrp,
+ TARGETING::get_huid(l_secondPbusTarget) );
+
+ for(auto l_group : l_groups)
+ {
+ if(l_firstTargetValid)
+ {
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::RxDccalStartGrp,
+ l_firstPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_firstPbusTarget).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ l_errl = NULL;
+
+ //Note the error on this substep
+ l_subStepError = true;
+ //Note that first target is invalid for next group
+ l_firstTargetValid = false;
+ }
+ }
+
+ if(l_secondTargetValid)
+ {
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::RxDccalStartGrp,
+ l_secondPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_secondPbusTarget).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ l_errl = NULL;
+
+ //Note the error on this substep
+ l_subStepError = true;
+ //Note that second target is invalid for next group
+ l_secondTargetValid = false;
+ }
+ }
+ }
+ }
+
+ if(l_subStepError)
+ {
+ //Try the next connection set
+ continue;
+ }
+
+ for (const auto & l_PbusConnection: l_PbusConnections)
+ {
+ //Initially assume both targets are valid
+ uint8_t l_firstTargetValid = true;
+ uint8_t l_secondTargetValid = true;
+
+ //Set up fapi2 targets for each end of the connections
+ const TARGETING::Target* l_firstPbusTarget = l_PbusConnection.first;
+ const TARGETING::Target* l_secondPbusTarget = l_PbusConnection.second;
+
+ const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
+ l_firstPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_firstPbusTarget)));
+ const fapi2::Target <fapi2::TARGET_TYPE_XBUS>
+ l_secondPbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_secondPbusTarget)));
+
+ // group is either 0 or 1
+ std::vector<uint8_t> l_groups = {0,1};
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP with mode = %.8X on "
+ "this %cbus target %.8X on all groups",
+ (ii ? 'X' : 'O'),
+ XbusDccalMode::RxDccalCheckGrp,
+ TARGETING::get_huid(l_firstPbusFapi2Target) );
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_dccal HWP with mode = %.8X on "
+ "this %cbus target %.8X on all groups",
+ (ii ? 'X' : 'O'),
+ XbusDccalMode::RxDccalCheckGrp,
+ TARGETING::get_huid(l_secondPbusFapi2Target) );
+
+ for(auto l_group : l_groups)
+ {
+ if(l_firstTargetValid)
{
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_connectedPbusTarget).
- addToLog(l_errl);
-
- // Create IStep error log and cross ref error that occurred
- l_StepError.addErrorDetails( l_errl );
-
- // Commit Error
- errlCommit( l_errl, HWPF_COMP_ID );
- // We want to continue the training despite the error, so
- // no break
- l_errl = NULL;
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::RxDccalCheckGrp,
+ l_firstPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_firstPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ // We want to continue the training despite the error, so
+ // no break
+ l_errl = NULL;
+ //Note that first target is invalid for next group
+ l_firstTargetValid = false;
+ }
}
- } // end of groups
- } // end of connection TYPE combinations
+
+ if(l_secondTargetValid)
+ {
+ FAPI_INVOKE_HWP( l_errl,
+ p9_io_xbus_dccal,
+ XbusDccalMode::RxDccalCheckGrp,
+ l_secondPbusFapi2Target,
+ l_group );
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_secondPbusFapi2Target).addToLog(l_errl);
+
+ // Create IStep error log and cross ref error that occurred
+ l_StepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ // We want to continue the training despite the error, so
+ // no break
+ l_errl = NULL;
+ //Note that second target is invalid for next group
+ l_secondTargetValid = false;
+ }
+ }
+ }
+ }
} // end of connection set loop
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
diff --git a/src/usr/isteps/istep09/call_fabric_io_run_training.C b/src/usr/isteps/istep09/call_fabric_io_run_training.C
index 65b424106..4746a63ff 100644
--- a/src/usr/isteps/istep09/call_fabric_io_run_training.C
+++ b/src/usr/isteps/istep09/call_fabric_io_run_training.C
@@ -210,44 +210,37 @@ uint8_t run_linktraining(
uint8_t o_failures = 0;
errlHndl_t l_errl = NULL;
- // clock group is either 0 or 1
- // need to train both groups and allow for them to differ
- uint8_t l_this_group = 0;
- uint8_t l_connected_group = 0;
- uint8_t l_group_loop = 0;
- for (l_group_loop = 0; l_group_loop < 4; l_group_loop++)
+ // group is either 0 or 1
+ std::vector<uint8_t> l_groups = {0,1};
+
+ for (auto l_group : l_groups)
{
- l_this_group = l_group_loop / 2; // 0, 0, 1, 1
- l_connected_group = l_group_loop % 2; // 0, 1, 1, 0
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_io_xbus_linktrain HWP on "
- "master target %.8X group %d and "
- "slave target %.8X group %d.",
+ "master target %.8X and "
+ "slave target %.8X on group %d.",
TARGETING::get_huid(i_master_target),
- l_this_group,
TARGETING::get_huid(i_slave_target),
- l_connected_group );
+ l_group );
FAPI_INVOKE_HWP(l_errl,
p9_io_xbus_linktrain,
i_master_target,
- l_this_group,
i_slave_target,
- l_connected_group);
+ l_group);
if (l_errl)
{
o_failures++;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Failure #%d) ERROR 0x%.8X : p9_io_xbus_linktrain "
- "HWP on master target %.8X group %d and "
- "slave target %.8X group %d.",
+ "HWP on master target %.8X and "
+ "slave target %.8X on group %d.",
o_failures, l_errl->reasonCode(),
TARGETING::get_huid(i_master_target),
- l_this_group,
TARGETING::get_huid(i_slave_target),
- l_connected_group );
+ l_group );
// capture the target data in the elog
ErrlUserDetailsTarget(i_master_target).addToLog( l_errl );
diff --git a/src/usr/isteps/istep09/makefile b/src/usr/isteps/istep09/makefile
index ed5690307..20d8f435d 100644
--- a/src/usr/isteps/istep09/makefile
+++ b/src/usr/isteps/istep09/makefile
@@ -53,13 +53,16 @@ include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_restore_erepair.mk
include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_pdwn_lanes.mk
# fabric_io_dccal
-include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_dccal.mk
+#p9_io_xbus_dccal.mk has includes we dont need so manually add the .o
+OBJS+= p9_io_xbus_dccal.o
+include ${PROCEDURES_PATH}/hwp/io/p9_io_common.mk
# fabric_pre_trainadv
include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_pre_trainadv.mk
# fabric_io_run_training
-include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_linktrain.mk
+#p9_io_xbus_linktrain.mk has includes we dont need so manually add the .o
+OBJS+= p9_io_xbus_linktrain.o
include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_clear_firs.mk
# fabric_post_trainadv
OpenPOWER on IntegriCloud