Skip to content

Commit

Permalink
wrap test: Use MNFG_FLAGS instead of compile time flag
Browse files Browse the repository at this point in the history
Change-Id: I347075dd2424ee8b96805456b3d7d9962f428b64
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58347
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Prachi Gupta authored and dcrowell77 committed May 7, 2018
1 parent 1af47d2 commit 3c73a7c
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 92 deletions.
5 changes: 0 additions & 5 deletions src/HBconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,3 @@ config SUPPORT_PARTIAL_CACHE
help
Support chips that do not have full cache --
intended for early bringup of hardware

config SMP_WRAP_TEST
defaults y
help
Enables SMP Wrap configuration for manufacturing testing
4 changes: 2 additions & 2 deletions src/build/mkrules/hbfw/img/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ ZZ2U_HBD_IMG = ${HBFW_TARGPATH:FZZ-2U_hb_targeting.bin}
ZEPPELIN_HBD_IMG = ${HBFW_TARGPATH:FZEPPELIN_hb_targeting.bin}
# Create list of images for each node (in node order)
# genPnorImages will handle multiple HBD=binfile pairs
FLEETWOOD_HBD_IMGS = HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_0_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_1_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_2_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_3_hb_targeting.bin}:P}
FLEETWOOD_HBD_IMGS = HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_0_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_1_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_2_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_node_3_hb_targeting.bin}:P},HBD=${${HBFW_TARGPATH:FFLEETWOOD_MST_node_0_hb_targeting.bin}:P}

# Input fake images
NIMBUS_VPO_HBD_IMG = vbu_NIMBUS_targeting.bin
Expand Down Expand Up @@ -382,7 +382,7 @@ FLEETWOOD_MEMD_FINAL_IMG = FLEETWOOD.MEMD.bin
# defined in fipsfs.db.
ZZ_HBD_FINAL_IMG = ZZ.HBD.bin
ZEPPELIN_HBD_FINAL_IMG = ZEPPELIN.HBD.bin
FLEETWOOD_HBD_FINAL_IMGS = FLEETWOOD.HBD_NODE_0.bin,FLEETWOOD.HBD_NODE_1.bin,FLEETWOOD.HBD_NODE_2.bin,FLEETWOOD.HBD_NODE_3.bin
FLEETWOOD_HBD_FINAL_IMGS = FLEETWOOD.HBD_NODE_0.bin,FLEETWOOD.HBD_NODE_1.bin,FLEETWOOD.HBD_NODE_2.bin,FLEETWOOD.HBD_NODE_3.bin,FLEETWOOD_MST.HBD_NODE_0.bin
ZZ2U_HBD_FINAL_IMG = ZZ-2U.HBD.bin


Expand Down
18 changes: 18 additions & 0 deletions src/include/usr/initservice/initserviceif.H
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,24 @@ inline bool spBaseServicesEnabled()
return spBaseServicesEnabled;
}

/**
* @brief Returns if we are in smp wrap config
*
* If true then we are running in wrap config
*
* @return bool - true if wrap config, else false
*/
inline bool isSMPWrapConfig()
{
TARGETING::Target * sys {nullptr};
TARGETING::targetService().getTopLevelTarget( sys );
TARGETING::ATTR_MNFG_FLAGS_type mnfg_flags;
return
( sys &&
sys->tryGetAttr<TARGETING::ATTR_MNFG_FLAGS>(mnfg_flags) &&
(mnfg_flags & TARGETING::MNFG_FLAG_BRAZOS_WRAP_CONFIG)) ;

}

/**
* @brief Save Istep Step and Substep for use by error logging
Expand Down
31 changes: 16 additions & 15 deletions src/usr/hwas/common/hwas.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <algorithm>
#ifdef __HOSTBOOT_MODULE
#include <config.h>
#include <initservice/initserviceif.H>
#endif

#include <targeting/common/commontargeting.H>
Expand Down Expand Up @@ -193,7 +194,6 @@ bool allCoresBad(const uint8_t & i_firstCore,
return coresBad;
}

#ifdef CONFIG_SMP_WRAP_TEST
/**
* @brief disable obuses in wrap config.
* Due to fabric limitations, we can only have 2 parallel OBUS
Expand Down Expand Up @@ -289,7 +289,6 @@ errlHndl_t disableOBUSes()
} while (0);
return l_err;
}
#endif

errlHndl_t discoverTargets()
{
Expand Down Expand Up @@ -582,21 +581,23 @@ errlHndl_t discoverTargets()
// targets that need to be deconfigured
invokePresentByAssoc();

#ifdef CONFIG_SMP_WRAP_TEST
//Due to fabric limitations, we can only have 2 parallel OBUS
//connections at a time in wrap config. So, deconfigure appropriate
//OBUSes using the following rule. If the value of
//MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE (on the system target) does
//not match with the value of MFG_WRAP_TEST_ABUS_LINKS_SET (on the
//OBUS target), then deconfigure the OBUSes.
errl = disableOBUSes();
if (errl)
{
HWAS_ERR ("discoverTargets:: disableOBUSes failed");
break;
#ifdef __HOSTBOOT_MODULE
if (INITSERVICE::isSMPWrapConfig())
{
//Due to fabric limitations, we can only have 2 parallel OBUS
//connections at a time in wrap config. So, deconfigure appropriate
//OBUSes using the following rule. If the value of
//MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE (on the system target) does
//not match with the value of MFG_WRAP_TEST_ABUS_LINKS_SET (on the
//OBUS target), then deconfigure the OBUSes.
errl = disableOBUSes();
if (errl)
{
HWAS_ERR ("discoverTargets:: disableOBUSes failed");
break;
}
}
#endif

} while (0);

if (errl)
Expand Down
17 changes: 9 additions & 8 deletions src/usr/isteps/istep08/call_host_set_voltages.C
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ void* call_host_set_voltages(void *io_pArgs)
break;
}

#ifdef CONFIG_SMP_WRAP_TEST
// Make the FAPI call to p9_fbc_eff_config_links
// Make the FAPI call to p9_sys_chiplet_scominit, if previous call succeeded
fapiHWPCallWrapperHandler(P9_FBC_EFF_CONFIG_LINKS_F_T, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_SYS_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
#endif
if (INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_fbc_eff_config_links
// Make the FAPI call to p9_sys_chiplet_scominit, if previous call succeeded
fapiHWPCallWrapperHandler(P9_FBC_EFF_CONFIG_LINKS_F_T, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_SYS_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
}while( 0 );


Expand Down
36 changes: 19 additions & 17 deletions src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace
#include <initservice/initserviceif.H>

// HWP call support
#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapper
Expand Down Expand Up @@ -78,23 +79,24 @@ void* call_proc_xbus_enable_ridi( void *io_pArgs )
break;
}

#ifdef CONFIG_SMP_WRAP_TEST
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
// Make the FAPI call to p9_io_obus_scominit, if previous call succeeded
// Make the FAPI call to p9_npu_scominit, if previous call succeeded
// Make the FAPI call to p9_chiplet_enable_ridi, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_IO_OBUS_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_OBUS) &&
fapiHWPCallWrapperHandler(P9_NPU_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
#endif // end #ifdef CONFIG_SMP_WRAP_TEST
if (INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
// Make the FAPI call to p9_io_obus_scominit, if previous call succeeded
// Make the FAPI call to p9_npu_scominit, if previous call succeeded
// Make the FAPI call to p9_chiplet_enable_ridi, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_IO_OBUS_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_OBUS) &&
fapiHWPCallWrapperHandler(P9_NPU_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
} while (0);
TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_proc_xbus_enable_ridi exit");

Expand Down
7 changes: 3 additions & 4 deletions src/usr/isteps/istep09/call_fabric_io_dccal.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace

#include <initservice/initserviceif.H> // isSMPWrapConfig

// Pbus link service support
#include <pbusLinkSvc.H> // TargetPairs_t, PbusLinkSvc
Expand Down Expand Up @@ -167,8 +167,8 @@ void* call_fabric_io_dccal( void *io_pArgs )
l_pbusConnections,
XbusDccalMode::RxDccalCheckGrp);
} // end if (TYPE_XBUS == l_busSet[ii])
#ifdef CONFIG_SMP_WRAP_TEST
else if (TYPE_OBUS == l_busSet[ii])
else if (INITSERVICE::isSMPWrapConfig() &&
(TYPE_OBUS == l_busSet[ii]))
{
// Make the FAPI call to p9_io_obus_dccal
if (!trainBusHandler(l_busSet[ii],
Expand All @@ -180,7 +180,6 @@ void* call_fabric_io_dccal( void *io_pArgs )
break;
}
} // end else if (TYPE_OBUS == l_busSet[ii])
#endif
} // end for (uint32_t ii = 0; ii < l_maxBusSet; ii++)

TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_fabric_io_dccal exit" );
Expand Down
7 changes: 3 additions & 4 deletions src/usr/isteps/istep09/call_fabric_io_run_training.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace

#include <initservice/initserviceif.H> // isSMPWrapConfig
// Targeting support
#include <fapi2_target.H> // fapi2::Target
#include <target.H> // TARGETING::Target
Expand Down Expand Up @@ -162,8 +162,8 @@ void* call_fabric_io_run_training( void *io_pArgs )
}
} // end for (const auto & l_pbusConnection: l_pbusConnections)
} // end if (TYPE_XBUS == l_busSet[ii])
#ifdef CONFIG_SMP_WRAP_TEST
else if (TYPE_OBUS == l_busSet[ii])
else if (INITSERVICE::isSMPWrapConfig() &&
(TYPE_OBUS == l_busSet[ii]))
{
// Make the FAPI call to p9_io_obus_linktrain
if (!trainBusHandler(l_busSet[ii],
Expand All @@ -175,7 +175,6 @@ void* call_fabric_io_run_training( void *io_pArgs )
break;
}
} // end else if (TYPE_OBUS == l_busSet[ii])
#endif
} // end for (uint32_t ii = 0; ii < l_maxBusSet; ++ii)

TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_fabric_io_run_training exit" );
Expand Down
6 changes: 3 additions & 3 deletions src/usr/isteps/istep09/call_fabric_post_trainadv.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace
#include <initservice/initserviceif.H> // isSMPWrapConfig

// Error handling support
#include <errl/errlentry.H> // errlHndl_t
Expand Down Expand Up @@ -107,8 +108,8 @@ void* call_fabric_post_trainadv( void *io_pArgs )
break;
}
} // end if (TYPE_XBUS == l_busSet[ii])
#ifdef CONFIG_SMP_WRAP_TEST
else if (TYPE_OBUS == l_busSet[ii])
else if (INITSERVICE::isSMPWrapConfig() &&
(TYPE_OBUS == l_busSet[ii]))
{
// Make the FAPI call to p9_io_obus_post_trainadv
if (!trainBusHandler(l_busSet[ii],
Expand All @@ -120,7 +121,6 @@ void* call_fabric_post_trainadv( void *io_pArgs )
break;
}
} // end else if (TYPE_OBUS == l_busSet[ii])
#endif
} // end for (uint32_t ii = 0; ii < l_maxBusSet; ++ii)

TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_fabric_post_trainadv exit");
Expand Down
6 changes: 3 additions & 3 deletions src/usr/isteps/istep09/call_fabric_pre_trainadv.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace
#include <initservice/initserviceif.H> // isSMPWrapConfig

// Error handling support
#include <errl/errlentry.H> // errlHndl_t
Expand Down Expand Up @@ -107,8 +108,8 @@ void* call_fabric_pre_trainadv( void *io_pArgs )
break;
}
} // end if (TYPE_XBUS == l_busSet[ii])
#ifdef CONFIG_SMP_WRAP_TEST
else if (TYPE_OBUS == l_busSet[ii])
else if (INITSERVICE::isSMPWrapConfig() &&
(TYPE_OBUS == l_busSet[ii]))
{
// Make the FAPI call to p9_io_obus_pre_trainadv
if (!trainBusHandler(l_busSet[ii],
Expand All @@ -120,7 +121,6 @@ void* call_fabric_pre_trainadv( void *io_pArgs )
break;
}
} // end else if (TYPE_OBUS == l_busSet[ii])
#endif
} // end for (uint32_t ii = 0; (!l_err) && (ii < l_maxBusSet); ii++)

TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_fabric_pre_trainadv exit" );
Expand Down
12 changes: 11 additions & 1 deletion src/usr/isteps/istep09/call_proc_fab_iovalid.C
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <errl/errludtarget.H>

#include <initservice/isteps_trace.H>
#include <initservice/initserviceif.H>

#include <hwas/common/deconfigGard.H>
#include <hwas/common/hwasCommon.H>
Expand Down Expand Up @@ -121,8 +122,17 @@ void* call_proc_fab_iovalid( void *io_pArgs )
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_fab_iovalid HWP on processor target %.8X",
TARGETING::get_huid(l_cpu_target) );
FAPI_INVOKE_HWP(l_errl, p9_fab_iovalid, l_fapi2_proc_target,

if (INITSERVICE::isSMPWrapConfig())
{
FAPI_INVOKE_HWP(l_errl, p9_fab_iovalid, l_fapi2_proc_target,
true, true, true);
}
else
{
FAPI_INVOKE_HWP(l_errl, p9_fab_iovalid, l_fapi2_proc_target,
true, true, false);
}
if(l_errl)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
Expand Down
2 changes: 1 addition & 1 deletion src/usr/isteps/istep09/istep09HelperFuncs.C
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ bool trainBusHandler(TYPE i_busType,
}
else if (TYPE_XBUS == i_busType)
{
l_numberOfTrainFailures = trainObus(i_hwpCall,
l_numberOfTrainFailures = trainXbus(i_hwpCall,
o_stepError,
i_componentId,
l_pbusConnection.first,
Expand Down
14 changes: 7 additions & 7 deletions src/usr/isteps/istep10/call_proc_chiplet_enable_ridi.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace
#include <initservice/initserviceif.H> // isSMPWrapConfig

// HWP call support
#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip
Expand All @@ -70,13 +71,12 @@ void* call_proc_chiplet_enable_ridi( void *io_pArgs )
TRACFCOMP(g_trac_isteps_trace,
ENTER_MRK"call_proc_chiplet_enable_ridi entry");


#ifndef CONFIG_SMP_WRAP_TEST
// Make the FAPI call to p9_chiplet_enable_ridi
fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
#endif

if (!INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_chiplet_enable_ridi
fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
TRACFCOMP(g_trac_isteps_trace,
EXIT_MRK"call_proc_chiplet_enable_ridi exit");

Expand Down
19 changes: 10 additions & 9 deletions src/usr/isteps/istep10/call_proc_chiplet_scominit.C
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
// Tracing support
#include <trace/interface.H> // TRACFCOMP
#include <initservice/isteps_trace.H> // g_trac_isteps_trace

#include <initservice/initserviceif.H> // isSMPWrapConfig
// HWP call support
#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip

Expand All @@ -74,14 +74,15 @@ void* call_proc_chiplet_scominit( void *io_pArgs )

TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_proc_chiplet_scominit entry" );

#ifndef CONFIG_SMP_WRAP_TEST
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
#endif
if (!INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}

// Enable TCEs with an empty TCE Table, if necessary
// This will prevent the FSP from DMAing to system memory without
Expand Down

0 comments on commit 3c73a7c

Please sign in to comment.