summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/dmi_training/dmi_training.C194
-rw-r--r--src/usr/hwpf/hwp/dram_training/dram_training.C100
-rw-r--r--src/usr/hwpf/hwp/mc_init/mc_init.C73
-rw-r--r--src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C282
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile7
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.C671
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.H114
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets_errors.xml39
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C243
-rw-r--r--src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H12
10 files changed, 1206 insertions, 529 deletions
diff --git a/src/usr/hwpf/hwp/dmi_training/dmi_training.C b/src/usr/hwpf/hwp/dmi_training/dmi_training.C
index 305a17325..a6673c867 100644
--- a/src/usr/hwpf/hwp/dmi_training/dmi_training.C
+++ b/src/usr/hwpf/hwp/dmi_training/dmi_training.C
@@ -71,13 +71,13 @@ using namespace fapi;
//
void call_dmi_scominit( void *io_pArgs )
{
-
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_scominit entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "dmi_scominit exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -86,13 +86,13 @@ void call_dmi_scominit( void *io_pArgs )
//
void call_dmi_erepair( void *io_pArgs )
{
-
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_erepair entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "dmi_erepair exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -100,13 +100,14 @@ void call_dmi_erepair( void *io_pArgs )
//
void call_dmi_io_dccal( void *io_pArgs )
{
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_dccal entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "dmi_io_dccal exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -115,7 +116,7 @@ void call_dmi_io_dccal( void *io_pArgs )
//
void call_dmi_io_run_training( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TARGETING::TargetService& l_targetService = targetService();
uint8_t l_cpuNum = 0;
@@ -215,46 +216,52 @@ void call_dmi_io_run_training( void *io_pArgs )
l_path = l_mem_target->getAttr<ATTR_PHYS_PATH>();
l_path.dump();
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "===== " );
-
- l_fapirc = io_run_training(
- l_fapi_master_target,
+ FAPI_INVOKE_HWP(l_err, io_run_training, l_fapi_master_target,
l_CustomParms[l_mcsNum].master_interface,
l_CustomParms[l_mcsNum].master_group,
l_fapi_slave_target,
l_CustomParms[l_mcsNum].slave_interface,
l_CustomParms[l_mcsNum].slave_group );
- // process return code.
- if ( l_fapirc == fapi::FAPI_RC_SUCCESS )
+ if (l_err)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : io_run_training HWP( cpu 0x%x, mcs 0x%x, mem 0x%x ) ",
+ "ERROR 0x%.8X : io_run_training HWP( cpu 0x%x, mcs 0x%x, mem 0x%x ) ",
+ l_err->reasonCode(),
l_cpuNum,
l_mcsNum,
l_memNum );
+ break; // Break out mem target loop
}
else
{
- /**
- * @todo fapi error - just print out for now...
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d : io_run_training HWP( cpu 0x%x, mcs 0x%x, mem 0x%x ) ",
- static_cast<uint32_t>(l_fapirc),
+ "SUCCESS : io_run_training HWP( cpu 0x%x, mcs 0x%x, mem 0x%x ) ",
l_cpuNum,
l_mcsNum,
l_memNum );
}
+
} //end for l_mem_target
+ if (l_err)
+ {
+ break; // Break out l_mcs_target
+ }
+
} // end for l_mcs_target
+ if (l_err)
+ {
+ break; // Break out l_cpu_target
+ }
+
} // end for l_cpu_target
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_io_run_training exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -263,13 +270,13 @@ void call_dmi_io_run_training( void *io_pArgs )
//
void call_host_startPRD_dmi( void *io_pArgs )
{
-
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_startPRD_dmi entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_startPRD_dmi exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -279,13 +286,14 @@ void call_host_startPRD_dmi( void *io_pArgs )
void call_host_attnlisten_cen( void *io_pArgs )
{
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_attnlisten_cen entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "<host_attnlisten_cen exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -293,8 +301,7 @@ void call_host_attnlisten_cen( void *io_pArgs )
//
void call_proc_cen_framelock( void *io_pArgs )
{
-
- errlHndl_t l_errl = NULL;
+ errlHndl_t l_err = NULL;
proc_cen_framelock_args l_args;
// Use PredicateIsFunctional to filter only functional chips
@@ -302,83 +309,92 @@ void call_proc_cen_framelock( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_cen_framework entry" );
- // get the mcs chiplets associated with this cpu
- TARGETING::PredicateCTM l_mcsChipFilter(CLASS_UNIT, TYPE_MCS);
- TARGETING::PredicatePostfixExpr l_functionalAndMcsChipFilter;
- l_functionalAndMcsChipFilter.push(&l_mcsChipFilter).push(&l_isFunctional).And();
+ // get the mcs chiplets associated with this cpu
+ TARGETING::PredicateCTM l_mcsChipFilter(CLASS_UNIT, TYPE_MCS);
+ TARGETING::PredicatePostfixExpr l_functionalAndMcsChipFilter;
+ l_functionalAndMcsChipFilter.push(&l_mcsChipFilter).push(&l_isFunctional).And();
- TARGETING::TargetRangeFilter l_mcsFilter(
+ TARGETING::TargetRangeFilter l_mcsFilter(
TARGETING::targetService().begin(),
TARGETING::targetService().end(),
&l_functionalAndMcsChipFilter );
- for ( ; l_mcsFilter ; ++l_mcsFilter )
+ for ( ; l_mcsFilter ; ++l_mcsFilter )
+ {
+ // make a local copy of the MCS target
+ const TARGETING::Target* l_mcs_target = *l_mcsFilter ;
+
+ // find all the Centaurs that are associated with this MCS
+ TARGETING::PredicateCTM l_membufChipFilter(CLASS_CHIP, TYPE_MEMBUF);
+ TARGETING::PredicatePostfixExpr l_functionalAndMembufChipFilter;
+ l_functionalAndMembufChipFilter.push(&l_membufChipFilter).push(&l_isFunctional).And();
+ TARGETING::TargetHandleList l_memTargetList;
+ TARGETING::targetService().getAssociated(l_memTargetList,
+ l_mcs_target,
+ TARGETING::TargetService::CHILD_BY_AFFINITY,
+ TARGETING::TargetService::ALL,
+ &l_functionalAndMembufChipFilter);
+
+ for ( uint8_t k=0, l_memNum=0; k < l_memTargetList.size(); k++, l_memNum++ )
{
- // make a local copy of the MCS target
- const TARGETING::Target* l_mcs_target = *l_mcsFilter ;
-
- // find all the Centaurs that are associated with this MCS
- TARGETING::PredicateCTM l_membufChipFilter(CLASS_CHIP, TYPE_MEMBUF);
- TARGETING::PredicatePostfixExpr l_functionalAndMembufChipFilter;
- l_functionalAndMembufChipFilter.push(&l_membufChipFilter).push(&l_isFunctional).And();
- TARGETING::TargetHandleList l_memTargetList;
- TARGETING::targetService().getAssociated(l_memTargetList,
- l_mcs_target,
- TARGETING::TargetService::CHILD_BY_AFFINITY,
- TARGETING::TargetService::ALL,
- &l_functionalAndMembufChipFilter);
-
- for ( uint8_t k=0, l_memNum=0; k < l_memTargetList.size(); k++, l_memNum++ )
+ // make a local copy of the MEMBUF target
+ const TARGETING::Target* l_mem_target = l_memTargetList[k];
+
+ // fill out the args struct.
+ l_args.in_error_state = false;
+ l_args.channel_init_timeout = CHANNEL_INIT_TIMEOUT_NO_TIMEOUT;
+ l_args.frtl_auto_not_manual = true;
+ l_args.frtl_manual_pu = 0;
+ l_args.frtl_manual_mem = 0;
+
+ fapi::Target l_fapiMcsTarget(
+ TARGET_TYPE_MCS_CHIPLET,
+ reinterpret_cast<void *>
+ ( const_cast<TARGETING::Target*>(l_mcs_target) )
+ );
+ fapi::Target l_fapiMemTarget(
+ TARGET_TYPE_MEMBUF_CHIP,
+ reinterpret_cast<void *>
+ (const_cast<TARGETING::Target*>(l_mem_target))
+ );
+
+ EntityPath l_path;
+ l_path = l_mcs_target->getAttr<ATTR_PHYS_PATH>();
+ l_path.dump();
+ l_path = l_mem_target->getAttr<ATTR_PHYS_PATH>();
+ l_path.dump();
+
+ FAPI_INVOKE_HWP( l_err,
+ proc_cen_framelock,
+ l_fapiMcsTarget,
+ l_fapiMemTarget,
+ l_args );
+ if ( l_err )
{
- // make a local copy of the MEMBUF target
- const TARGETING::Target* l_mem_target = l_memTargetList[k];
-
- // fill out the args struct.
- l_args.in_error_state = false;
- l_args.channel_init_timeout = CHANNEL_INIT_TIMEOUT_NO_TIMEOUT;
- l_args.frtl_auto_not_manual = true;
- l_args.frtl_manual_pu = 0;
- l_args.frtl_manual_mem = 0;
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X : proc_cen_framelock HWP( mem %d )",
+ l_err->reasonCode(), l_memNum );
+ break; // break out of mem num loop
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : proc_cen_framelock HWP( mem %d ) ",
+ l_memNum );
+ }
- fapi::Target l_fapiMcsTarget(
- TARGET_TYPE_MCS_CHIPLET,
- reinterpret_cast<void *>
- ( const_cast<TARGETING::Target*>(l_mcs_target) )
- );
- fapi::Target l_fapiMemTarget(
- TARGET_TYPE_MEMBUF_CHIP,
- reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(l_mem_target))
- );
+ } // end mem
- EntityPath l_path;
- l_path = l_mcs_target->getAttr<ATTR_PHYS_PATH>();
- l_path.dump();
- l_path = l_mem_target->getAttr<ATTR_PHYS_PATH>();
- l_path.dump();
+ if (l_err)
+ {
+ break; // break out of mcs loop
+ }
- FAPI_INVOKE_HWP( l_errl,
- proc_cen_framelock,
- l_fapiMcsTarget,
- l_fapiMemTarget,
- l_args );
- if ( l_errl )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : proc_cen_framelock" );
- errlCommit( l_errl, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : proc_cen_framelock " );
- }
- } // end mem
- } // end mcs
+ } // end mcs
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_cen_framework exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -387,14 +403,14 @@ void call_proc_cen_framelock( void *io_pArgs )
//
void call_cen_set_inband_addr( void *io_pArgs )
{
-
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr entry" );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "cen_set_inband_addr exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C
index 80bff34aa..c1b8b1913 100644
--- a/src/usr/hwpf/hwp/dram_training/dram_training.C
+++ b/src/usr/hwpf/hwp/dram_training/dram_training.C
@@ -52,9 +52,11 @@
#include <fapi.H>
#include <fapiPlatHwpInvoker.H>
+// Run on all Centaurs/MBAs, but needs to keep this one handy in case we
+// want to limit them in VPO
const uint8_t UNLIMITED_RUN = 0xFF;
-const uint8_t VPO_NUM_OF_MBAS_TO_RUN = 1;
-const uint8_t VPO_NUM_OF_MEMBUF_TO_RUN = 1;
+const uint8_t VPO_NUM_OF_MBAS_TO_RUN = UNLIMITED_RUN;
+const uint8_t VPO_NUM_OF_MEMBUF_TO_RUN = UNLIMITED_RUN;
// -- prototype includes --
// Add any customized routines that you don't want overwritten into
@@ -87,9 +89,7 @@ using namespace fapi;
//
void call_host_disable_vddr( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_disable_vddr entry" );
@@ -132,7 +132,7 @@ void call_host_disable_vddr( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: host_disable_vddr HWP(? ? ?) ",
+ "ERROR 0x%.8X: host_disable_vddr HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -140,7 +140,7 @@ void call_host_disable_vddr( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_disable_vddr exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -150,9 +150,7 @@ void call_host_disable_vddr( void *io_pArgs )
//
void call_mc_pll_setup( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mc_pll_setup entry" );
@@ -195,7 +193,7 @@ void call_mc_pll_setup( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mc_pll_setup HWP(? ? ?) ",
+ "ERROR 0x%.8X: mc_pll_setup HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -203,7 +201,7 @@ void call_mc_pll_setup( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mc_pll_setup exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -213,9 +211,7 @@ void call_mc_pll_setup( void *io_pArgs )
//
void call_mba_startclocks( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mba_startclocks entry" );
@@ -258,7 +254,7 @@ void call_mba_startclocks( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mba_startclocks HWP(? ? ?) ",
+ "ERROR 0x%.8X: mba_startclocks HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -266,7 +262,7 @@ void call_mba_startclocks( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mba_startclocks exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -276,9 +272,7 @@ void call_mba_startclocks( void *io_pArgs )
//
void call_host_enable_vddr( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_enable_vddr entry" );
@@ -321,7 +315,7 @@ void call_host_enable_vddr( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: host_enable_vddr HWP(? ? ?) ",
+ "ERROR 0x%.8X: host_enable_vddr HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -329,7 +323,7 @@ void call_host_enable_vddr( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_enable_vddr exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -339,9 +333,7 @@ void call_host_enable_vddr( void *io_pArgs )
//
void call_mss_initf( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_initf entry" );
@@ -384,7 +376,7 @@ void call_mss_initf( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_initf HWP(? ? ?) ",
+ "ERROR 0x%.8X: mss_initf HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -392,7 +384,7 @@ void call_mss_initf( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_initf exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -401,8 +393,6 @@ void call_mss_initf( void *io_pArgs )
void call_mss_ddr_phy_reset( void *io_pArgs )
{
errlHndl_t l_err = NULL;
- fapi::ReturnCode l_fapirc;
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset entry" );
@@ -452,29 +442,28 @@ void call_mss_ddr_phy_reset( void *io_pArgs )
if (l_err)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : mss_ddr_phy_reset HWP returns error");
- errlCommit(l_err, HWPF_COMP_ID);
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_ddr_phy_reset HWP returns error",
+ l_err->reasonCode());
+ break; // break out of mba loop
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : call_mss_ddr_phy_reset HWP( )" );
}
- }
+ } // end l_mbaNum loop
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
-
//
// Wrapper function to call 13.7 : mss_draminit
//
void call_mss_draminit( void *io_pArgs )
{
errlHndl_t l_err = NULL;
- fapi::ReturnCode l_fapirc;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit entry" );
@@ -524,8 +513,9 @@ void call_mss_draminit( void *io_pArgs )
if (l_err)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : mss_draminit HWP returns error");
- errlCommit(l_err, HWPF_COMP_ID);
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit HWP returns error",
+ l_err->reasonCode());
+ break; // Break out of mba loop
}
else
{
@@ -536,7 +526,7 @@ void call_mss_draminit( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -544,9 +534,7 @@ void call_mss_draminit( void *io_pArgs )
//
void call_mss_restore_dram_repair( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_restore_dram_repair entry" );
@@ -589,7 +577,7 @@ void call_mss_restore_dram_repair( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_restore_dram_repair HWP(? ? ?) ",
+ "ERROR 0x%.8X: mss_restore_dram_repair HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -597,7 +585,7 @@ void call_mss_restore_dram_repair( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_restore_dram_repair exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -608,7 +596,6 @@ void call_mss_restore_dram_repair( void *io_pArgs )
void call_mss_draminit_training( void *io_pArgs )
{
errlHndl_t l_err = NULL;
- fapi::ReturnCode l_fapirc;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_training entry" );
@@ -659,8 +646,9 @@ void call_mss_draminit_training( void *io_pArgs )
if (l_err)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : mss_draminit_training HWP returns error");
- errlCommit(l_err, HWPF_COMP_ID);
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_training HWP returns error",
+ l_err->reasonCode());
+ break; // break out of mba loop
}
else
{
@@ -671,7 +659,7 @@ void call_mss_draminit_training( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_training exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -679,9 +667,7 @@ void call_mss_draminit_training( void *io_pArgs )
//
void call_mss_draminit_trainadv( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_trainadv entry" );
@@ -724,7 +710,7 @@ void call_mss_draminit_trainadv( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_draminit_trainadv HWP(? ? ?) ",
+ "ERROR 0x%.8X: mss_draminit_trainadv HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -732,7 +718,7 @@ void call_mss_draminit_trainadv( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_trainadv exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -741,7 +727,6 @@ void call_mss_draminit_trainadv( void *io_pArgs )
void call_mss_draminit_mc( void *io_pArgs )
{
errlHndl_t l_err = NULL;
- fapi::ReturnCode l_fapirc;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_mc entry" );
@@ -791,19 +776,20 @@ void call_mss_draminit_mc( void *io_pArgs )
if (l_err)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : mss_draminit_mc HWP returns error");
- errlCommit(l_err, HWPF_COMP_ID);
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_mc HWP returns error",
+ l_err->reasonCode());
+ break; // break out of memBuf loop
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit_mc HWP( )" );
}
- }
+ } // End memBuf loop
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_mc exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
diff --git a/src/usr/hwpf/hwp/mc_init/mc_init.C b/src/usr/hwpf/hwp/mc_init/mc_init.C
index 10ba1fca3..e42a1275a 100644
--- a/src/usr/hwpf/hwp/mc_init/mc_init.C
+++ b/src/usr/hwpf/hwp/mc_init/mc_init.C
@@ -78,9 +78,7 @@ using namespace fapi;
//
void call_host_collect_dimm_spd( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_collect_dimm_spd entry" );
@@ -122,7 +120,7 @@ void call_host_collect_dimm_spd( void *io_pArgs )
* @todo fapi error - just print out for now...
*/
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: host_collect_dimm_spd HWP(? ? ?) ",
+ "ERROR 0x%.8X: host_collect_dimm_spd HWP(? ? ?) ",
static_cast<uint32_t>(l_fapirc) );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -130,7 +128,7 @@ void call_host_collect_dimm_spd( void *io_pArgs )
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_collect_dimm_spd exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
@@ -140,9 +138,7 @@ void call_host_collect_dimm_spd( void *io_pArgs )
//
void call_mss_volt( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt entry" );
@@ -189,27 +185,23 @@ void call_mss_volt( void *io_pArgs )
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"===== mss_volt HWP( vector )" );
// call the HWP with each target ( if parallel, spin off a task )
- l_fapirc = mss_volt( l_membufFapiTargets );
+ FAPI_INVOKE_HWP(l_err, mss_volt, l_membufFapiTargets);
// process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
+ if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : mss_volt HWP( )" );
+ "ERROR 0x%.8X: mss_volt HWP( ) ", l_err->reasonCode());
}
else
{
- /**
- * @todo fapi error - just print out for now...
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_volt HWP( ) ",
- static_cast<uint32_t>(l_fapirc) );
+ "SUCCESS : mss_volt HWP( )" );
}
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt exit" );
- task_end2( NULL );
+ task_end2( l_err );
}
//
@@ -217,9 +209,7 @@ void call_mss_volt( void *io_pArgs )
//
void call_mss_freq( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_freq entry" );
@@ -261,41 +251,35 @@ void call_mss_freq( void *io_pArgs )
reinterpret_cast<void *>
(const_cast<TARGETING::Target*>(l_membuf_target)) );
- l_fapirc = mss_freq( l_fapi_membuf_target );
+ FAPI_INVOKE_HWP(l_err, mss_freq, l_fapi_membuf_target);
// process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
+ if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : mss_freq HWP( %d )", l_memBufNum );
- }
+ "ERROR 0x%.8X: mss_freq HWP( %d ) ",
+ l_err->reasonCode(),
+ l_memBufNum );
+ break; // break out memBuf loop
+ }
else
{
- /**
- * @todo fapi error - just print out for now...
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_freq HWP( %d ) ",
- static_cast<uint32_t>(l_fapirc),
- l_memBufNum );
+ "SUCCESS : mss_freq HWP( %d )", l_memBufNum );
}
- }
+ } // End memBuf loop
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_freq exit" );
task_end2( NULL );
}
-
-
//
// Wrapper function to call 12.4 : mss_eff_config
//
void call_mss_eff_config( void *io_pArgs )
{
- // @todo remove when join() merged
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_eff_config entry" );
@@ -339,24 +323,21 @@ void call_mss_eff_config( void *io_pArgs )
(const_cast<TARGETING::Target*>(l_mba_target)) );
// call the HWP with each fapi::Target
- l_fapirc = mss_eff_config_sim( l_fapi_mba_target );
+ FAPI_INVOKE_HWP(l_err, mss_eff_config_sim, l_fapi_mba_target);
// process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
+ if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : mss_eff_config HWP( mba %d )",
- l_mbaNum );
+ "ERROR 0x%.8X: mss_eff_config HWP( mba %d ) ",
+ l_err->reasonCode(), l_mbaNum );
+ break; // break out mba loop
}
else
{
- /**
- * @todo fapi error - just print out for now...
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: mss_eff_config HWP( mba %d ) ",
- static_cast<uint32_t>(l_fapirc),
- l_mbaNum );
+ "SUCCESS : mss_eff_config HWP( mba %d )",
+ l_mbaNum );
}
} // endfor
diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
index 333609205..4530cb9c5 100644
--- a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
+++ b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
@@ -46,6 +46,7 @@
#include <fapiPoreVeArg.H>
#include <fapiTarget.H>
#include <fapi.H>
+#include <fapiPlatHwpInvoker.H>
#include <vfs/vfs.H>
#include <list>
#include "sbe_centaur_init.H"
@@ -77,8 +78,6 @@ using namespace fapi;
void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
- fapi::ReturnCode l_fapirc2;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init1 entry" );
@@ -111,9 +110,8 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
l_errl = VFS::module_load("sbe_pnor.bin");
if (l_errl)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init1 - VFS::module_load(sbe_pnor.bin) returns error");
- //@todo - Commit error and generate error FapiReturn code here
- delete l_errl;
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X call_cen_sbe_tp_chiplet_init1 - VFS::module_load(sbe_pnor.bin) returns error",
+ l_errl->reasonCode());
break;
}
else
@@ -123,9 +121,8 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
l_errl = VFS::module_address("sbe_pnor.bin", l_sbePnorAddr, l_sbePnorSize);
if(l_errl)
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init1 - VFS::module_address(sbe_pnor.bin) return error");
- //@todo- Commit error and generate error FapiReturn code
- delete l_errl;
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X call_cen_sbe_tp_chiplet_init1 - VFS::module_address(sbe_pnor.bin) return error",
+ l_errl->reasonCode());
break;
}
else
@@ -202,18 +199,15 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
//Also, the image used for Centaur is only a temporary image provided by Todd to try out.
if ( !TARGETING::is_vpo() )
{
- //@todo - Do not run poreve with temp image for now
- l_fapirc = fapiPoreVe(l_fapiTarget, myArgs);
+ // Can't run now because the HALT returned will cause a failure in simics
+ //FAPI_INVOKE_HWP(l_errl, fapiPoreVe, l_fapiTarget, myArgs);
}
- if (l_fapirc != fapi::FAPI_RC_SUCCESS)
+ if (l_errl )
{
- uint32_t val = l_fapirc;
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init1 - Error returned from VSBE engine on this Centaur, l_rc 0x%llX",
- val);
- //@todo - We want to commit the error here and should probably trigger a can continue loop (per Dean).
- // For now, just move onto the next Centaur
- continue;
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X call_cen_sbe_tp_chiplet_init1 - Error returned from VSBE engine on this Centaur, l_rc 0x%llX",
+ l_errl->reasonCode());
+ break; // break out of memBuf loop
}
else
{
@@ -241,44 +235,48 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
l_stateArg = NULL;
}
+ if (l_errl)
+ {
+ break; // break out of do-while loop
+ }
+
} while(0);
// Unload sbe_pnor
if (l_unloadSbePnorImg == true)
{
- l_fapirc2 = fapiUnloadInitFile("sbe_pnor.bin",
- l_sbePnorAddr,
- l_sbePnorSize);
- if (l_fapirc2 != fapi::FAPI_RC_SUCCESS)
+ errlHndl_t l_tempErrl = NULL;
+ FAPI_INVOKE_HWP(l_tempErrl, fapiUnloadInitFile, "sbe_pnor.bin",
+ l_sbePnorAddr,
+ l_sbePnorSize);
+ if (l_tempErrl)
{
- FAPI_ERR("call_cen_sbe_tp_chiplet_init1 - Error unloading sbe_pnor.bin");
- if (l_fapirc == fapi::FAPI_RC_SUCCESS)
+ FAPI_ERR("ERROR 0x%.8X call_cen_sbe_tp_chiplet_init1 - Error unloading sbe_pnor.bin",
+ l_tempErrl->reasonCode());
+ if (l_errl == NULL)
{
- l_fapirc = l_fapirc2;
+ l_errl = l_tempErrl;
}
}
}
// process return code.
- if ( l_fapirc == fapi::FAPI_RC_SUCCESS )
+ if ( l_errl )
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_tp_chiplet_init1 HWP(? ? ? )" );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: cen_sbe_tp_chiplet_init1 HWP(?,?,? ) ",
+ l_errl->reasonCode());
}
else
{
- /**
- * @todo fapi error - just print out for now...
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_tp_chiplet_init1 HWP(?,?,? ) ",
- static_cast<uint32_t>(l_fapirc) );
+ "SUCCESS : cen_sbe_tp_chiplet_init1 HWP(? ? ? )" );
}
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "cen_sbe_tp_chiplet_init1 exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -287,9 +285,7 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs )
//
void call_cen_sbe_npll_initf( void *io_pArgs )
{
-
- fapi::ReturnCode l_fapirc;
-
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_pll_initf entry" );
@@ -304,26 +300,10 @@ void call_cen_sbe_npll_initf( void *io_pArgs )
l_fapirc = cen_sbe_pll_initf( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_pll_initf HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_pll_initf HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_pll_initf exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -332,8 +312,7 @@ void call_cen_sbe_npll_initf( void *io_pArgs )
//
void call_cen_sbe_tp_chiplet_init2( void *io_pArgs )
{
-
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_chiplet_init2" );
@@ -348,26 +327,10 @@ void call_cen_sbe_tp_chiplet_init2( void *io_pArgs )
l_fapirc = cen_sbe_tp_chiplet_init2( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_tp_chiplet_init2 HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_tp_chiplet_init2 HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_chiplet_init2" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -377,7 +340,7 @@ void call_cen_sbe_tp_chiplet_init2( void *io_pArgs )
void call_cen_sbe_tp_arrayinit( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_arrayinit entry" );
@@ -392,26 +355,10 @@ void call_cen_sbe_tp_arrayinit( void *io_pArgs )
l_fapirc = cen_sbe_tp_arrayinit( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_tp_arrayinit HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_tp_arrayinit HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_arrayinit exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -422,7 +369,7 @@ void call_cen_sbe_tp_arrayinit( void *io_pArgs )
void call_cen_sbe_tp_chiplet_init3( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_chiplet_init3 entry" );
@@ -437,26 +384,11 @@ void call_cen_sbe_tp_chiplet_init3( void *io_pArgs )
l_fapirc = cen_sbe_tp_chiplet_init3( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_tp_chiplet_init3 HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_tp_chiplet_init3 HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_tp_chiplet_init3 exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -466,7 +398,7 @@ void call_cen_sbe_tp_chiplet_init3( void *io_pArgs )
void call_cen_sbe_chiplet_init( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_chiplet_init entry" );
@@ -481,26 +413,11 @@ void call_cen_sbe_chiplet_init( void *io_pArgs )
l_fapirc = cen_sbe_chiplet_init( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_chiplet_init HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_chiplet_init HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_chiplet_init exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -510,7 +427,7 @@ void call_cen_sbe_chiplet_init( void *io_pArgs )
void call_cen_sbe_arrayinit( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_arrayinit entry" );
@@ -525,26 +442,10 @@ void call_cen_sbe_arrayinit( void *io_pArgs )
l_fapirc = cen_sbe_arrayinit( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_arrayinit HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_arrayinit HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_arrayinit exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
//
@@ -553,7 +454,7 @@ void call_cen_sbe_arrayinit( void *io_pArgs )
void call_cen_sbe_dts_init( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_dts_init entry" );
@@ -568,26 +469,11 @@ void call_cen_sbe_dts_init( void *io_pArgs )
l_fapirc = cen_sbe_dts_init( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_dts_init HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_dts_init HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_dts_init exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -597,7 +483,7 @@ void call_cen_sbe_dts_init( void *io_pArgs )
void call_cen_sbe_initf( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_initf entry" );
@@ -612,26 +498,11 @@ void call_cen_sbe_initf( void *io_pArgs )
l_fapirc = cen_sbe_initf( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_initf HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_initf HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_initf exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -641,7 +512,7 @@ void call_cen_sbe_initf( void *io_pArgs )
void call_cen_sbe_do_manual_inits( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_do_manual_inits entry" );
@@ -656,26 +527,11 @@ void call_cen_sbe_do_manual_inits( void *io_pArgs )
l_fapirc = cen_sbe_do_manual_inits( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_do_manual_inits HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_do_manual_inits HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_do_manual_inits exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -685,7 +541,7 @@ void call_cen_sbe_do_manual_inits( void *io_pArgs )
void call_cen_sbe_nest_startclocks( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_startclocks entry" );
@@ -700,26 +556,10 @@ void call_cen_sbe_nest_startclocks( void *io_pArgs )
l_fapirc = cen_sbe_startclocks( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_startclocks HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_startclocks HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_startclocks exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
@@ -729,7 +569,7 @@ void call_cen_sbe_nest_startclocks( void *io_pArgs )
void call_cen_sbe_scominits( void *io_pArgs )
{
- fapi::ReturnCode l_fapirc;
+ errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_scominits entry" );
@@ -744,26 +584,10 @@ void call_cen_sbe_scominits( void *io_pArgs )
l_fapirc = cen_sbe_scominits( ? , ?, ? );
#endif
- // process return code.
- if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : cen_sbe_scominits HWP(? ? ? )" );
- }
- else
- {
- /**
- * @todo fapi error - just print out for now...
- */
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR %d: cen_sbe_scominits HWP(? ? ?) ",
- static_cast<uint32_t>(l_fapirc) );
- }
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_cen_sbe_scominits exit" );
- task_end2( NULL );
+ task_end2( l_errl );
}
}; // end namespace
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile
index d9293a914..4c9a23d5a 100644
--- a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile
@@ -36,6 +36,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
## NOTE: add the base istep dir here.
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets
## Include sub dirs
## NOTE: add a new EXTRAINCDIR when you add a new HWP
@@ -44,13 +45,13 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets
## NOTE: add new object files when you add a new HWP
-OBJS = start_clocks_on_nest_chiplets.o
-
+OBJS = start_clocks_on_nest_chiplets.o \
+ proc_start_clocks_chiplets.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
## EXAMPLE:
# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/<HWP_dir>
-
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.C b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.C
new file mode 100644
index 000000000..e5767a643
--- /dev/null
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.C
@@ -0,0 +1,671 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_chiplets/proc_start_clocks_chiplets.C $
+//
+// IBM CONFIDENTIAL
+//
+// COPYRIGHT International Business Machines Corp. 2012
+//
+// p1
+//
+// Object Code Only (OCO) source materials
+// Licensed Internal Code Source Materials
+// IBM HostBoot Licensed Internal Code
+//
+// The source code for this program is not published or other-
+// wise divested of its trade secrets, irrespective of what has
+// been deposited with the U.S. Copyright Office.
+//
+// Origin: 30
+//
+// IBM_PROLOG_END
+// $Id: proc_start_clocks_chiplets.C,v 1.3 2012/02/19 15:40:39 jmcgill Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_start_clocks_chiplets.C,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ****
+// *|
+// *! TITLE : proc_start_clocks_chiplets.H
+// *! DESCRIPTION : Start X/A/PCIE chiplet clocks (FAPI)
+// *!
+// *! OWNER NAME : Ralph Koester Email: rkoester@de.ibm.com
+// *! BACKUP NAME : Gebhard Weber Email: gweber@de.ibm.com
+// *!
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include "proc_start_clocks_chiplets.H"
+
+extern "C"
+{
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to clear chiplet fence in GP3 register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_clear_chiplet_fence(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase mask_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_GP3_AND_0x000F0013;
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_chiplet_fence: Start");
+
+ do
+ {
+ // form AND mask to clear chiplet fence bit
+ rc_ecmd |= mask_data.flushTo1();
+ rc_ecmd |= mask_data.clearBit(GP3_FENCE_EN_BIT);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_chiplet_fence: Error 0x%x setting up data buffer to clear chiplet fence",
+ rc_ecmd);
+ break;
+ }
+
+ // write chiplet GP3 AND mask register to clear fence bit
+ rc = fapiPutScom(i_target, scom_addr, mask_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_chiplet_fence: fapiPutScom error (GP3_AND_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_chiplet_fence: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to clear pervasive fence in GP0 register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_clear_perv_fence(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase mask_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_GP0_AND_0x00000004;
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_perv_fence: Start");
+
+ do
+ {
+ // form AND mask to clear pervasive fence bit
+ rc_ecmd |= mask_data.flushTo1();
+ rc_ecmd |= mask_data.clearBit(GP0_PERV_FENCE_BIT);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_perv_fence: Error 0x%x setting up data buffer to clear pervasive fence",
+ rc_ecmd);
+ break;
+ }
+
+ // write chiplet GP0 AND mask register to clear pervasive fence bit
+ rc = fapiPutScom(i_target, scom_addr, mask_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_perv_fence: fapiPutScom error (GP0_AND_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_perv_fence: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to set functional mode clock mux selects
+// in GP0 register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_set_mux_selects(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase mask_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_GP0_AND_0x00000004;
+
+ FAPI_DBG("proc_start_clocks_chiplet_set_mux_selects: Start");
+
+ do
+ {
+ // form AND mask to clear mux selects
+ rc_ecmd |= mask_data.flushTo1();
+ rc_ecmd |= mask_data.clearBit(GP0_ABSTCLK_MUXSEL_BIT);
+ rc_ecmd |= mask_data.clearBit(GP0_SYNCCLK_MUXSEL_BIT);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_mux_selects: Error 0x%x setting up data buffer to clear chiplet mux selects",
+ rc_ecmd);
+ break;
+ }
+
+ // write chiplet GP0 AND mask register to clear mux selects
+ rc = fapiPutScom(i_target, scom_addr, mask_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_mux_selects: fapiPutScom error (GP0_AND_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_set_mux_selects: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to clear scan select register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_clear_clk_scansel_reg(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ ecmdDataBufferBase zero_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_CLK_SCANSEL_0x00030007;
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_clk_scansel_reg: Start");
+
+ do
+ {
+ // clear chiplet scan select register
+ rc = fapiPutScom(i_target, scom_addr, zero_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_clk_scansel_reg: fapiPutScom error (CLK_SCANSEL_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_clk_scansel_reg: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to set clock region register (starts clocks)
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_set_clk_region_reg(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_CLK_REGION_0x00030006;
+
+ FAPI_DBG("proc_start_clocks_chiplet_set_clk_region_reg: Start");
+
+ do
+ {
+ // start NSL/array clocks
+ rc_ecmd |= data.setDoubleWord(0, PROC_START_CLOCKS_CHIPLETS_CLK_REGION_REG_START_NSL_ARY);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_clk_region_reg: Error 0x%x setting up data buffer for NSL/ARY clock start",
+ rc_ecmd);
+ break;
+ }
+
+ rc = fapiPutScom(i_target, scom_addr, data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_clk_region_reg: fapiPutScom error (CLK_REGION_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ // start all clocks
+ rc_ecmd |= data.setDoubleWord(0, PROC_START_CLOCKS_CHIPLETS_CLK_REGION_REG_START_ALL);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_clk_region_reg: Error 0x%x setting up data buffer for SL/NSL/ARY clock start",
+ rc_ecmd);
+ break;
+ }
+
+ rc = fapiPutScom(i_target, scom_addr, data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_set_clk_region_reg: fapiPutScom error (CLK_REGION_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_set_clk_region_reg: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to check clock status register to ensure
+// all desired clock domains have been started
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// i_status_reg_exp => expected value for clock status register
+// after clock start
+// returns: FAPI_RC_SUCCESS if operation was successful, else
+// RC_PROC_START_CLOCKS_CHIPLETS_CLK_STATUS_ERR if status register
+// data does not match expected pattern
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_check_clk_status_reg(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr,
+ const uint64_t i_status_reg_exp)
+{
+ fapi::ReturnCode rc;
+ ecmdDataBufferBase status_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_CLK_STATUS_0x00030008;
+
+ FAPI_DBG("proc_start_clocks_chiplet_check_clk_status_reg: Start");
+
+ do
+ {
+ // read clock status register
+ rc = fapiGetScom(i_target, scom_addr, status_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_check_clk_status_reg: fapiGetScom error (CLK_STATUS_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ // check that value matches expected pattern
+ if (status_data.getDoubleWord(0) != i_status_reg_exp)
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_check_clk_status_reg: Clock status register actual value (%016llX) does not match expected value (%016llX)",
+ status_data.getDoubleWord(0), i_status_reg_exp);
+ ecmdDataBufferBase & STATUS_REG = status_data;
+ uint32_t CHIPLET_BASE_SCOM_ADDR = i_chiplet_base_addr;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_START_CLOCKS_CHIPLETS_CLK_STATUS_ERR);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_check_clk_status_reg: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to clear force align in GP0 register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_clear_force_align(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase mask_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_GP0_AND_0x00000004;
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_force_align: Start");
+
+ do
+ {
+ // form AND mask to clear force align bit
+ rc_ecmd |= mask_data.flushTo1();
+ rc_ecmd |= mask_data.clearBit(GP0_FORCE_ALIGN_BIT);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_force_align: Error 0x%x setting up data buffer to clear force align",
+ rc_ecmd);
+ break;
+ }
+
+ // write chiplet GP0 AND mask register to clear force align bit
+ rc = fapiPutScom(i_target, scom_addr, mask_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_force_align: fapiPutScom error (GP0_AND_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_force_align: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to clear flushmode inhibit in GP0 register
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_clear_flushmode_inhibit(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ ecmdDataBufferBase mask_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_GP0_AND_0x00000004;
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_flushmode_inhibit: Start");
+
+ do
+ {
+ // form AND mask to clear force align bit
+ rc_ecmd |= mask_data.flushTo1();
+ rc_ecmd |= mask_data.clearBit(GP0_FLUSHMODE_INHIBIT_BIT);
+ rc = rc_ecmd;
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_flushmode_inhibit: Error 0x%x setting up data buffer to clear flushmode inhibit",
+ rc_ecmd);
+ break;
+ }
+
+ // write chiplet GP0 AND mask register to clear force align bit
+ rc = fapiPutScom(i_target, scom_addr, mask_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_clear_flushmode_inhibit: fapiPutScom error (GP0_AND_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_clear_flushmode_inhibit: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to check chiplet FIR register for errors
+// after clocks have been started
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// returns: FAPI_RC_SUCCESS if operation was successful, else
+// RC_PROC_START_CLOCKS_CHIPLETS_FIR_ERR if FIR register data doesn't
+// match expected pattern
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplet_check_fir(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr)
+{
+ fapi::ReturnCode rc;
+ ecmdDataBufferBase fir_data(64);
+ uint32_t scom_addr = i_chiplet_base_addr |
+ GENERIC_XSTOP_0x00040000;
+
+ FAPI_DBG("proc_start_clocks_chiplet_check_fir: Start");
+
+ do
+ {
+ // read chiplet FIR register
+ rc = fapiGetScom(i_target, scom_addr, fir_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_check_fir: fapiGetScom error (XSTOP_0x%08X)",
+ scom_addr);
+ break;
+ }
+
+ // check that value matches expected pattern
+ if (fir_data.getDoubleWord(0) !=
+ PROC_START_CLOCKS_CHIPLETS_CHIPLET_FIR_REG_EXP)
+ {
+ FAPI_ERR("proc_start_clocks_chiplet_check_fir: FIR register actual value (%016llX) does not match expected value (%016llX)",
+ fir_data.getDoubleWord(0), PROC_START_CLOCKS_CHIPLETS_CHIPLET_FIR_REG_EXP);
+ ecmdDataBufferBase & FIR_REG = fir_data;
+ uint32_t CHIPLET_BASE_SCOM_ADDR = i_chiplet_base_addr;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_START_CLOCKS_CHIPLETS_FIR_ERR);
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_chiplet_check_fir: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// function: utility subroutine to run clock start sequence on a generic chiplet
+// parameters: i_target => chip target
+// i_chiplet_base_addr => base SCOM address for chiplet
+// i_status_reg_exp => expected value for clock status register
+// after clock start
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_generic_chiplet(
+ const fapi::Target& i_target,
+ const uint32_t i_chiplet_base_addr,
+ const uint64_t i_status_reg_exp)
+{
+ fapi::ReturnCode rc;
+
+ FAPI_DBG("proc_start_clocks_generic_chiplet: Start");
+
+ do
+ {
+ // clear chiplet fence in GP3 register
+ FAPI_DBG("Writing GP3 AND mask to clear chiplet fence ...");
+ rc = proc_start_clocks_chiplet_clear_chiplet_fence(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing GP3 AND mask to clear chiplet fence");
+ break;
+ }
+
+ // clear pervasive fence in GP0 register
+ FAPI_DBG("Writing GP0 AND mask to clear pervasive fence ...");
+ rc = proc_start_clocks_chiplet_clear_perv_fence(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing GP0 AND mask to clear pervasive fence");
+ break;
+ }
+
+ // set functional clock mux selects in GP0 register
+ FAPI_DBG("Writing GP0 AND mask to set functional clock mux selects ...");
+ rc = proc_start_clocks_chiplet_set_mux_selects(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing GP0 AND mask to set functional clock mux selects");
+ break;
+ }
+
+ // clear clock scansel register
+ FAPI_DBG("Clearing clock scansel register ...");
+ rc = proc_start_clocks_chiplet_clear_clk_scansel_reg(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error clearing clock scansel register");
+ break;
+ }
+
+ // write clock region register to start clocks
+ FAPI_DBG("Writing clock region register to start clocks ...");
+ rc = proc_start_clocks_chiplet_set_clk_region_reg(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing clock region register");
+ break;
+ }
+
+ // check clock status register to ensure that all clocks are started
+ FAPI_DBG("Chcecking clock status register ...");
+ rc = proc_start_clocks_chiplet_check_clk_status_reg(i_target,
+ i_chiplet_base_addr,
+ i_status_reg_exp);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error checking clock status register");
+ break;
+ }
+
+ // clear force align bit in GP0 register
+ FAPI_DBG("Writing GP0 AND mask to clear force align ...");
+ rc = proc_start_clocks_chiplet_clear_force_align(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing GP0 AND mask to clear force align");
+ break;
+ }
+
+ // clear flushmode inhibit bit in GP0 register
+ FAPI_DBG("Writing GP0 AND mask to clear flushmode inhibit ...");
+ rc = proc_start_clocks_chiplet_clear_flushmode_inhibit(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error writing GP0 AND mask to clear flushmode inhibit");
+ break;
+ }
+
+ // check chiplet FIR register
+ FAPI_DBG("Checking chiplet FIR register for errors after clock start ...");
+ rc = proc_start_clocks_chiplet_check_fir(i_target,
+ i_chiplet_base_addr);
+ if (rc)
+ {
+ FAPI_ERR("proc_start_clocks_generic_chiplet: Error checking chiplet FIR register after clock start");
+ break;
+ }
+
+ } while(0);
+
+ FAPI_DBG("proc_start_clocks_generic_chiplet: End");
+
+ return rc;
+}
+
+
+//------------------------------------------------------------------------------
+// Hardware Procedure
+//------------------------------------------------------------------------------
+fapi::ReturnCode proc_start_clocks_chiplets(const fapi::Target& i_target,
+ bool xbus, bool abus, bool pcie)
+{
+ fapi::ReturnCode rc;
+
+ // mark HWP entry
+ FAPI_IMP("proc_start_clocks_chiplets: Entering ...");
+
+ do
+ {
+ if (xbus)
+ {
+ FAPI_DBG("Starting X bus chiplet clocks ...");
+ rc = proc_start_clocks_generic_chiplet(
+ i_target,
+ X_BUS_CHIPLET_0x04000000,
+ PROC_START_CLOCKS_CHIPLETS_XBUS_CLK_STATUS_REG_EXP);
+ if (rc)
+ {
+ break;
+ }
+ }
+
+ if (abus)
+ {
+ FAPI_DBG("Starting A bus chiplet clocks ...");
+ rc = proc_start_clocks_generic_chiplet(
+ i_target,
+ A_BUS_CHIPLET_0x09000000,
+ PROC_START_CLOCKS_CHIPLETS_ABUS_CLK_STATUS_REG_EXP);
+ if (rc)
+ {
+ break;
+ }
+ }
+
+ if (pcie)
+ {
+ FAPI_DBG("Starting PCIE chiplet clocks ...");
+ rc = proc_start_clocks_generic_chiplet(
+ i_target,
+ PCIE_CHIPLET_0x08000000,
+ PROC_START_CLOCKS_CHIPLETS_PCIE_CLK_STATUS_REG_EXP);
+ if (rc)
+ {
+ break;
+ }
+ }
+
+ } while (0);
+
+ // mark HWP exit
+ FAPI_IMP("proc_start_clocks_chiplets: Exiting ...");
+ return rc;
+}
+
+} // extern "C"
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.H b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.H
new file mode 100644
index 000000000..e8df672ae
--- /dev/null
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets.H
@@ -0,0 +1,114 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_chiplets/proc_start_clocks_chiplets.H $
+//
+// IBM CONFIDENTIAL
+//
+// COPYRIGHT International Business Machines Corp. 2012
+//
+// p1
+//
+// Object Code Only (OCO) source materials
+// Licensed Internal Code Source Materials
+// IBM HostBoot Licensed Internal Code
+//
+// The source code for this program is not published or other-
+// wise divested of its trade secrets, irrespective of what has
+// been deposited with the U.S. Copyright Office.
+//
+// Origin: 30
+//
+// IBM_PROLOG_END
+// $Id: proc_start_clocks_chiplets.H,v 1.3 2012/02/19 15:40:41 jmcgill Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_start_clocks_chiplets.H,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ****
+// *|
+// *! TITLE : proc_start_clocks_chiplets.H
+// *! DESCRIPTION : Start X/A/PCIE chiplet clocks (FAPI)
+// *!
+// *! OWNER NAME : Ralph Koester Email: rkoester@de.ibm.com
+// *! BACKUP NAME : Gebhard Weber Email: gweber@de.ibm.com
+// *!
+// *! ADDITIONAL COMMENTS :
+// *!
+// *! The purpose of this procedure is to start the clocks for X/A/PCIe chiplets
+// *! Reference: FW specification: 7.3, PRV POR specification spreadsheet
+// *! - Start Xbus, ABus, PCIe clocks
+// *! - Drop fences
+// *!
+// *! Prerequisites: proc_a_x_pci_pll_setup
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef _PROC_START_CLOCKS_CHIPLETS_H_
+#define _PROC_START_CLOCKS_CHIPLETS_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <fapi.H>
+#include "p8_scom_addresses.H"
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode
+(*proc_start_clocks_chiplets_FP_t)(const fapi::Target&, bool, bool, bool);
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+// GP3 register bit/field definitions
+const uint8_t GP3_FENCE_EN_BIT = 18;
+
+// GP0 register bit/field definitions
+const uint8_t GP0_ABSTCLK_MUXSEL_BIT = 0;
+const uint8_t GP0_SYNCCLK_MUXSEL_BIT = 1;
+const uint8_t GP0_FLUSHMODE_INHIBIT_BIT = 2;
+const uint8_t GP0_FORCE_ALIGN_BIT = 3;
+const uint8_t GP0_PERV_FENCE_BIT = 63;
+
+// Clock Region Register clock start data patterns
+const uint64_t PROC_START_CLOCKS_CHIPLETS_CLK_REGION_REG_START_NSL_ARY = 0x4FE0060000000000ull;
+const uint64_t PROC_START_CLOCKS_CHIPLETS_CLK_REGION_REG_START_ALL = 0x4FE00E0000000000ull;
+
+// Clock Status Register expected pattern
+// TODO: reconcile expected value wiht pervasive spreadsheet
+const uint64_t PROC_START_CLOCKS_CHIPLETS_XBUS_CLK_STATUS_REG_EXP = 0x0000001FFFFFFFFFull;
+const uint64_t PROC_START_CLOCKS_CHIPLETS_ABUS_CLK_STATUS_REG_EXP = 0x000007FFFFFFFFFFull;
+const uint64_t PROC_START_CLOCKS_CHIPLETS_PCIE_CLK_STATUS_REG_EXP = 0x000007FFFFFFFFFFull;
+
+// Chiplet FIR register expected pattern
+const uint64_t PROC_START_CLOCKS_CHIPLETS_CHIPLET_FIR_REG_EXP = 0x0000000000000000ull;
+
+//------------------------------------------------------------------------------
+// Function prototype
+//------------------------------------------------------------------------------
+
+// function: FAPI proc_start_clocks_chiplets HWP entry point
+// start clocks for X/A/PCIE chiplets
+// parameters: i_target => P8 chip target
+// i_xbus => start X chiplet clocks?
+// i_abus => start A chiplet clocks?
+// i_pcie => start PCIE chiplet clocks?
+// returns: FAPI_RC_SUCCESS if clock start sequence completes successfully
+// else FAPI getscom/putscom return code for failing operation
+fapi::ReturnCode proc_start_clocks_chiplets(const fapi::Target& i_target,
+ bool i_xbus,
+ bool i_abus,
+ bool i_pcie);
+
+} // extern "C"
+
+#endif // _PROC_START_CLOCKS_CHIPLETS_H_
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets_errors.xml b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets_errors.xml
new file mode 100644
index 000000000..a45a815aa
--- /dev/null
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets/proc_start_clocks_chiplets_errors.xml
@@ -0,0 +1,39 @@
+<!-- IBM_PROLOG_BEGIN_TAG
+ This is an automatically generated prolog.
+
+ $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/proc_start_clocks_chiplets_errors.xml $
+
+ IBM CONFIDENTIAL
+
+ COPYRIGHT International Business Machines Corp. 2012
+
+ p1
+
+ Object Code Only (OCO) source materials
+ Licensed Internal Code Source Materials
+ IBM HostBoot Licensed Internal Code
+
+ The source code for this program is not published or other-
+ wise divested of its trade secrets, irrespective of what has
+ been deposited with the U.S. Copyright Office.
+
+ Origin: 30
+
+ IBM_PROLOG_END -->
+<!-- Error definitions for proc_start_clocks_chiplets procedure -->
+<hwpErrors>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_START_CLOCKS_CHIPLETS_CLK_STATUS_ERR</rc>
+ <description>Unexpected clock status register returned after clock start operation.</description>
+ <ffdc>STATUS_REG</ffdc>
+ <ffdc>CHIPLET_BASE_SCOM_ADDR</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_START_CLOCKS_CHIPLETS_FIR_ERR</rc>
+ <description>Unexpected chiplet FIR bit set after clock start operation.</description>
+ <ffdc>FIR_REG</ffdc>
+ <ffdc>CHIPLET_BASE_SCOM_ADDR</ffdc>
+ </hwpError>
+</hwpErrors>
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C
index ee378ac89..c178d0783 100644
--- a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C
@@ -20,15 +20,15 @@
// Origin: 30
//
// IBM_PROLOG_END
-
+
/**
- * @file start_clocks_on_nest_chiplets.C
+ * @file start_clocks_on_nest_chiplets.C
*
- * Support file for IStep: start_clocks_on_nest_chiplets
+ * Support file for IStep: start_clocks_on_nest_chiplets
* Start Clocks On Nest Chiplets
*
* *****************************************************************
- * THIS FILE WAS GENERATED ON 2012-04-11:1605
+ * THIS FILE WAS GENERATED ON 2012-04-03:1952
* *****************************************************************
*
*/
@@ -51,15 +51,19 @@
#include <fapi.H>
#include <fapiPlatHwpInvoker.H>
+// -- prototype includes --
+// Add any customized routines that you don't want overwritten into
+// "start_clocks_on_nest_chiplets_custom.C" and include the prototypes here.
+// #include "start_clocks_on_nest_chiplets_custom.H"
#include "start_clocks_on_nest_chiplets.H"
+#include "proc_start_clocks_chiplets/proc_start_clocks_chiplets.H"
// Uncomment these files as they become available:
// #include "proc_a_x_pci_dmi_pll_setup/proc_a_x_pci_dmi_pll_setup.H"
-// #include "proc_startclock_chiplets/proc_startclock_chiplets.H"
// #include "proc_chiplet_scominit/proc_chiplet_scominit.H"
// #include "proc_scomoverride_chiplets/proc_scomoverride_chiplets.H"
-namespace START_CLOCKS_ON_NEST_CHIPLETS
+namespace START_CLOCKS_ON_NEST_CHIPLETS
{
using namespace TARGETING;
@@ -73,46 +77,56 @@ using namespace fapi;
//
void call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs )
{
- errlHndl_t l_errl = NULL;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_setup entry" );
+ errlHndl_t l_errl = NULL;
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_a_x_pci_dmi_pll_setup entry" );
+
#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
+ // @@@@@ CUSTOM BLOCK: @@@@@
// figure out what targets we need
// customize any other inputs
// set up loops to go through all targets (if parallel, spin off a task)
-
+
+ // print call to hwp and dump physical path of the target(s)
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "===== proc_a_x_pci_dmi_pll_setup HWP(? ? ? )",
+ ?
+ ?
+ ? );
// dump physical path to targets
EntityPath l_path;
l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
l_path.dump();
+ TRACFCOMP( g_trac_mc_init, "===== " );
- // cast OUR type of target to a FAPI type of target.
+ // cast OUR type of target to a FAPI type of target.
const fapi::Target l_fapi_@targetN_target(
TARGET_TYPE_MEMBUF_CHIP,
reinterpret_cast<void *>
(const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
+
// call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, proc_a_x_pci_dmi_pll_setup, _args_...);
- if ( l_errl )
+ l_fapirc = proc_a_x_pci_dmi_pll_setup( ? , ?, ? );
+
+ // process return code.
+ if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : proc_a_x_pci_dmi_pll_setup HWP(? ? ? )" );
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
+ /**
+ * @todo fapi error - just print out for now...
+ */
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: proc_a_x_pci_dmi_pll_setup HWP(? ? ?) ",
+ static_cast<uint32_t>(l_fapirc) );
}
- // @@@@@ END CUSTOM BLOCK: @@@@@
+ // @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_setup exit" );
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_a_x_pci_dmi_pll_setup exit" );
// end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
@@ -126,99 +140,120 @@ void call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs )
//
void call_proc_startclock_chiplets( void *io_pArgs )
{
- errlHndl_t l_errl = NULL;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_startclock_chiplets entry" );
-
-#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
- // figure out what targets we need
- // customize any other inputs
- // set up loops to go through all targets (if parallel, spin off a task)
-
- // dump physical path to targets
- EntityPath l_path;
- l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
- l_path.dump();
-
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_@targetN_target(
- TARGET_TYPE_MEMBUF_CHIP,
- reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
- // call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, proc_startclock_chiplets, _args_...);
- if ( l_errl )
+ errlHndl_t l_err = NULL;
+
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_startclock_chiplets entry" );
+
+ TARGETING::TargetService& l_targetService = targetService();
+ uint8_t l_cpuNum = 0;
+
+ // Use PredicateIsFunctional to filter only functional chips
+ TARGETING::PredicateIsFunctional l_isFunctional;
+ // filter for functional Proc Chips
+ TARGETING::PredicateCTM l_procChipFilter( CLASS_CHIP, TYPE_PROC );
+ TARGETING::PredicatePostfixExpr l_functionalAndProcChipFilter;
+ l_functionalAndProcChipFilter.push(&l_procChipFilter).push(&l_isFunctional).And();
+ TARGETING::TargetRangeFilter l_cpuFilter(
+ l_targetService.begin(),
+ l_targetService.end(),
+ &l_functionalAndProcChipFilter );
+
+ for ( l_cpuNum=0; l_cpuFilter; ++l_cpuFilter, l_cpuNum++ )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
+ const TARGETING::Target* l_cpu_target = *l_cpuFilter;
+ const fapi::Target l_fapi_proc_target(
+ TARGET_TYPE_PROC_CHIP,
+ reinterpret_cast<void *>
+ ( const_cast<TARGETING::Target*>(l_cpu_target) )
+ );
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_startclock_chiplets HWP on..." );
+ // dump physical path to targets
+ EntityPath l_path;
+ l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>();
+ l_path.dump();
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP(l_err, proc_start_clocks_chiplets,
+ l_fapi_proc_target,
+ true, // xbus
+ true, // abus
+ true); // pcie
+ if (l_err)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : proc_startclock_chiplets HWP returns error",
+ l_err->reasonCode());
+ break; // break out of cpuNum
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : proc_startclock_chiplets HWP( )" );
+ }
}
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
- }
- // @@@@@ END CUSTOM BLOCK: @@@@@
-#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_startclock_chiplets exit" );
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_startclock_chiplets exit" );
// end task, returning any errorlogs to IStepDisp
- task_end2( l_errl );
+ task_end2( l_err );
}
-
//
// Wrapper function to call 07.3 :
// proc_chiplet_scominit
//
void call_proc_chiplet_scominit( void *io_pArgs )
{
- errlHndl_t l_errl = NULL;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_chiplet_scominit entry" );
+ errlHndl_t l_errl = NULL;
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_chiplet_scominit entry" );
+
#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
+ // @@@@@ CUSTOM BLOCK: @@@@@
// figure out what targets we need
// customize any other inputs
// set up loops to go through all targets (if parallel, spin off a task)
-
+
+ // print call to hwp and dump physical path of the target(s)
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "===== proc_chiplet_scominit HWP(? ? ? )",
+ ?
+ ?
+ ? );
// dump physical path to targets
EntityPath l_path;
l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
l_path.dump();
+ TRACFCOMP( g_trac_mc_init, "===== " );
- // cast OUR type of target to a FAPI type of target.
+ // cast OUR type of target to a FAPI type of target.
const fapi::Target l_fapi_@targetN_target(
TARGET_TYPE_MEMBUF_CHIP,
reinterpret_cast<void *>
(const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
+
// call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, proc_chiplet_scominit, _args_...);
- if ( l_errl )
+ l_fapirc = proc_chiplet_scominit( ? , ?, ? );
+
+ // process return code.
+ if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : proc_chiplet_scominit HWP(? ? ? )" );
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
+ /**
+ * @todo fapi error - just print out for now...
+ */
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: proc_chiplet_scominit HWP(? ? ?) ",
+ static_cast<uint32_t>(l_fapirc) );
}
- // @@@@@ END CUSTOM BLOCK: @@@@@
+ // @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_chiplet_scominit exit" );
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_chiplet_scominit exit" );
// end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
@@ -232,46 +267,56 @@ void call_proc_chiplet_scominit( void *io_pArgs )
//
void call_proc_scomoverride_chiplets( void *io_pArgs )
{
- errlHndl_t l_errl = NULL;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_scomoverride_chiplets entry" );
+ errlHndl_t l_errl = NULL;
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_scomoverride_chiplets entry" );
+
#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
+ // @@@@@ CUSTOM BLOCK: @@@@@
// figure out what targets we need
// customize any other inputs
// set up loops to go through all targets (if parallel, spin off a task)
-
+
+ // print call to hwp and dump physical path of the target(s)
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "===== proc_scomoverride_chiplets HWP(? ? ? )",
+ ?
+ ?
+ ? );
// dump physical path to targets
EntityPath l_path;
l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
l_path.dump();
+ TRACFCOMP( g_trac_mc_init, "===== " );
- // cast OUR type of target to a FAPI type of target.
+ // cast OUR type of target to a FAPI type of target.
const fapi::Target l_fapi_@targetN_target(
TARGET_TYPE_MEMBUF_CHIP,
reinterpret_cast<void *>
(const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
+
// call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, proc_scomoverride_chiplets, _args_...);
- if ( l_errl )
+ l_fapirc = proc_scomoverride_chiplets( ? , ?, ? );
+
+ // process return code.
+ if ( l_fapirc== fapi::FAPI_RC_SUCCESS )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : proc_scomoverride_chiplets HWP(? ? ? )" );
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
+ /**
+ * @todo fapi error - just print out for now...
+ */
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: proc_scomoverride_chiplets HWP(? ? ?) ",
+ static_cast<uint32_t>(l_fapirc) );
}
- // @@@@@ END CUSTOM BLOCK: @@@@@
+ // @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_scomoverride_chiplets exit" );
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_scomoverride_chiplets exit" );
// end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H
index 1f1503dd9..d688c2d96 100644
--- a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H
+++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H
@@ -33,7 +33,7 @@
* tasks by the @ref IStepDispatcher.
*
* *****************************************************************
- * THIS FILE WAS GENERATED ON 2012-04-11:1605
+ * THIS FILE WAS GENERATED ON 2012-04-03:1952
* *****************************************************************
*
*/
@@ -69,7 +69,7 @@
* @target_sched serial
* @}
*
- */
+ */
/******************************************************************************/
// Includes
@@ -87,7 +87,7 @@ namespace START_CLOCKS_ON_NEST_CHIPLETS
* 07.1 : : Setup PLL for A, X, PCIe, DMI
*
* param[in,out] - pointer to any arguments, usually NULL
- *
+ *
* return none
*
*/
@@ -101,7 +101,7 @@ void call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs );
* 07.2 : : Start clocks on A, X, PCIe chiplets
*
* param[in,out] - pointer to any arguments, usually NULL
- *
+ *
* return none
*
*/
@@ -115,7 +115,7 @@ void call_proc_startclock_chiplets( void *io_pArgs );
* 07.3 : : Apply scom inits to chiplets
*
* param[in,out] - pointer to any arguments, usually NULL
- *
+ *
* return none
*
*/
@@ -129,7 +129,7 @@ void call_proc_chiplet_scominit( void *io_pArgs );
* 07.4 : : Apply sequenced scom inits
*
* param[in,out] - pointer to any arguments, usually NULL
- *
+ *
* return none
*
*/
OpenPOWER on IntegriCloud