diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2015-10-23 09:57:37 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2015-12-11 15:30:26 -0600 |
commit | 0d9998e37c153a2b32fb2e7014152e01823ace86 (patch) | |
tree | 51bb5a9863f0bf7393abacb765113c93d0121997 /src/usr/isteps/istep08 | |
parent | a4ccd3d722669446c136632b6b501c0748ca3be3 (diff) | |
download | talos-hostboot-0d9998e37c153a2b32fb2e7014152e01823ace86.tar.gz talos-hostboot-0d9998e37c153a2b32fb2e7014152e01823ace86.zip |
P9 Isteps: Created directory structure for istep 8 wrappers
Change-Id: Ib7dcadad57637cb1a97e6920ca2930700551f866
RTC:137652
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21459
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep08')
17 files changed, 2350 insertions, 0 deletions
diff --git a/src/usr/isteps/istep08/call_host_cbs_start.C b/src/usr/isteps/istep08/call_host_cbs_start.C new file mode 100644 index 000000000..89912d0de --- /dev/null +++ b/src/usr/isteps/istep08/call_host_cbs_start.C @@ -0,0 +1,89 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_host_cbs_start.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file call_host_cbs_start.C + * + * Support file for IStep: slave_sbe + * Slave SBE + * + * HWP_IGNORE_VERSION_CHECK + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> +#include <initservice/initsvcreasoncodes.H> +#include <sys/time.h> +#include <devicefw/userif.H> +#include <i2c/i2cif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> +#include <targeting/namedtarget.H> +#include <targeting/attrsync.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +namespace ISTEP_08 +{ + +//****************************************************************************** +// call_host_cbs_start() +//****************************************************************************** +void* call_host_cbs_start(void *io_pArgs) +{ + errlHndl_t l_errl = NULL; + IStepError l_stepError; + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_cbs_start entry" ); + + //@TODO RTC:134078 + //call host_cbs_start + //FAPI_INVOKE_HWP(l_errl,p9_start_cbs); + if(l_errl) + { + l_stepError.addErrorDetails(l_errl); + errlCommit(l_errl, HWPF_COMP_ID); + } + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_cbs_start exit" ); + return l_stepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_host_rng_bist.C b/src/usr/isteps/istep08/call_host_rng_bist.C new file mode 100644 index 000000000..eb0338d48 --- /dev/null +++ b/src/usr/isteps/istep08/call_host_rng_bist.C @@ -0,0 +1,92 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_host_rng_bist.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file host_rng_bist.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//****************************************************************************** +// wrapper function to call proc_chiplet_enable_ridi +//****************************************************************************** +void* call_host_rng_bist( void *io_pArgs ) +{ + + errlHndl_t l_err = NULL; + IStepError l_StepError; + + // @TODO RTC:134078 Call HWP + //FAPI_INVOKE_HWP(l_err,p9_trigger_rng_bist); + if(l_err) + { + l_StepError.addErrorDetails(l_err); + errlCommit(l_err, HWPF_COMP_ID); + } + + return l_StepError.getErrorHandle(); +} + +}; // end namespace diff --git a/src/usr/isteps/istep08/call_host_setup_sbe.C b/src/usr/isteps/istep08/call_host_setup_sbe.C new file mode 100644 index 000000000..0b8991d45 --- /dev/null +++ b/src/usr/isteps/istep08/call_host_setup_sbe.C @@ -0,0 +1,88 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_host_setup_sbe.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file call_host_setup_sbe.C + * + * Support file for IStep: slave_sbe + * Slave SBE + * + * HWP_IGNORE_VERSION_CHECK + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> +#include <initservice/initsvcreasoncodes.H> +#include <sys/time.h> +#include <devicefw/userif.H> +#include <i2c/i2cif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> +#include <targeting/namedtarget.H> +#include <targeting/attrsync.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +namespace ISTEP_08 +{ + +//****************************************************************************** +// call_host_setup_sbe() +//****************************************************************************** +void* call_host_setup_sbe(void *io_pArgs) +{ + errlHndl_t l_errl = NULL; + IStepError l_stepError; + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_setup_sbe entry" ); + + //@TODO RTC:134078 + //call host_setup_sbe + //FAPI_INVOKE_HWP(l_errl,p9_set_fsi_gp_shadow); + if(l_errl) + { + l_stepError.addErrorDetails(l_errl); + errlCommit(l_errl, HWPF_COMP_ID); + } + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_setup_sbe exit" ); + return l_stepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_host_slave_sbe_config.C b/src/usr/isteps/istep08/call_host_slave_sbe_config.C new file mode 100644 index 000000000..ee4ba9480 --- /dev/null +++ b/src/usr/isteps/istep08/call_host_slave_sbe_config.C @@ -0,0 +1,210 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_host_slave_sbe_config.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file call_host_slave_sbe_config.C + * + * Support file for IStep: slave_sbe + * Slave SBE + * + * HWP_IGNORE_VERSION_CHECK + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> +#include <initservice/initsvcreasoncodes.H> +#include <sys/time.h> +#include <devicefw/userif.H> +#include <i2c/i2cif.H> +#include <sbe/sbeif.H> +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> +#include <targeting/namedtarget.H> +#include <targeting/attrsync.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +namespace ISTEP_08 +{ +//****************************************************************************** +// set_proc_boot_voltage_vid +//****************************************************************************** +errlHndl_t set_proc_boot_voltage_vid() +{ + errlHndl_t l_errl = NULL; + IStepError l_stepError; + TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ENTER set_proc_boot_voltage_vid()"); + do + { + // Get the top level target/system target + Target* l_pTopLevelTarget = NULL; + targetService().getTopLevelTarget(l_pTopLevelTarget); + + // If there is no top level target, terminate + assert(l_pTopLevelTarget, "ERROR: Top level " + "target not found - slave_sbe.C::set_proc_boot_voltage_vid"); + + // Get all Procs + PredicateCTM l_proc(CLASS_CHIP, TYPE_PROC); + PredicateIsFunctional l_functional; + PredicatePostfixExpr l_procs; + + l_procs.push(&l_proc).push(&l_functional).And(); + + TargetRangeFilter l_filter( targetService().begin(), + targetService().end(), + &l_procs); + + //@TODO: RTC:133836 add this get ATTR + /* + ATTR_BOOT_FREQ_MHZ_type l_boot_freq_mhz = + l_pTopLevelTarget->getAttr<ATTR_BOOT_FREQ_MHZ>(); + for(; l_filter; ++l_filter) + { + + l_errl = FREQVOLTSVC::runProcGetVoltage(*l_filter, + l_boot_freq_mhz); + if( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR: calling runProcGetVoltage for Proc " + "Target HUID[0x%08X]", + l_filter->getAttr<ATTR_HUID>()); + + + // Deconfig the processor + l_errl->addHwCallout(*l_filter, + HWAS::SRCI_PRIORITY_LOW, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + } + } +*/ + + }while( 0 ); + return l_errl; +} + +//****************************************************************************** +// call_host_slave_sbe function +//****************************************************************************** +void* call_host_slave_sbe_config(void *io_pArgs) +{ + errlHndl_t l_errl = NULL; + IStepError l_stepError; + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_config entry" ); + + //@TODO RTC:134078 + // execute proc_read_nest_freq.C + // execute p9_setup_sbe_config.C + // FAPI_INVOKE_HWP(l_errl,p9_setup_sbe_config); + //if(l_errl) + //{ + // l_stepError.addErrorDetails(l_errl); + // errlCommit(l_errl, HWPF_COMP_ID); + //} + +#ifdef CONFIG_HTMGT + // Set system frequency attributes + l_errl = FREQVOLTSVC::setSysFreq(); + if (l_errl ) + { + // Create IStep error log and cross reference error that occurred + l_stepError.addErrorDetails( l_errl ); + + // Commit Error + errlCommit( l_errl, HWPF_COMP_ID ); + } +#endif // CONFIG_HTMGT + + // If there is no FSP, set ATTR_PROC_BOOT_VOLTAGE_VID + if (!INITSERVICE::spBaseServicesEnabled()) + { + l_errl = set_proc_boot_voltage_vid(); + if( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Error setting PROC_BOOT_VOLTAGE_VID: " + "slave_sbe.C::call_host_slave_sbe_config()"); + // Create IStep error log + l_stepError.addErrorDetails( l_errl ); + + // Commit Error + errlCommit( l_errl, HWPF_COMP_ID ); + + } + + // Enable SBE interrupt for OP systems + TARGETING::Target* l_sys = NULL; + targetService().getTopLevelTarget(l_sys); + assert( l_sys != NULL ); + + //@TODO: RTC:133836 Add this set ATTR call + //TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Enabling SBE interrupt for OP systems"); + //l_sys->setAttr<ATTR_FORCE_SKIP_SBE_MASTER_INTR_SERVICE>(0); + } + + // Resolve the side characteristics of the Processor SBE Seeproms + errlHndl_t err = SBE::resolveProcessorSbeSeeproms(); + if ( err ) + { + // Create IStep error log and cross reference error that occurred + l_stepError.addErrorDetails( err ); + + // Commit Error + errlCommit( err, HWPF_COMP_ID ); + } + + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_config exit" ); + + + + // end task, returning any errorlogs to IStepDisp + return l_stepError.getErrorHandle(); + +} +}; diff --git a/src/usr/isteps/istep08/call_proc_abus_scominit.C b/src/usr/isteps/istep08/call_proc_abus_scominit.C new file mode 100644 index 000000000..aa4b912ea --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_abus_scominit.C @@ -0,0 +1,179 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_abus_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_abus_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_abus_scominit +//****************************************************************************** +void* call_proc_abus_scominit( void *io_pArgs ) +{ + +// errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_abus_scominit entry" ); + + TARGETING::TargetHandleList l_cpuTargetList; + getAllChips(l_cpuTargetList, TYPE_PROC); + + do + { + + // @TODO RTC:134078 + /* TargetPairs_t is defined in pbusLinkSvc, which is used by + * other isteps too + EDI_EI_INITIALIZATION::TargetPairs_t l_AbusConnections; + // Note: + // i_noDuplicate parameter must be set to false because + // two separate calls would be needed: + // A0 <--> A1 + // A1 <--> A0 + // only the first target is used to issue SCOMs + l_err = + EDI_EI_INITIALIZATION::PbusLinkSvc::getTheInstance().getPbusConnections( + l_AbusConnections, TYPE_ABUS, false); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : getPbusConnections ABUS returns error", + l_err->reasonCode()); + + // Create IStep error log and cross reference to error that occurred + l_StepError.addErrorDetails( l_err ); + + // Commit the error log + // Log should be deleted and set to NULL in errlCommit. + errlCommit(l_err, HWPF_COMP_ID); + + // Shouldn't continue on this fatal error (no ABUS), break out + break; + } + + // For each ABUS pair + for (EDI_EI_INITIALIZATION::TargetPairs_t::iterator + l_abusPairIter = l_AbusConnections.begin(); + l_abusPairIter != l_AbusConnections.end(); + ++l_abusPairIter) + { + // Make local copies of ABUS targets for ease of use + TARGETING::Target* l_thisAbusTarget = + const_cast<TARGETING::Target*>(l_abusPairIter->first); + TARGETING::Target* l_connectedAbusTarget = + const_cast<TARGETING::Target*>(l_abusPairIter->second); + + // Get this abus fapi taget + const fapi::Target l_fapi_this_abus_target( + TARGET_TYPE_ABUS_ENDPOINT, + const_cast<TARGETING::Target*>(l_thisAbusTarget)); + + // Get connected abus fapi taget + const fapi::Target l_fapi_connected_abus_target( + TARGET_TYPE_ABUS_ENDPOINT, + const_cast<TARGETING::Target*>(l_connectedAbusTarget)); + + // Call HW procedure + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_abus_scominit HWP on " + "Abus target HUID %.8X Connected Abus target HUID %.8X", + TARGETING::get_huid(l_thisAbusTarget), + TARGETING::get_huid(l_connectedAbusTarget)); + //@TODO RTC:134078 + //FAPI_INVOKE_HWP(l_err, p9_abus_scominit, + // l_fapi_this_abus_target, + // l_fapi_connected_abus_target); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR %.8X : proc_abus_scominit HWP returns error. " + "Abus target HUID %.8X, Connected Abus target HUID %.8X", + l_err->reasonCode(), + TARGETING::get_huid(l_thisAbusTarget), + TARGETING::get_huid(l_connectedAbusTarget)); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_thisAbusTarget).addToLog( l_err ); + ErrlUserDetailsTarget(l_connectedAbusTarget).addToLog( l_err ); + + // Create IStep error log and cross ref to error that occurred + l_StepError.addErrorDetails( l_err ); + // We want to continue to the next target instead of exiting, + // Commit the error log and move on + // Note: Error log should already be deleted and set to NULL + // after committing + errlCommit(l_err, HWPF_COMP_ID); + } + } // End abus list loop + */ + } while (0); + + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_attr_update.C b/src/usr/isteps/istep08/call_proc_attr_update.C new file mode 100644 index 000000000..a95c45c9f --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_attr_update.C @@ -0,0 +1,98 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_attr_update.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_attr_update.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_attr_update +//***************************************************************************** +void * call_proc_attr_update( void * io_pArgs ) +{ + IStepError l_StepError; + errlHndl_t l_err = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_attr_update entry" ); + + //@TODO: RTC:134078 Add HWP back in + //FAPI_INVOKE_HWP(l_err,p9_attr_update); + if(l_err) + { + l_StepError.addErrorDetails(l_err); + errlCommit(l_err, HWPF_COMP_ID); + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_attr_update exit" ); + + return l_StepError.getErrorHandle(); + +} +}; diff --git a/src/usr/isteps/istep08/call_proc_cen_ref_clk_enable.C b/src/usr/isteps/istep08/call_proc_cen_ref_clk_enable.C new file mode 100644 index 000000000..bdf1b63f1 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_cen_ref_clk_enable.C @@ -0,0 +1,302 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_cen_ref_clk_enable.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file call_proc_cen_ref_clk_enable.C + * + * Support file for IStep: slave_sbe + * Slave SBE + * + * HWP_IGNORE_VERSION_CHECK + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> +#include <initservice/initsvcreasoncodes.H> +#include <sys/time.h> +#include <devicefw/userif.H> +#include <i2c/i2cif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> +#include <targeting/namedtarget.H> +#include <targeting/attrsync.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + + + +const uint64_t MS_TO_WAIT_FIRST = 2500; //(2.5 s) +const uint64_t MS_TO_WAIT_OTHERS= 100; //(100 ms) + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +namespace ISTEP_08 +{ + +uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procChipHandle ); +void fenceAttachedMembufs( TARGETING::Target * i_procChipHandle ); + +//****************************************************************************** +// call_proc_cen_ref_clock_enable +//****************************************************************************** +void* call_proc_cen_ref_clk_enable(void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + IStepError l_stepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_cen_ref_clock_enable enter" ); + + TARGETING::TargetHandleList functionalProcChipList; + + getAllChips(functionalProcChipList, TYPE_PROC, true); + + // loop thru the list of processors + for (TargetHandleList::const_iterator + l_proc_iter = functionalProcChipList.begin(); + l_proc_iter != functionalProcChipList.end(); + ++l_proc_iter) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", + TARGETING::get_huid( *l_proc_iter )); + + uint8_t l_membufsAttached = 0; + // get a bit mask of present/functional dimms assocated with + // this processor + l_membufsAttached = getMembufsAttachedBitMask( *l_proc_iter ); + + //Perform a workaround for GA1 to raise fences on centaurs + //to prevent FSP from analyzing if HB TIs for recoverable + //errors + //RTC 106276 + fenceAttachedMembufs( *l_proc_iter ); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "passing target HUID %.8X and 0x%x mask", + TARGETING::get_huid( *l_proc_iter ), l_membufsAttached ); + + if( l_membufsAttached ) + { + + /* @TODO RTC:134078 use fapi2 targets + fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP, + *l_proc_iter ); + */ + + // Invoke the HWP passing in the proc target and + // a bit mask indicating connected centaurs + // Cumulus only + //@TODO RTC:134078 + //FAPI_INVOKE_HWP(l_errl, + // p9_proc_cen_ref_clk_enable, + // l_fapiProcTarget, l_membufsAttached ); + + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_cen_ref_clk_enable", + "failed, returning errorlog" ); + + // capture the target data in the elog + ErrlUserDetailsTarget( *l_proc_iter ).addToLog( l_errl ); + + // Create IStep error log and cross ref error that occurred + l_stepError.addErrorDetails( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_cen_ref_clk_enable", + "completed ok"); + } + } + } // endfor + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_cen_ref_clock_enable exit" ); + + // end task, returning any errorlogs to IStepDisp + return l_stepError.getErrorHandle(); +} + +//****************************************************************************** +// getMembufsAttachedBitMask - helper function for hwp proc_cen_ref_clk_enable +//****************************************************************************** +uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procTarget ) +{ + const uint8_t MCS_WITH_ATTACHED_CENTAUR_MASK = 0x80; + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Finding functional membuf chips downstream from " + "proc chip with HUID of 0x%08X", + i_procTarget->getAttr<TARGETING::ATTR_HUID>()); + + uint8_t l_attachedMembufs = 0; + + // Get list of functional membuf chips downstream from the given + // proc chip + TARGETING::TargetHandleList functionalMembufChipList; + + getChildAffinityTargets( functionalMembufChipList, + const_cast<TARGETING::Target*>(i_procTarget ), + TARGETING::CLASS_CHIP, + TARGETING::TYPE_MEMBUF, + true); + + // loop through the functional membufs + for(TARGETING::TargetHandleList::const_iterator pTargetItr + = functionalMembufChipList.begin(); + pTargetItr != functionalMembufChipList.end(); + pTargetItr++) + { + // Find each functional membuf chip's upstream functional MCS + // unit, if any, and accumulate it into the attached membuf + // chips mask + TARGETING::TargetHandleList functionalMcsUnitList; + + getParentAffinityTargets( functionalMcsUnitList, *pTargetItr, + TARGETING::CLASS_UNIT, TARGETING::TYPE_MCS, + true ); + + if(functionalMcsUnitList.empty()) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Functional membuf chip with HUID of 0x%08X " + "is not attached to an upstream functional MCS", + (*pTargetItr)->getAttr< + TARGETING::ATTR_HUID>()); + continue; + } + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Found functional MCS unit with HUID of 0x%08X " + "upstream from functional membuf chip with HUID of 0x%08X", + ((*functionalMcsUnitList.begin())->getAttr< + TARGETING::ATTR_CHIP_UNIT>()), + (*pTargetItr)->getAttr< + TARGETING::ATTR_HUID>()); + l_attachedMembufs |= + ((MCS_WITH_ATTACHED_CENTAUR_MASK) >> + ((*functionalMcsUnitList.begin())->getAttr< + TARGETING::ATTR_CHIP_UNIT>())); + } + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Proc chip with HUID of 0x%08X has attached membuf " + "mask (l_attachedMembufs) of 0x%02X", + i_procTarget->getAttr<TARGETING::ATTR_HUID>(), + l_attachedMembufs); + + // return the bitmask + return l_attachedMembufs; + +} + +//****************************************************************************** +// fenceAttachedMembufs - helper function for hwp proc_cen_ref_clk_enable +//****************************************************************************** +void fenceAttachedMembufs( TARGETING::Target * i_procTarget ) +{ + errlHndl_t l_errl = NULL; + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Fencing attached (present) membuf chips downstream from " + "proc chip with HUID of 0x%08X", + i_procTarget->getAttr<TARGETING::ATTR_HUID>()); + + + // Get list of membuf chips downstream from the given proc chip + TARGETING::TargetHandleList MembufChipList; + + getChildAffinityTargetsByState( MembufChipList, + const_cast<TARGETING::Target*>(i_procTarget ), + TARGETING::CLASS_CHIP, + TARGETING::TYPE_MEMBUF, + TARGETING::UTIL_FILTER_PRESENT); + + // loop through the membufs + for(TARGETING::TargetHandleList::const_iterator pTargetItr + = MembufChipList.begin(); + pTargetItr != MembufChipList.end(); + pTargetItr++) + { + //Get CFAM "1012" -- FSI GP3 and set bits 23-27 (various fence bits) + //Note 1012 is ecmd addressing, real address is 0x1048 (byte) + uint64_t l_addr = 0x1048; + const uint32_t l_fence_bits= 0x000001F0; + uint32_t l_data = 0; + size_t l_size = sizeof(uint32_t); + l_errl = deviceRead(*pTargetItr, + &l_data, + l_size, + DEVICE_FSI_ADDRESS(l_addr)); + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Failed getcfam 1012 to HUID 0x%08X, ignoring, skipping", + (*pTargetItr)->getAttr<TARGETING::ATTR_HUID>()); + delete l_errl; + l_errl = NULL; + continue; + } + + l_data |= l_fence_bits; + + l_errl = deviceWrite(*pTargetItr, + &l_data, + l_size, + DEVICE_FSI_ADDRESS(l_addr)); + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Failed putcfam 1012 to HUID 0x%08X, ignoring, skipping", + (*pTargetItr)->getAttr<TARGETING::ATTR_HUID>()); + delete l_errl; + l_errl = NULL; + continue; + } + } + +} + +} diff --git a/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C b/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C new file mode 100644 index 000000000..0ff4d4b58 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C @@ -0,0 +1,276 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file call_proc_check_slave_sbe_seeprom_complete.C + * + * Support file for IStep: slave_sbe + * Slave SBE + * + * HWP_IGNORE_VERSION_CHECK + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> +#include <initservice/initsvcreasoncodes.H> +#include <sys/time.h> +#include <devicefw/userif.H> +#include <i2c/i2cif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> +#include <targeting/namedtarget.H> +#include <targeting/attrsync.H> + +#include <isteps/hwpisteperror.H> +#include <errl/errludtarget.H> + + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +namespace ISTEP_08 +{ + +//****************************************************************************** +// call_proc_check_slave_sbe_seeprom_complete function +//****************************************************************************** +void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + //@TODO RTC:134078 +/* IStepError l_stepError; + void* sbeImgPtr = NULL; + size_t sbeImgSize = 0; + //size_t l_wait_time = MS_TO_WAIT_OTHERS; + + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_check_slave_sbe_seeprom_complete entry" ); + + //If in FSPless environment -- give time for SBE to complete on first chip +*/ + /*if (!INITSERVICE::spBaseServicesEnabled()) + { + l_wait_time = MS_TO_WAIT_FIRST; + }*/ +/* + // + // get the master Proc target, we want to IGNORE this one. + // + TARGETING::Target* l_pMasterProcTarget = NULL; + TARGETING::targetService().masterProcChipTargetHandle(l_pMasterProcTarget); + + // + // get a list of all the procs in the system + // + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "proc_check_slave_sbe_seeprom_complete: %d procs in the system.", + l_procTargetList.size() ); + + // loop thru all the cpu's + for (TargetHandleList::const_iterator + l_proc_iter = l_procTargetList.begin(); + l_proc_iter != l_procTargetList.end(); + ++l_proc_iter) + { + // make a local copy of the Processor target + TARGETING::Target* l_pProcTarget = *l_proc_iter; + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", + TARGETING::get_huid(l_pProcTarget)); + + if ( l_pProcTarget == l_pMasterProcTarget ) + { + // we are just checking the Slave SBE's, skip the master + continue; + } + + l_errl = SBE::findSBEInPnor(l_pProcTarget,sbeImgPtr,sbeImgSize); + + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_check_slave_sbe_seeprom_complete " + "Can't find SBE image in pnor"); + } + + fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP, + l_pProcTarget ); + //@TODO RTC:134078 + // Invoke the HWP + fapi::ReturnCode rc_fapi = fapi::FAPI_RC_SUCCESS; + */ /*FAPI_EXEC_HWP(rc_fapi, + p9_check_slave_sbe_seeprom_complete, + l_fapiProcTarget, + sbeImgPtr, + l_wait_time);*/ + + // check for re ipl request + /* if(static_cast<uint32_t>(rc_fapi) == + fapi::RC_PROC_EXTRACT_SBE_RC_ENGINE_RETRY) + { + l_errl = fapi::fapiRcToErrl(rc_fapi); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl ); + + l_errl->setSev(ERRL_SEV_INFORMATIONAL); + + errlCommit( l_errl, HWPF_COMP_ID ); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_extract_sbe_rc requesting reIPL:" + " Calling INITSERVICE::doShutdown() with " + "SBE_EXTRACT_RC_REQUEST_REIPL = 0x%x", + INITSERVICE::SBE_EXTRACT_RC_REQUEST_REIPL); + + INITSERVICE::doShutdown + ( INITSERVICE::SBE_EXTRACT_RC_REQUEST_REIPL); + // doShutdown does not return + } + else + { + l_errl = fapi::fapiRcToErrl(rc_fapi); + } + + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_check_slave_sbe_seeprom_complete", + "failed, returning errorlog" ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl ); + + // Create IStep error log and cross reference to error that occurred + l_stepError.addErrorDetails( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_check_slave_sbe_seeprom_complete", + "completed ok"); + + } + + //after first one default to quick check time + //l_wait_time = MS_TO_WAIT_OTHERS; + } // endfor + + + // Once the sbe's are up correctly, fetch all the proc ECIDs and + // store them in an attribute. + for (TargetHandleList::const_iterator + l_proc_iter = l_procTargetList.begin(); + l_proc_iter != l_procTargetList.end(); + ++l_proc_iter) + { + // make a local copy of the Processor target + TARGETING::Target* l_pProcTarget = *l_proc_iter; + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X --> calling proc_getecid", + TARGETING::get_huid(l_pProcTarget)); + + fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP, + l_pProcTarget ); + + // proc_getecid should set the fuse string to 112 bits long. + ecmdDataBufferBase l_fuseString; + //@TODO RTC:134078 + // Invoke the HWP + FAPI_INVOKE_HWP(l_errl, + proc_getecid, + l_fapiProcTarget, + l_fuseString ); + + if (l_errl) + { + if (l_procTargetList->getAttr<ATTR_HWAS_STATE>().functional) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_getecid", + " failed, returning errorlog" ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl ); + + // Create IStep error log and cross reference error that + // occurred + l_stepError.addErrorDetails( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + } + else // Not functional, proc deconfigured, don't report error + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_getecid", + " failed, proc target deconfigured" ); + + delete l_errl; + l_errl = NULL; + } + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_getecid", + " completed ok"); + + } + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X --> after proc_getecid", + TARGETING::get_huid(l_pProcTarget)); + + } // endfor + + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_check_slave_sbe_seeprom_complete exit"); + + // end task, returning any errorlogs to IStepDisp + return l_stepError.getErrorHandle(); + */ + return l_errl; +} +}; diff --git a/src/usr/isteps/istep08/call_proc_chiplet_enable_ridi.C b/src/usr/isteps/istep08/call_proc_chiplet_enable_ridi.C new file mode 100644 index 000000000..84f2e1c55 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_chiplet_enable_ridi.C @@ -0,0 +1,98 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_chiplet_enable_ridi.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_chiplet_enable_ridi.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//****************************************************************************** +// wrapper function to call proc_chiplet_enable_ridi +//****************************************************************************** +void* call_proc_chiplet_enable_ridi( void *io_pArgs ) +{ + + errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_enable_ridi entry" ); + // @TODO RTC:134078 Call HWP + //FAPI_INVOKE_HWP(l_err,p9_chiplet_enable_ridi); + if(l_err) + { + l_StepError.addErrorDetails(l_err); + errlCommit(l_err, HWPF_COMP_ID); + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_enable_ridi"); + + return l_StepError.getErrorHandle(); +} + +}; // end namespace diff --git a/src/usr/isteps/istep08/call_proc_chiplet_scominit.C b/src/usr/isteps/istep08/call_proc_chiplet_scominit.C new file mode 100644 index 000000000..880f85e08 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_chiplet_scominit.C @@ -0,0 +1,144 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_chiplet_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_chiplet_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//****************************************************************************** +// wrapper function to call proc_chiplet_scominit +//****************************************************************************** +void* call_proc_chiplet_scominit( void *io_pArgs ) +{ + //errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_scominit entry" ); + + TARGETING::TargetHandleList l_cpuTargetList; + getAllChips(l_cpuTargetList, TYPE_PROC); + + do + { + // If running Sapphire, set sleep enable attribute here so + // initfile can be run correctly + if(is_sapphire_load()) + { + TARGETING::Target* l_sys = NULL; + TARGETING::targetService().getTopLevelTarget(l_sys); + assert( l_sys != NULL ); + uint8_t l_sleepEnable = 1; + l_sys->setAttr<TARGETING::ATTR_PM_SLEEP_ENABLE>(l_sleepEnable); + } + + // ---------------------------------------------- + // Execute PROC_CHIPLET_SCOMINIT_FBC_IF initfile + // ---------------------------------------------- + + for (TARGETING::TargetHandleList::const_iterator + l_cpuIter = l_cpuTargetList.begin(); + l_cpuIter != l_cpuTargetList.end(); + ++l_cpuIter) + { + /* @TODO: RTC:134078 Use fapi2 targets + const TARGETING::Target* l_cpu_target = *l_cpuIter; + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, + ( const_cast<TARGETING::Target*>(l_cpu_target) ) ); + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_chiplet_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); + + // @TODO RTC:134078 call the HWP with each fapi::Target + //FAPI_INVOKE_HWP(l_err, p9_chiplet_scominit, l_fapi_proc_target); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " + "proc_chiplet_scominit HWP returns error. target HUID %.8X", + l_err->reasonCode(), TARGETING::get_huid(l_cpu_target)); + + ErrlUserDetailsTarget(l_cpu_target).addToLog( l_err ); + + // Create IStep error log and cross ref to error that occurred + l_StepError.addErrorDetails( l_err ); + // We want to continue to the next target instead of exiting, + // Commit the error log and move on + // Note: Error log should already be deleted and set to NULL + // after committing + errlCommit(l_err, HWPF_COMP_ID); + } + //call p9_psi_scominit + //FAPI_INVOKE_HWP(l_err,p9_psi_scominit); + */ + } + + } while (0); + + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_enable_osclite.C b/src/usr/isteps/istep08/call_proc_enable_osclite.C new file mode 100644 index 000000000..dd7e0d45a --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_enable_osclite.C @@ -0,0 +1,96 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_enable_osclite.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_enable_osclite.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_enable_osclite +//***************************************************************************** +void* call_proc_enable_osclite(void *io_pArgs) +{ + errlHndl_t l_errl = NULL; + IStepError l_stepError; + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_enable_osclite" ); + + //@TODO RTC:134078 + //call p9_enable_osclite + //Cumulus only + //FAPI_INVOKE_HWP(l_errl,p9_enable_osclite); + if(l_errl) + { + l_stepError.addErrorDetails(l_errl); + errlCommit(l_errl, HWPF_COMP_ID); + } + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_enable_osclite" ); + return l_stepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_npu_scominit.C b/src/usr/isteps/istep08/call_proc_npu_scominit.C new file mode 100644 index 000000000..6104793f6 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_npu_scominit.C @@ -0,0 +1,97 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_npu_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_npu_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//****************************************************************************** +// wrapper function to call proc_npu_scominit +//****************************************************************************** +void* call_proc_npu_scominit( void *io_pArgs ) +{ + + errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_npu_scominit entry" ); + //@TODO RTC:134078 Call HWP + //FAPI_INVOKE_HWP(l_err,p9_npu_scominit); + if(l_err) + { + l_StepError.addErrorDetails(l_err); + errlCommit(l_err, HWPF_COMP_ID); + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_npu_scominit exit"); + + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_obus_scominit.C b/src/usr/isteps/istep08/call_proc_obus_scominit.C new file mode 100644 index 000000000..f94ebc16d --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_obus_scominit.C @@ -0,0 +1,97 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_obus_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_obus_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//****************************************************************************** +// wrapper function to call proc_obus_scominit +//****************************************************************************** +void* call_proc_obus_scominit( void *io_pArgs ) +{ + + errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_obus_scominit entry" ); + //@TODO RTC:134078 Call HWP + //FAPI_INVOKE_HWP(l_err,p9_obus_scominit); + if(l_err) + { + l_StepError.addErrorDetails(l_err); + errlCommit(l_err, HWPF_COMP_ID); + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_obus_scominit exit"); + + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_pcie_scominit.C b/src/usr/isteps/istep08/call_proc_pcie_scominit.C new file mode 100644 index 000000000..ebf26d82e --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_pcie_scominit.C @@ -0,0 +1,158 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_pcie_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_pcie_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_pcie_scominit +//****************************************************************************** +void* call_proc_pcie_scominit( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + //@TODO RTC:134078 +/* IStepError l_StepError; + + bool spBaseServicesEnabled = INITSERVICE::spBaseServicesEnabled(); + + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); + + for ( TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter ) + { + TARGETING::Target* const l_proc_target = *l_iter; + + // Compute the PCIE attribute config on all non-SP systems, since SP + // won't be there to do it. + if(!spBaseServicesEnabled) + { + // Unlike SP which operates on all present procs, the SP-less + // algorithm only needs to operate on functional ones + l_errl = computeProcPcieConfigAttrs(l_proc_target); + if(l_errl != NULL) + { + // Any failure to configure PCIE that makes it to this handler + // implies a firmware bug that should be fixed, everything else + // is tolerated internally (usually as disabled PHBs) + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + ERR_MRK "call_proc_pcie_scominit> Failed in call to " + "computeProcPcieConfigAttrs for target with HUID = " + "0x%08X", + l_proc_target->getAttr<TARGETING::ATTR_HUID>()); + l_StepError.addErrorDetails(l_errl); + errlCommit( l_errl, ISTEP_COMP_ID ); + } + } + + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, + ( const_cast<TARGETING::Target*>(l_proc_target) )); + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_pcie_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); + + // call the HWP with each fapi::Target + // @TODO RTC: 134078 + //FAPI_INVOKE_HWP(l_errl, p9_pcie_scominit, l_fapi_proc_target); + + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : proc_pcie_scominit HWP returns error", + l_errl->reasonCode()); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl ); + + // Create IStep error log and cross reference to error that occurred + l_StepError.addErrorDetails( l_errl ); + + // Commit Error + errlCommit( l_errl, HWPF_COMP_ID ); + + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_pcie_scominit HWP" ); + } + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_pcie_scominit exit" ); + + // end task, returning any errorlogs to IStepDisp + return l_StepError.getErrorHandle(); + */ + return l_errl; +} +}; diff --git a/src/usr/isteps/istep08/call_proc_scomoverride_chiplets.C b/src/usr/isteps/istep08/call_proc_scomoverride_chiplets.C new file mode 100644 index 000000000..eb5cf07cd --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_scomoverride_chiplets.C @@ -0,0 +1,112 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_scomoverride_chiplets.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_scomoverride_chiplets.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" + +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_scomoverride_chiplets +//***************************************************************************** +void* call_proc_scomoverride_chiplets( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_scomoverride_chiplets entry" ); + + //@TODO RTC:134078 + //FAPI_INVOKE_HWP(l_errl, p9_scomoverride_chiplets); + + if (l_errl) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : proc_scomoverride_chiplets " + "HWP returns error", + l_errl->reasonCode()); + + // Create IStep error log and cross reference to error that occurred + l_StepError.addErrorDetails( l_errl ); + + // Commit Error + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_scomoverride_chiplets HWP"); + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_scomoverride_chiplets exit" ); + + // end task, returning any errorlogs to IStepDisp + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/call_proc_xbus_scominit.C b/src/usr/isteps/istep08/call_proc_xbus_scominit.C new file mode 100644 index 000000000..cf99232d0 --- /dev/null +++ b/src/usr/isteps/istep08/call_proc_xbus_scominit.C @@ -0,0 +1,167 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep08/call_proc_xbus_scominit.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + @file call_proc_xbus_scominit.C + * + * Support file for IStep: nest_chiplets + * Nest Chiplets + * + * HWP_IGNORE_VERSION_CHECK + * + */ +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> + +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// MVPD +#include <devicefw/userif.H> +#include <vpd/mvpdenums.H> + +#include <config.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 "nest_chiplets_custom.H" +namespace ISTEP_08 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +//***************************************************************************** +// wrapper function to call proc_xbus_scominit +//****************************************************************************** +void* call_proc_xbus_scominit( void *io_pArgs ) +{ +// errlHndl_t l_err = NULL; + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_xbus_scominit entry" ); + + do + { + + /* @TODO RTC:134078 + + EDI_EI_INITIALIZATION::TargetPairs_t l_XbusConnections; + // Note: + // i_noDuplicate parameter must be set to false because + // two separate calls would be needed: + // X0 <--> X1 + // X1 <--> X0 + // only the first target is used to issue SCOMs + l_err = + EDI_EI_INITIALIZATION::PbusLinkSvc::getTheInstance().getPbusConnections( + l_XbusConnections, TYPE_XBUS, false); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : getPbusConnections XBUS returns error", + l_err->reasonCode()); + + // Create IStep error log and cross reference to error that occurred + l_StepError.addErrorDetails( l_err ); + // Commit the error log + // Log should be deleted and set to NULL in errlCommit. + errlCommit(l_err, HWPF_COMP_ID); + + // Shouldn't continue on this fatal error (no XBUS), break out + break; + } + + for (EDI_EI_INITIALIZATION::TargetPairs_t::const_iterator + l_itr = l_XbusConnections.begin(); + l_itr != l_XbusConnections.end(); ++l_itr) + { + const TARGETING::Target* l_thisXbusTarget = l_itr->first; + const TARGETING::Target* l_connectedXbusTarget = l_itr->second; + + // Call HW procedure + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_xbus_scominit HWP on " + "This XBUS target %.8X - Connected XBUS target %.8X", + TARGETING::get_huid(l_thisXbusTarget), + TARGETING::get_huid(l_connectedXbusTarget)); + + const fapi::Target l_thisXbusFapiTarget( + TARGET_TYPE_XBUS_ENDPOINT, + (const_cast<TARGETING::Target*>(l_thisXbusTarget))); + + const fapi::Target l_connectedXbusFapiTarget( + TARGET_TYPE_XBUS_ENDPOINT, + (const_cast<TARGETING::Target*>(l_connectedXbusTarget))); + //@TODO RTC:134078 + //FAPI_INVOKE_HWP(l_err, p9_xbus_scominit, + // l_thisXbusFapiTarget, l_connectedXbusFapiTarget); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : proc_xbus_scominit HWP returns error. " + "This XBUS target %.8X - Connected XBUS target %.8X", + l_err->reasonCode(), + TARGETING::get_huid(l_thisXbusTarget), + TARGETING::get_huid(l_connectedXbusTarget)); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_thisXbusTarget).addToLog( l_err ); + ErrlUserDetailsTarget(l_connectedXbusTarget).addToLog( l_err ); + + // Create IStep error log and cross ref to error that occurred + l_StepError.addErrorDetails( l_err ); + // We want to continue to the next target instead of exiting, + // Commit the error log and move on + // Note: Error log should already be deleted and set to NULL + // after committing + errlCommit(l_err, HWPF_COMP_ID); + } + + } +*/ + } while (0); + + return l_StepError.getErrorHandle(); +} +}; diff --git a/src/usr/isteps/istep08/makefile b/src/usr/isteps/istep08/makefile new file mode 100644 index 000000000..065b4b4ac --- /dev/null +++ b/src/usr/isteps/istep08/makefile @@ -0,0 +1,47 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/isteps/istep08/makefile $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2015 +# [+] International Business Machines Corp. +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# IBM_PROLOG_END_TAG +ROOTPATH = ../../../.. +MODULE = istep08 + +OBJS += call_host_slave_sbe_config.o +OBJS += call_host_setup_sbe.o +OBJS += call_host_cbs_start.o +OBJS += call_proc_check_slave_sbe_seeprom_complete.o +OBJS += call_proc_cen_ref_clk_enable.o +OBJS += call_proc_attr_update.o +OBJS += call_proc_enable_osclite.o +OBJS += call_proc_chiplet_scominit.o +OBJS += call_proc_xbus_scominit.o +OBJS += call_proc_abus_scominit.o +OBJS += call_proc_obus_scominit.o +OBJS += call_proc_npu_scominit.o +OBJS += call_proc_pcie_scominit.o +OBJS += call_proc_scomoverride_chiplets.o +OBJS += call_proc_chiplet_enable_ridi.o +OBJS += call_host_rng_bist.o + +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer/ + +include ${ROOTPATH}/config.mk |