summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2015-10-23 09:57:37 -0500
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 15:30:26 -0600
commit0d9998e37c153a2b32fb2e7014152e01823ace86 (patch)
tree51bb5a9863f0bf7393abacb765113c93d0121997 /src
parenta4ccd3d722669446c136632b6b501c0748ca3be3 (diff)
downloadtalos-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')
-rwxr-xr-xsrc/build/tools/listdeps.pl4
-rw-r--r--src/include/usr/isteps/istep08list.H223
-rw-r--r--src/makefile1
-rw-r--r--src/usr/hwpf/hwp/nest_chiplets/makefile3
-rw-r--r--src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C2100
-rw-r--r--src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H380
-rw-r--r--src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C1
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/makefile1
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.C881
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.H148
-rw-r--r--src/usr/isteps/istep08/call_host_cbs_start.C89
-rw-r--r--src/usr/isteps/istep08/call_host_rng_bist.C92
-rw-r--r--src/usr/isteps/istep08/call_host_setup_sbe.C88
-rw-r--r--src/usr/isteps/istep08/call_host_slave_sbe_config.C210
-rw-r--r--src/usr/isteps/istep08/call_proc_abus_scominit.C179
-rw-r--r--src/usr/isteps/istep08/call_proc_attr_update.C98
-rw-r--r--src/usr/isteps/istep08/call_proc_cen_ref_clk_enable.C302
-rw-r--r--src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C276
-rw-r--r--src/usr/isteps/istep08/call_proc_chiplet_enable_ridi.C98
-rw-r--r--src/usr/isteps/istep08/call_proc_chiplet_scominit.C144
-rw-r--r--src/usr/isteps/istep08/call_proc_enable_osclite.C96
-rw-r--r--src/usr/isteps/istep08/call_proc_npu_scominit.C97
-rw-r--r--src/usr/isteps/istep08/call_proc_obus_scominit.C97
-rw-r--r--src/usr/isteps/istep08/call_proc_pcie_scominit.C158
-rw-r--r--src/usr/isteps/istep08/call_proc_scomoverride_chiplets.C112
-rw-r--r--src/usr/isteps/istep08/call_proc_xbus_scominit.C167
-rw-r--r--src/usr/isteps/istep08/makefile47
-rw-r--r--src/usr/isteps/makefile1
28 files changed, 2555 insertions, 3538 deletions
diff --git a/src/build/tools/listdeps.pl b/src/build/tools/listdeps.pl
index cc88c6843..7881b952b 100755
--- a/src/build/tools/listdeps.pl
+++ b/src/build/tools/listdeps.pl
@@ -168,7 +168,7 @@ else
@istep_modules = (
"libistep06.so",
"libistep07.so",
- "libnest_chiplets.so" ,
+ "libistep08.so" ,
"libedi_ei_initialization.so" ,
"libbuild_winkle_images.so" ,
"libcore_activate.so" ,
@@ -219,7 +219,7 @@ my $resident_modules = {
my %istepFiles = (
"libistep06.so" => "istep06list.H" ,
"libistep07.so" => "istep07list.H" ,
- "libnest_chiplets.so" => "istep08list.H" ,
+ "libistep08.so" => "istep08list.H" ,
"libedi_ei_initialization.so" => "istep09list.H" ,
"libocc.so" => "istep15list.H" ,
"libbuild_winkle_images.so" => "istep15list.H" ,
diff --git a/src/include/usr/isteps/istep08list.H b/src/include/usr/isteps/istep08list.H
index 8bd0f19d1..cc714fe16 100644
--- a/src/include/usr/isteps/istep08list.H
+++ b/src/include/usr/isteps/istep08list.H
@@ -29,7 +29,7 @@
* @file istep08list.H
*
* IStep 08 Nest Chiplets
- * IPL FLow Doc v0.60 (06/02/15)
+ * IPL FLow Doc v0.67 (11/02/15)
*
* 08.01 host_slave_sbe_config
* : Configure host slave sbe
@@ -61,7 +61,8 @@
* : Apply sequenced scom inits
* 08.15 proc_chiplet_enable_ridi
* : Enable RI/DI chip wide
- *
+ * 08.16 host_rng_bist
+ * : Trigger Built In Self Test for RNG
* Please see the note in initsvcstructs.H for description of
* the ISTEPNAME macro.
*
@@ -70,9 +71,182 @@
#include <initservice/initsvcstructs.H>
#include <initservice/initsvcreasoncodes.H>
-// include prototypes file
-#include "../../../usr/hwpf/hwp/nest_chiplets/nest_chiplets.H"
-#include "../../../usr/hwpf/hwp/slave_sbe/slave_sbe.H"
+namespace ISTEP_08
+{
+
+/**
+ * @brief host_slave_sbe_config
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_host_slave_sbe_config(void *io_pArgs);
+
+/**
+ * @brief call_host_setup_sbe
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_host_setup_sbe(void *io_pArgs);
+
+/**
+ * @brief call_host_cbs_start
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_host_cbs_start(void *io_pArgs);
+
+
+/**
+ * @brief proc_check_slave_sbe_seeprom_complete
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_proc_check_slave_sbe_seeprom_complete(void *io_pArgs);
+
+/**
+ * @brief proc_cen_ref_clk_enable
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_proc_cen_ref_clk_enable(void *io_pArgs);
+
+/**
+ * @brief call_proc_attr_update
+ *
+ * Stub to enable platforms to override attributes
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void * call_proc_attr_update( void * io_pArgs );
+
+/**
+ * @brief proc_enable_osclite
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_enable_osclite(void *io_pArgs);
+
+/**
+ * @brief proc_chiplet_scominit
+ *
+ * Apply scom inits to chiplets
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_chiplet_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_xbus_scominit
+ *
+ * Apply scom inits to Xbus
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_xbus_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_abus_scominit
+ *
+ * Apply scom inits to Abus
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_abus_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_obus_scominit
+ *
+ * Apply scom inits to OBUS
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_proc_obus_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_npu_scominit
+ *
+ * Apply scom inits to NPU
+ *
+ * param[in.out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_proc_npu_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_pcie_scominit
+ *
+ * Apply scom inits to PCIe chiplets
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_pcie_scominit( void *io_pArgs );
+
+/**
+ * @brief proc_scomoverride_chiplets
+ *
+ * Apply sequenced scom inits
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_scomoverride_chiplets( void *io_pArgs );
+
+/**
+ * @brief proc_chiplet_enable_ridi
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_proc_chiplet_enable_ridi( void *io_pArgs );
+
+/**
+ * @brief host_rng_bist
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ *
+ */
+void* call_host_rng_bist( void *io_pArgs );
+
+}; // end namespace
+
+
namespace INITSERVICE
{
@@ -84,77 +258,82 @@ namespace INITSERVICE
},
{
ISTEPNAME(08,01,"host_slave_sbe_config"),
- SLAVE_SBE::call_host_slave_sbe_config,
+ ISTEP_08::call_host_slave_sbe_config,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,02,"host_setup_sbe"),
- SLAVE_SBE::call_host_setup_sbe,
+ ISTEP_08::call_host_setup_sbe,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,03,"host_cbs_start"),
- SLAVE_SBE::call_host_cbs_start,
+ ISTEP_08::call_host_cbs_start,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,04,"proc_check_slave_sbe_seeprom_complete"),
- SLAVE_SBE::call_proc_check_slave_sbe_seeprom_complete,
+ ISTEP_08::call_proc_check_slave_sbe_seeprom_complete,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false }
},
{
ISTEPNAME(08,05,"proc_cen_ref_clk_enable"),
- SLAVE_SBE::call_proc_cen_ref_clk_enable,
+ ISTEP_08::call_proc_cen_ref_clk_enable,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,06,"proc_attr_update"),
- NEST_CHIPLETS::call_proc_attr_update,
+ ISTEP_08::call_proc_attr_update,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,07,"proc_enable_osclite"),
- NEST_CHIPLETS::call_proc_enable_osclite,
+ ISTEP_08::call_proc_enable_osclite,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,08,"proc_chiplet_scominit"),
- NEST_CHIPLETS::call_proc_chiplet_scominit,
+ ISTEP_08::call_proc_chiplet_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,09,"proc_xbus_scominit"),
- NEST_CHIPLETS::call_proc_xbus_scominit,
+ ISTEP_08::call_proc_xbus_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,10,"proc_abus_scominit"),
- NEST_CHIPLETS::call_proc_abus_scominit,
+ ISTEP_08::call_proc_abus_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,11,"proc_obus_scominit"),
- NEST_CHIPLETS::call_proc_obus_scominit,
+ ISTEP_08::call_proc_obus_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,12,"proc_npu_scominit"),
- NEST_CHIPLETS::call_proc_npu_scominit,
+ ISTEP_08::call_proc_npu_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,13,"proc_pcie_scominit"),
- NEST_CHIPLETS::call_proc_pcie_scominit,
+ ISTEP_08::call_proc_pcie_scominit,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,14,"proc_scomoverride_chiplets"),
- NEST_CHIPLETS::call_proc_scomoverride_chiplets,
+ ISTEP_08::call_proc_scomoverride_chiplets,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
{
ISTEPNAME(08,15,"proc_chiplet_enable_ridi"),
- NEST_CHIPLETS::call_proc_chiplet_enable_ridi,
+ ISTEP_08::call_proc_chiplet_enable_ridi,
+ { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
+ },
+ {
+ ISTEPNAME(08,16,"host_rng_bist"),
+ ISTEP_08::call_host_rng_bist,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
},
@@ -162,10 +341,8 @@ namespace INITSERVICE
const DepModInfo g_istep08Dependancies = {
{
- DEP_LIB(libnest_chiplets.so),
- DEP_LIB(libslave_sbe.so),
+ DEP_LIB(libistep08.so),
DEP_LIB(libsbe.so),
- DEP_LIB(libpstates.so),
NULL
}
};
diff --git a/src/makefile b/src/makefile
index 83e139371..7f07d2937 100644
--- a/src/makefile
+++ b/src/makefile
@@ -119,6 +119,7 @@ BASE_MODULES += $(if $(CONFIG_AST2400), sio)
EXTENDED_MODULES += istep06
EXTENDED_MODULES += istep07
+EXTENDED_MODULES += istep08
EXTENDED_MODULES += targeting
EXTENDED_MODULES += ecmddatabuffer
EXTENDED_MODULES += fapi
diff --git a/src/usr/hwpf/hwp/nest_chiplets/makefile b/src/usr/hwpf/hwp/nest_chiplets/makefile
index abc06223a..c300c808e 100644
--- a/src/usr/hwpf/hwp/nest_chiplets/makefile
+++ b/src/usr/hwpf/hwp/nest_chiplets/makefile
@@ -45,14 +45,13 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/nest_chiplets/proc_pcie_slot_power
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/secure_boot
## NOTE: add new object files when you add a new HWP
-OBJS += nest_chiplets.o
OBJS += proc_start_clocks_chiplets.o
OBJS += proc_a_x_pci_dmi_pll_initf.o
OBJS += proc_a_x_pci_dmi_pll_setup.o
OBJS += proc_a_x_pci_dmi_pll_utils.o
OBJS += proc_pcie_slot_power.o
-
+
## NOTE: add a new directory onto the vpaths when you add a new HWP
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/nest_chiplets/proc_start_clocks_chiplets
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/nest_chiplets/proc_a_x_pci_dmi_pll_setup
diff --git a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
deleted file mode 100644
index 237b28a32..000000000
--- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C
+++ /dev/null
@@ -1,2100 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,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 nest_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>
-
-// fapi support
-#include <fapi.H>
-#include <fapiPlatHwpInvoker.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"
-#include "nest_chiplets.H"
-#include "proc_start_clocks_chiplets/proc_start_clocks_chiplets.H"
-#include "proc_a_x_pci_dmi_pll_setup/proc_a_x_pci_dmi_pll_setup.H"
-#include "proc_a_x_pci_dmi_pll_setup/proc_a_x_pci_dmi_pll_initf.H"
-#include "../bus_training/pbusLinkSvc.H"
-#include <fapiHwpExecInitFile.H>
-#include "proc_pcie_slot_power.H"
-
-const char * const PROC_CHIPLET_ABUS_IF = "p8.abus.scom.if";
-const char * const PROC_CHIPLET_XBUS_IF = "p8.xbus.scom.if";
-
-namespace NEST_CHIPLETS
-{
-
-using namespace ISTEP;
-using namespace ISTEP_ERROR;
-using namespace ERRORLOG;
-using namespace TARGETING;
-using namespace fapi;
-
-//*****************************************************************************
-// 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" );
-
- //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();
-
-}
-
-//*****************************************************************************
-// 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" );
-
- //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();
-}
-
-//*****************************************************************************
-// wrapper function to call proc_a_x_pci_dmi_pll_initf
-//*****************************************************************************
-void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs )
-{
- errlHndl_t l_err = NULL;
-
- IStepError l_StepError;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_initf entry" );
-
- fapi::ReturnCode rc;
-
- uint8_t abus_enable_attr = ENUM_ATTR_PROC_A_ENABLE_DISABLE;
- uint8_t xbus_enable_attr = ENUM_ATTR_PROC_X_ENABLE_DISABLE;
-
- 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 )
- {
- const TARGETING::Target* l_proc_target = *l_iter;
- 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_a_x_pci_dmi_pll_initf HWP on "
- "target HUID %.8X", TARGETING::get_huid(l_proc_target));
-
- bool l_startXbusPll = false;
- bool l_startAbusPll = false;
- bool l_startPCIEPll = false;
- bool l_startDMIPll = false;
-
-
- rc = FAPI_ATTR_GET(ATTR_PROC_X_ENABLE,
- &l_fapi_proc_target,
- xbus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_X_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( xbus_enable_attr == fapi::ENUM_ATTR_PROC_X_ENABLE_ENABLE )
- {
- l_startXbusPll = true;
- }
-
- rc = FAPI_ATTR_GET(ATTR_PROC_A_ENABLE,
- &l_fapi_proc_target,
- abus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_A_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( abus_enable_attr == fapi::ENUM_ATTR_PROC_A_ENABLE_ENABLE )
- {
- l_startAbusPll = true;
- }
-
- TARGETING::TargetHandleList l_pci;
- getChildChiplets( l_pci, l_proc_target, TYPE_PCI );
- if (l_pci.size() > 0)
- {
- l_startPCIEPll = true;
- }
-
- TARGETING::TargetHandleList l_mcs;
- getChildChiplets( l_mcs, l_proc_target, TYPE_MCS );
- if (l_mcs.size() > 0)
- {
- l_startDMIPll = true;
- }
-
- // call proc_a_x_pci_dmi_pll_initf
- FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_initf,
- l_fapi_proc_target,
- l_startXbusPll, // xbus
- l_startAbusPll, // abus
- l_startPCIEPll, // pcie
- l_startDMIPll); // dmi
-
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: proc_a_x_pci_dmi_pll_initf"
- " HWP returns error",
- l_err->reasonCode());
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
-
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS: proc_a_x_pci_dmi_pll_initf HWP( )" );
- }
- }
-
- if (l_err)
- {
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
-
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_initf exit" );
- return l_StepError.getErrorHandle();
-}
-
-//*****************************************************************************
-// wrapper function to call proc_a_x_pci_dmi_pll_setup
-//*****************************************************************************
-void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs )
-{
- errlHndl_t l_err = NULL;
-
- IStepError l_StepError;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_setup entry" );
-
- fapi::ReturnCode rc;
-
- uint8_t abus_enable_attr = ENUM_ATTR_PROC_A_ENABLE_DISABLE;
- uint8_t xbus_enable_attr = ENUM_ATTR_PROC_X_ENABLE_DISABLE;
-
- TARGETING::TargetHandleList l_procTargetList;
- getAllChips(l_procTargetList, TYPE_PROC);
-
- for (TARGETING::TargetHandleList::const_iterator
- l_cpuIter = l_procTargetList.begin();
- l_cpuIter != l_procTargetList.end();
- ++l_cpuIter)
- {
- const TARGETING::Target* l_proc_target = *l_cpuIter;
- 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_a_x_pci_dmi_pll_setup HWP on "
- "target HUID %.8X", TARGETING::get_huid(l_proc_target));
-
- bool l_startXbusPll = false;
- bool l_startAbusPll = false;
- bool l_startPCIEPll = false;
- bool l_startDMIPll = false;
-
- rc = FAPI_ATTR_GET(ATTR_PROC_X_ENABLE,
- &l_fapi_proc_target,
- xbus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_X_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( xbus_enable_attr == fapi::ENUM_ATTR_PROC_X_ENABLE_ENABLE )
- {
- l_startXbusPll = true;
- }
-
- rc = FAPI_ATTR_GET(ATTR_PROC_A_ENABLE,
- &l_fapi_proc_target,
- abus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_A_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( abus_enable_attr == fapi::ENUM_ATTR_PROC_A_ENABLE_ENABLE )
- {
- l_startAbusPll = true;
- }
-
- TARGETING::TargetHandleList l_pci;
- getChildChiplets( l_pci, l_proc_target, TYPE_PCI );
- if (l_pci.size() > 0)
- {
- l_startPCIEPll = true;
- }
-
- TARGETING::TargetHandleList l_mcs;
- getChildChiplets( l_mcs, l_proc_target, TYPE_MCS );
- if (l_mcs.size() > 0)
- {
- l_startDMIPll = true;
- }
-
- // call proc_a_x_pci_dmi_pll_setup
- FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_setup,
- l_fapi_proc_target,
- l_startXbusPll, // xbus
- l_startAbusPll, // abus
- l_startPCIEPll, // pcie
- l_startDMIPll); // dmi
-
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: proc_a_x_pci_dmi_pll_setup"
- " HWP returns error",
- l_err->reasonCode());
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
-
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS: proc_a_x_pci_dmi_pll_setup HWP( )" );
- }
- }
-
- if (l_err)
- {
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
-
-#ifdef CONFIG_PCIE_HOTPLUG_CONTROLLER
- // Loop through all the procs in the system
- // and run proc_pcie_slot_power to
- // power off hot plug controller to avoid downstream MEX issues
-
-
- 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));
-
- fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP,
- l_pProcTarget );
-
- // Invoke the HWP
- FAPI_INVOKE_HWP(l_err,
- proc_pcie_slot_power,
- l_fapiProcTarget,
- false ); // turn off
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : proc_pcie_hotplug_control",
- " failed, returning errorlog" );
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_err );
-
- // informational. Don't add to istep error or return error
- l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
-
- // Commit error log
- errlCommit( l_err, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : proc_pcie_hotplug_control",
- " completed ok");
- }
- } // endfor
-#endif
-
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_a_x_pci_dmi_pll_setup exit" );
-
- // end task, returning any errorlogs to IStepDisp
- return l_StepError.getErrorHandle();
-}
-
-//******************************************************************************
-// customizeChipRegions
-//******************************************************************************
-errlHndl_t customizeChipRegions(TARGETING::Target* i_procTarget)
-{
-
- errlHndl_t l_err = NULL;
- uint8_t *l_pgData = NULL;
-
- do{
-
- size_t l_pgSize = 0;
-
- // First get the size
- l_err = deviceRead(i_procTarget,
- NULL,
- l_pgSize,
- DEVICE_MVPD_ADDRESS(MVPD::CP00, MVPD::PG));
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR: deviceRead of MVPD for PG failed (size): "
- "errorlog PLID=0x%x",
- l_err->plid());
- break;
- }
-
- // Now allocate a buffer and read it
- l_pgData = static_cast<uint8_t *>(malloc(l_pgSize));
- l_err = deviceRead(i_procTarget,
- l_pgData,
- l_pgSize,
- DEVICE_MVPD_ADDRESS(MVPD::CP00, MVPD::PG));
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR: deviceRead of MVPD for PG failed (data): "
- "errorlog PLID=0x%x",
- l_err->plid());
- break;
- }
-
- TRACDBIN(ISTEPS_TRACE::g_trac_isteps_trace,
- "Binary dump of PG:",l_pgData,l_pgSize);
-
- static const size_t VPD_CP00_PG_HDR_LENGTH = 01;
- // TODO RTC 47050 : Debate on a max config interface
- static const uint32_t MAX_CHIPLETS_PER_PROC = 32;
- //Starting position of the PG VPD data in ATTR_CHIP_REGIONS_TO_ENABLE
- static const size_t PG_START_POS = ( 64-16-4);
-
- //prepare the vector to be populated to ATTR_CHIP_REGIONS_TO_ENABLE
- TARGETING::ATTR_CHIP_REGIONS_TO_ENABLE_type l_chipRegionData;
- memset(&l_chipRegionData,0,sizeof(ATTR_CHIP_REGIONS_TO_ENABLE_type));
-
- //Skip the header
- uint16_t *l_partialGoodUint16=reinterpret_cast<uint16_t*>(
- &l_pgData[VPD_CP00_PG_HDR_LENGTH]);
-
- //For customizing the image data, the 16 bit partial good value
- //retrieved for the chiplets ( 32 no. ) , should be set from bit 4..19
- //of the attribute ATTR_CHIP_REGIONS_TO_ENABLE for the processor
-
- for ( uint32_t l_chipRegionIndex = 0 ;
- l_chipRegionIndex < MAX_CHIPLETS_PER_PROC ;
- ++l_chipRegionIndex)
- {
- l_chipRegionData[l_chipRegionIndex] =
- l_partialGoodUint16[l_chipRegionIndex];
- l_chipRegionData[l_chipRegionIndex] =
- l_chipRegionData[l_chipRegionIndex]<<PG_START_POS;
- }
-
-// VPO uses fake VPD, the chip region to be enabled should be set to 0x0F80000000000000
-// Note: A new H file can be created to be a centralized place to define VPO constant like this one.
-#ifdef CONFIG_VPO_COMPILE
- l_chipRegionData[2] = 0x0F80000000000000;
-#endif
-
- TRACDBIN(ISTEPS_TRACE::g_trac_isteps_trace,
- "Binary dump of ATTR_CHIP_REGIONS_TO_ENABLE:",
- l_chipRegionData,sizeof(ATTR_CHIP_REGIONS_TO_ENABLE_type));
-
- i_procTarget->setAttr<TARGETING::ATTR_CHIP_REGIONS_TO_ENABLE>
- (l_chipRegionData);
-
- }while(0);
-
- free(l_pgData);
-
- return l_err;
-
-}
-
-//*****************************************************************************
-// wrapper function to call proc_startclock_chiplets
-//*****************************************************************************
-void* call_proc_startclock_chiplets( void *io_pArgs )
-{
- errlHndl_t l_err = NULL;
-
- IStepError l_StepError;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_startclock_chiplets entry" );
-
- 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 )
- {
- const TARGETING::Target* l_proc_target = *l_iter;
- const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP,
- ( const_cast<TARGETING::Target*>(l_proc_target) ));
-
- l_err = customizeChipRegions(*l_iter);
- if(l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X : customizeChipRegions "
- "returns error",
- l_err->reasonCode());
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
-
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
-
- break;
- }
- uint8_t abus_enable_attr = ENUM_ATTR_PROC_A_ENABLE_DISABLE;
- uint8_t xbus_enable_attr = ENUM_ATTR_PROC_X_ENABLE_DISABLE;
-
- fapi::ReturnCode rc;
- bool l_startXbusPll = false;
- bool l_startAbusPll = false;
- bool l_startPCIEPll = false;
-
- rc = FAPI_ATTR_GET(ATTR_PROC_X_ENABLE,
- &l_fapi_proc_target,
- xbus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_X_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( xbus_enable_attr == fapi::ENUM_ATTR_PROC_X_ENABLE_ENABLE )
- {
- l_startXbusPll = true;
- }
-
- rc = FAPI_ATTR_GET(ATTR_PROC_A_ENABLE,
- &l_fapi_proc_target,
- abus_enable_attr);
-
- if (!rc.ok())
- {
- FAPI_ERR("Error querying ATTR_PROC_A_ENABLE");
- l_err = fapi::fapiRcToErrl(rc);
- break;
- }
-
- if( abus_enable_attr == fapi::ENUM_ATTR_PROC_A_ENABLE_ENABLE )
- {
- l_startAbusPll = true;
- }
-
- TARGETING::TargetHandleList l_pci;
- getChildChiplets( l_pci, l_proc_target, TYPE_PCI );
- if (l_pci.size() > 0)
- {
- l_startPCIEPll = true;
- }
-
-
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Running proc_startclock_chiplets HWP on "
- "target HUID %.8X", TARGETING::get_huid(l_proc_target));
-
- // call the HWP with each fapi::Target
- FAPI_INVOKE_HWP(l_err, proc_start_clocks_chiplets,
- l_fapi_proc_target,
- l_startXbusPll, // xbus
- l_startAbusPll, // abus
- l_startPCIEPll); // pcie
- if (l_err)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X : proc_startclock_chiplets HWP "
- "returns error",
- l_err->reasonCode());
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
-
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
-
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : proc_startclock_chiplets HWP( )" );
- }
- }
-
- if (l_err)
- {
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
-
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_startclock_chiplets exit" );
-
- // end task, returning any errorlogs to IStepDisp
- return l_StepError.getErrorHandle();
-}
-
-//******************************************************************************
-// 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)
- {
- 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));
-
- // 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();
-}
-
-//*****************************************************************************
-// 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
- {
- 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)));
-
- //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();
-}
-
-//*****************************************************************************
-// 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
- {
-
- 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));
-
- //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();
-}
-
-//******************************************************************************
-// 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" );
- //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();
-}
-
-//******************************************************************************
-// 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" );
- //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();
-}
-
-//******************************************************************************
-// _queryIopsToBifurcateAndPhbsToDisable
-//******************************************************************************
-
-#ifdef DYNAMIC_BIFURCATION
-// Normally a x16 PCIE adapter is driven by one PHB in the processor.
-// Some x16 adapters have two logically different devices integrated
-// onto the same adapter, each acting as a x8 PCIE endpoint driven by
-// its own PHB. The ability to detect which type of PCIE adapter is
-// present and dynamically reconfigure the PCIE langes / PHBs to support
-// whatever is present is called 'dynamic bifurcation'. This feature is
-// not officially supported however hooks remain in place to add that
-// support easily. To enable it, define the DYNAMIC_BIFURCATION flag
-// and implement the guts of the
-// _queryIopsToBifurcateAndPhbsToDisable function.
-
-errlHndl_t _queryIopsToBifurcateAndPhbsToDisable(
- TARGETING::ConstTargetHandle_t const i_pProcChipTarget,
- BifurcatedIopsContainer& o_iopList,
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE_type& o_disabledPhbsMask)
-{
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ENTER_MRK "_queryIopsToBifurcateAndPhbsToDisable: Proc chip target "
- "HUID = 0x%08X.",
- i_pProcChipTarget ?
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>() : 0);
-
- errlHndl_t pError = NULL;
- o_iopList.clear();
- o_disabledPhbsMask = 0;
-
- do {
-
- // Extension point to return bifurcated IOPs and PHBs to disable.
- // Assuming no extensions are added, the function returns no IOPs to
- // bifurcate and no PHBs to disable
-
- // If implemented, this function should only return error on software code
- // bug. Any other condition should result in IOPs not being bifurcated and
- // host taking care of that condition.
-
- } while(0);
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- EXIT_MRK "_queryIopsToBifurcateAndPhbsToDisable: EID = 0x%08X, "
- "PLID = 0x%08X, RC = 0x%08X.",
- ERRL_GETEID_SAFE(pError),ERRL_GETPLID_SAFE(pError),
- ERRL_GETRC_SAFE(pError));
-
- return pError;
-}
-
-#endif
-
-//******************************************************************************
-// _deconfigPhbsBasedOnPciState
-//******************************************************************************
-
-void _deconfigPhbsBasedOnPciState(
- TARGETING::ConstTargetHandle_t const i_pProcChipTarget,
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE_type& io_phbActiveMask)
-{
- errlHndl_t pError = NULL;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ENTER_MRK "_deconfigPhbsBasedOnPciState: Proc chip target HUID = "
- "0x%08X, PHB active mask = 0x%02X.",
- i_pProcChipTarget ?
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>() : 0,
- io_phbActiveMask);
-
- // Get proc chip's functional PCI units
- TARGETING::TargetHandleList funcPciList;
- (void)TARGETING::getChildChiplets(
- funcPciList,i_pProcChipTarget,TARGETING::TYPE_PCI);
-
- // Activate PHB mask bits based on functional PCI units
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE_type activePciMask = 0;
- for (TARGETING::TargetHandleList::const_iterator pciItr
- = funcPciList.begin();
- pciItr != funcPciList.end();
- ++pciItr)
- {
- // PCI chip unit to PHB mapping is as follows:
- //
- // PCI-0 => PHB0
- // PCI-1 => PHB1
- // PCI-2 => PHB2
- // PCI-3 => PHB3
- //
- // Further, io_phbActiveMask and activePciMask are bitmasks whose
- // leftmost bit corresponds to PHB0, followed by bits for PHB1, PHB2
- // and PHB3. The remaining bits are ignored.
-
- // Compensate for the fact that PHB mask bits start on left side of the
- // mask
- const size_t bitsToLeftShift
- = ((sizeof(activePciMask)*BITS_PER_BYTE) - 1);
-
- // Committing an error here because this would mean a read only
- // attribute was set to a value which should be impossible, the
- // side effect will be that whatever PHB this should really correspond
- // to will not be enabled
- if((*pciItr)->getAttr<TARGETING::ATTR_CHIP_UNIT>() > bitsToLeftShift)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "_deconfigPhbsBasedOnPciState> "
- "Code Bug! CHIP_UNIT attribute (%d) for PCI unit with HUID of "
- "0x%08X was larger than max value of %d in "
- "_deconfigPhbsBasedOnPciState().",
- (*pciItr)->getAttr<TARGETING::ATTR_CHIP_UNIT>(),
- (*pciItr)->getAttr<TARGETING::ATTR_HUID>(),
- bitsToLeftShift );
- /*@
- * @errortype
- * @moduleid ISTEP_DECONFIG_PHBS_BASED_ON_PCI_STATE
- * @reasoncode ISTEP_TARGET_NULL
- * @userdata1[0:31] HUID of PCI target with bad ATTR_CHIP_UNIT
- * @userdata1[32:39] ATTR_CHIP_UNIT value
- * @userdata2[40:47] # bits to shift
- * @devdesc Attribute model inconsistency detected; Cannot
- * represent PHB bitmask given the value of the
- * PCI target's chip unit attribute. Continuing
- * without PHB enabled
- * @custdesc A problem isolated to firmware occurred during
- * the IPL of the system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_DECONFIG_PHBS_BASED_ON_PCI_STATE,
- ISTEP_TARGET_NULL,
- TWO_UINT32_TO_UINT64(
- (*pciItr)->getAttr<TARGETING::ATTR_HUID>(),
- TWO_UINT16_TO_UINT32(
- TWO_UINT8_TO_UINT16(
- (*pciItr)->getAttr<TARGETING::ATTR_CHIP_UNIT>(),
- bitsToLeftShift),
- 0)),
- 0,
- true);
-
- ERRORLOG::ErrlUserDetailsTarget(*pciItr).addToLog(pError);
- pError->collectTrace(ISTEP_COMP_NAME);
- errlCommit(pError, ISTEP_COMP_ID);
-
- continue;
- }
-
- activePciMask |=
- (1 << ( bitsToLeftShift
- - (*pciItr)->getAttr<TARGETING::ATTR_CHIP_UNIT>()));
- }
-
- // Can never enable more PHBs than were supplied as input. It's conceivable
- // that due to code bug in the chip unit attribute, the unit value
- // corresponds to a non supported PHB. This masking will also prevent the
- // error from propagating. There is no way to trap for valid PHBs that are
- // cross-wired vis a vis the chip unit attribute.
- io_phbActiveMask &= activePciMask;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- EXIT_MRK "_deconfigPhbsBasedOnPciState: io_phbActiveMask = 0x%02X",
- io_phbActiveMask);
-
- return;
-}
-
-//******************************************************************************
-// Local logical equality operator for matching lane configuration rows
-//******************************************************************************
-
-inline bool operator==(
- const laneConfigRow& i_lhs,
- const laneConfigRow& i_rhs)
-{
- return ( memcmp(i_lhs.laneSet,i_rhs.laneSet,sizeof(i_lhs.laneSet)) == 0);
-}
-
-//******************************************************************************
-// _laneMaskToLaneWidth
-//******************************************************************************
-
-LaneWidth _laneMaskToLaneWidth(const uint16_t i_laneMask)
-{
- LaneWidth laneWidth = LANE_WIDTH_NC;
- if(i_laneMask == LANE_MASK_X16)
- {
- laneWidth = LANE_WIDTH_16X;
- }
- else if( (i_laneMask == LANE_MASK_X8_GRP0)
- || (i_laneMask == LANE_MASK_X8_GRP1))
- {
- laneWidth = LANE_WIDTH_8X;
- }
-
- return laneWidth;
-}
-
-//******************************************************************************
-// computeProcPcieConfigAttrs
-//******************************************************************************
-
-errlHndl_t computeProcPcieConfigAttrs(
- TARGETING::TargetHandle_t const i_pProcChipTarget)
-{
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ENTER_MRK "computeProcPcieConfigAttrs: Proc chip target HUID = "
- "0x%08X.",
- i_pProcChipTarget ?
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>() : 0);
-
- // Currently there are three IOP config tables, one for procs with 24, 32
- // or 40 usable PCIE lanes. In general, the code accumulates the current
- // configuration of the IOPs from the MRW and other dynamic information
- // (such as bifurcation, etc.), then matches that config to one of the
- // rows in the table. Once a match is discovered, the IOP config value is
- // pulled from the matching row and set in the attributes.
- const laneConfigRow x24_laneConfigTable[] =
- {{{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x0,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x0,PHB0_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x1,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x1,PHB0_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x2,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x3,PHB0_MASK|PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x3,PHB0_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x4,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x5,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x6,PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x7,PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x8,PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x9,PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0xA,PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0xB,PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0xC,PHB1_MASK|PHB2_MASK},
- };
-
- const laneConfigRow* x24_end = x24_laneConfigTable +
- ( sizeof(x24_laneConfigTable)
- / sizeof(x24_laneConfigTable[0]));
-
- const laneConfigRow x32_laneConfigTable[] =
- {{{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x0,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x1,PHB0_MASK|PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x2,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x3,PHB0_MASK|PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x4,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x5,PHB0_MASK|PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x6,PHB0_MASK|PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x7,PHB0_MASK|PHB1_MASK|PHB2_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x8,PHB1_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_ENABLE},
- {LANE_WIDTH_8X,DSMP_ENABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x9,PHB1_MASK|PHB2_MASK},
- };
-
- const laneConfigRow* x32_end = x32_laneConfigTable +
- ( sizeof(x32_laneConfigTable)
- / sizeof(x32_laneConfigTable[0]));
-
- const laneConfigRow x40_laneConfigTable[] =
- {{{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x0,PHB0_MASK|PHB1_MASK|PHB3_MASK},
-
- {{{{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x1,PHB0_MASK|PHB1_MASK|PHB2_MASK|PHB3_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x2,PHB0_MASK|PHB1_MASK|PHB3_MASK},
-
- {{{{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x3,PHB0_MASK|PHB1_MASK|PHB2_MASK|PHB3_MASK},
-
- {{{{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_16X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x6,PHB0_MASK|PHB1_MASK|PHB3_MASK},
-
- {{{{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_8X,DSMP_DISABLE}},
- {{LANE_WIDTH_8X,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x7,PHB0_MASK|PHB1_MASK|PHB2_MASK|PHB3_MASK},
- };
-
- const laneConfigRow* x40_end = x40_laneConfigTable +
- ( sizeof(x40_laneConfigTable)
- / sizeof(x40_laneConfigTable[0]));
-
- errlHndl_t pError = NULL;
- const laneConfigRow* pLaneConfigTableBegin = NULL;
- const laneConfigRow* pLaneConfigTableEnd = NULL;
-
- do
- {
- if(i_pProcChipTarget == NULL)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> "
- "Code bug! Input processor target is NULL");
-
- /*@
- * @errortype
- * @moduleid ISTEP_COMPUTE_PCIE_CONFIG_ATTRS
- * @reasoncode ISTEP_TARGET_NULL
- * @devdesc Caller passed a NULL processor target
- * @custdesc A problem isolated to firmware occurred during the
- * IPL of the system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_COMPUTE_PCIE_CONFIG_ATTRS,
- ISTEP_TARGET_NULL,
- 0,
- 0,
- true);
- pError->collectTrace(ISTEP_COMP_NAME);
- break;
- }
-
- const TARGETING::ATTR_CLASS_type targetClass
- = i_pProcChipTarget->getAttr<TARGETING::ATTR_CLASS>();
- const TARGETING::ATTR_TYPE_type targetType
- = i_pProcChipTarget->getAttr<TARGETING::ATTR_TYPE>();
- const bool targetPresent =
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HWAS_STATE>()
- .present;
-
- if( (targetClass != TARGETING::CLASS_CHIP)
- || (targetType != TARGETING::TYPE_PROC)
- || (!targetPresent))
- {
- const TARGETING::ATTR_HUID_type targetHuid
- = i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>();
-
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> Code bug!"
- "Input target is not a processor chip or is not present. "
- "Class = 0x%08X, "
- "Type = 0x%08X, HUID = 0x%08X, Present? = %d",
- targetClass,targetType,
- targetHuid,
- targetPresent);
-
- /*@
- * @errortype
- * @moduleid ISTEP_COMPUTE_PCIE_CONFIG_ATTRS
- * @reasoncode ISTEP_INVALID_TARGET_TYPE
- * @userdata1[0:31] Illegal target's class
- * @userdata1[32:63] Illegal target's type
- * @userdata2[0:31] Illegal target's HUID
- * @userdata2[32:63] Illegal target's presence (0=no, 1=yes)
- * @devdesc Caller passed a non-processor chip target or
- * passed a processor chip target that was not
- * present
- * @custdesc A problem isolated to firmware occurred during
- * the IPL of the system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_COMPUTE_PCIE_CONFIG_ATTRS,
- ISTEP_INVALID_TARGET_TYPE,
- TWO_UINT32_TO_UINT64(
- targetClass,targetType),
- TWO_UINT32_TO_UINT64(
- targetHuid,targetPresent),
- true);
- ERRORLOG::ErrlUserDetailsTarget(i_pProcChipTarget).addToLog(pError);
- pError->collectTrace(ISTEP_COMP_NAME);
- break;
- }
-
- // Pick the appropriate IOP configuration table
- if( i_pProcChipTarget->getAttr<TARGETING::ATTR_PROC_PCIE_NUM_LANES>()
- == IOP_LANES_PER_PROC_32X)
- {
- pLaneConfigTableBegin = x32_laneConfigTable;
- pLaneConfigTableEnd = x32_end;
- }
- else if( i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_NUM_LANES>()
- == IOP_LANES_PER_PROC_24X)
- {
- pLaneConfigTableBegin = x24_laneConfigTable;
- pLaneConfigTableEnd = x24_end;
- }
- else if( i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_NUM_LANES>()
- == IOP_LANES_PER_PROC_40X)
- {
- // Only certain IOP lane configs are supported for 40 lanes
- // Error out if they are selected
- uint8_t mrwIopConfig = i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_CONFIG>();
- for (uint8_t i=0; i<sizeof(UnsupportedLanesx40); i++)
- {
- if (mrwIopConfig == UnsupportedLanesx40[i])
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> Code bug!"
- "Input IOP lane config is not supported. "
- "IOP config = 0x%08X, HUID = 0x%08X",
- i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_CONFIG>(),
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>());
-
- /*@
- * @errortype
- * @moduleid ISTEP_COMPUTE_PCIE_CONFIG_ATTRS
- * @reasoncode ISTEP_INVALID_PCIE_IOP_LANE_CONFIG
- * @userdata1[0:31] Target's HUID
- * @userdata1[32:63] ATTR_PROC_PCIE_IOP_CONFIG attribute
- * value
- * @devdesc Illegal ATTR_PROC_PCIE_IOP_CONFIG attr
- * read from a processor chip target.
- * @custdesc A problem isolated to firmware or
- * firmware customization occurred during
- * the IPL of the system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_COMPUTE_PCIE_CONFIG_ATTRS,
- ISTEP_INVALID_PCIE_IOP_LANE_CONFIG,
- TWO_UINT32_TO_UINT64(
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>(),
- i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_CONFIG>()),
- 0,
- true);
- ERRORLOG::ErrlUserDetailsTarget
- (i_pProcChipTarget).addToLog(pError);
- pError->collectTrace(ISTEP_COMP_NAME);
- break;
- }
-
- pLaneConfigTableBegin = x40_laneConfigTable;
- pLaneConfigTableEnd = x40_end;
- }
- }
- else
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> "
- "Code bug! Unsupported ATTR_PROC_PCIE_NUM_LANES attribute for "
- "processor with HUID of 0x%08X. Expected 24, 32 or 40, but "
- "read a value of %d.",
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>(),
- i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_NUM_LANES>());
-
- /*@
- * @errortype
- * @moduleid ISTEP_COMPUTE_PCIE_CONFIG_ATTRS
- * @reasoncode ISTEP_INVALID_ATTR_VALUE
- * @userdata1[0:31] Target's HUID
- * @userdata2[32:63] ATTR_PROC_PCIE_NUM_LANES attribute value
- * @devdesc Illegal ATTR_PROC_PCIE_NUM_LANES attribute read
- * from a processor chip target.
- * @custdesc A problem isolated to firmware or firmware
- * customization occurred during the IPL of the
- * system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_COMPUTE_PCIE_CONFIG_ATTRS,
- ISTEP_INVALID_ATTR_VALUE,
- TWO_UINT32_TO_UINT64(
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>(),
- i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_NUM_LANES>()),
- 0,
- true);
- ERRORLOG::ErrlUserDetailsTarget(i_pProcChipTarget).addToLog(pError);
- pError->collectTrace(ISTEP_COMP_NAME);
- break;
- }
-
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE_type disabledPhbs = 0;
-
-#ifdef DYNAMIC_BIFURCATION
-
- // Figure out which IOPs need bifurcation, and as a result, which PHBs
- // to disable
- BifurcatedIopsContainer iopList;
- pError = _queryIopsToBifurcateAndPhbsToDisable(
- i_pProcChipTarget,
- iopList,
- disabledPhbs);
- if(pError!=NULL)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> "
- "Failed in call to _queryIopsToBifurcateAndPhbsToDisable; "
- "Proc HUID = 0x%08X.",
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>());
- break;
- }
-#endif
-
- // Arrays require all try[Get|Set]Attr API calls in order to be able to
- // read them properly. All attributes should exist, so assert if they
- // do not.
- TARGETING::ATTR_PROC_PCIE_LANE_MASK_NON_BIFURCATED_type
- laneMaskNonBifurcated = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_LANE_MASK_NON_BIFURCATED>(
- laneMaskNonBifurcated));
-
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL_NON_BIFURCATED_type
- laneReversalNonBifrucated = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL_NON_BIFURCATED>(
- laneReversalNonBifrucated));
-
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP_NON_BIFURCATED_type
- laneSwapNonBifurcated = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP_NON_BIFURCATED>(
- laneSwapNonBifurcated));
-
- TARGETING::ATTR_PROC_PCIE_LANE_MASK_type
- effectiveLaneMask = {{0}};
- memcpy(effectiveLaneMask,laneMaskNonBifurcated,
- sizeof(effectiveLaneMask));
-
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL_type
- effectiveLaneReversal = {{0}};
- memcpy(effectiveLaneReversal,laneReversalNonBifrucated,
- sizeof(effectiveLaneReversal));
-
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP_type
- effectiveLaneSwap = {0};
-
- // Get the actual number of IOPs for this proc
- size_t iopsPerProc = (i_pProcChipTarget->getAttr<
- TARGETING::ATTR_PROC_PCIE_NUM_IOP>());
-
- // Apply the non-bifurcated lane swap
- for(size_t iop = 0; iop<iopsPerProc; ++iop)
- {
- uint8_t laneSwap = 0;
- for(size_t laneGroup = 0;
- laneGroup <
- (sizeof(laneSwapNonBifurcated)/sizeof(effectiveLaneSwap));
- ++laneGroup)
- {
- // If lanes are used and swap not yet set, then set it
- if( (effectiveLaneMask[iop][laneGroup])
- && (!laneSwap))
- {
- laneSwap =
- laneSwapNonBifurcated[iop][laneGroup];
- }
- }
- effectiveLaneSwap[iop] = laneSwap;
- }
-
-#ifdef DYNAMIC_BIFURCATION
-
- TARGETING::ATTR_PROC_PCIE_LANE_MASK_BIFURCATED_type
- laneMaskBifurcated = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_LANE_MASK_BIFURCATED>(
- laneMaskBifurcated));
-
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL_BIFURCATED_type
- laneReversalBifurcated = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL_BIFURCATED>(
- laneReversalBifurcated));
-
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP_BIFURCATED_type
- bifurcatedSwap = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP_BIFURCATED>(
- bifurcatedSwap));
-
- // Apply any IOP bifurcation settings
- for(BifurcatedIopsContainer::const_iterator iopItr = iopList.begin();
- iopItr != iopList.end();
- ++iopItr)
- {
- BifurcatedIopsContainer::const_reference iop = *iopItr;
- memcpy(
- &effectiveLaneReversal[iop][0],
- &laneReversalBifurcated[iop][0],
- sizeof(effectiveLaneReversal)/iopsPerProc);
-
- memcpy(
- &effectiveLaneMask[iop][0],
- &laneMaskBifurcated[iop][0],
- sizeof(effectiveLaneMask)/iopsPerProc);
-
- uint8_t laneSwap = 0;
- for(size_t laneGroup=0;
- laneGroup <
- (sizeof(bifurcatedSwap)/sizeof(effectiveLaneSwap));
- ++laneGroup)
- {
- // If lanes are used and swap not yet set, then set it
- if( (effectiveLaneMask[iop][laneGroup])
- && (!laneSwap))
- {
- laneSwap =
- bifurcatedSwap[iop][laneGroup];
- }
- }
- effectiveLaneSwap[iop] = laneSwap;
- }
-#endif
-
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_LANE_MASK>(effectiveLaneMask);
-
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_REVERSAL>(effectiveLaneReversal);
-
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_SWAP>(effectiveLaneSwap);
-
- TARGETING::ATTR_PROC_PCIE_DSMP_CAPABLE_type
- dsmpCapable = {{0}};
- assert(i_pProcChipTarget->tryGetAttr<
- TARGETING::ATTR_PROC_PCIE_DSMP_CAPABLE>(dsmpCapable));
-
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE_type phbActiveMask = 0;
- TARGETING::ATTR_PROC_PCIE_IOP_CONFIG_type iopConfig = 0;
-
- laneConfigRow effectiveConfig =
- {{{{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}},
- {{LANE_WIDTH_NC,DSMP_DISABLE},
- {LANE_WIDTH_NC,DSMP_DISABLE}}},
- 0x0,PHB_MASK_NA};
-
- // Transform effective config to match lane config table format
- for(size_t iop = 0;
- iop < iopsPerProc;
- ++iop)
- {
- for(size_t laneGroup = 0;
- laneGroup < MAX_LANE_GROUPS_PER_IOP;
- ++laneGroup)
- {
- effectiveConfig.laneSet[iop][laneGroup].width
- = _laneMaskToLaneWidth(effectiveLaneMask[iop][laneGroup]);
- effectiveConfig.laneSet[iop][laneGroup].dsmp
- = dsmpCapable[iop][laneGroup];
- }
- }
-
- const laneConfigRow* laneConfigItr =
- std::find(
- pLaneConfigTableBegin,
- pLaneConfigTableEnd,
- effectiveConfig);
-
- if(laneConfigItr != pLaneConfigTableEnd)
- {
- iopConfig = laneConfigItr->laneConfig;
- phbActiveMask = laneConfigItr->phbActive;
-
- // Disable applicable PHBs
- phbActiveMask &= (~disabledPhbs);
- (void)_deconfigPhbsBasedOnPciState(
- i_pProcChipTarget,
- phbActiveMask);
- }
- else
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK "computeProcPcieConfigAttrs> "
- "Code bug! Proc PCIE IOP configuration not found. Continuing "
- "with no PHBs active. "
- "IOP0 Lane set 0: Lane mask = 0x%04X, DSMP enable = 0x%02X. "
- "IOP0 Lane set 1: Lane mask = 0x%04X, DSMP enable = 0x%02X. ",
- effectiveLaneMask[0][0],dsmpCapable[0][0],
- effectiveLaneMask[0][1],dsmpCapable[0][1]);
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "IOP1 Lane set 0: Lane mask = 0x%04X, DSMP enable = 0x%02X. "
- "IOP1 Lane set 1: Lane mask = 0x%04X, DSMP enable = 0x%02X. ",
- effectiveLaneMask[1][0],dsmpCapable[1][0],
- effectiveLaneMask[1][1],dsmpCapable[1][1]);
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "IOP2 Lane set 0: Lane mask = 0x%04X, DSMP enable = 0x%02X. "
- "IOP2 Lane set 1: Lane mask = 0x%04X, DSMP enable = 0x%02X. ",
- effectiveLaneMask[2][0],dsmpCapable[2][0],
- effectiveLaneMask[2][1],dsmpCapable[2][1]);
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "Proc chip target HUID = 0x%08X.",
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>());
- /*@
- * @errortype
- * @moduleid ISTEP_COMPUTE_PCIE_CONFIG_ATTRS
- * @reasoncode ISTEP_INVALID_CONFIGURATION
- * @userdata1[0:31] Target processor chip's HUID
- * @userdata1[32:47] IOP 0 lane set 0 lane mask
- * @userdata1[48:63] IOP 0 lane set 1 lane mask
- * @userdata2[0:15] IOP 1 lane set 0 lane mask
- * @userdata2[16:31] IOP 1 lane set 1 lane mask
- * @userdata2[32:47] IOP 2 lane set 0 lane mask
- * @userdata2[48:63] IOP 2 lane set 1 lane mask
- * @devdesc No valid PCIE IOP configuration found. All
- * PHBs on the processor will be disabled.
- * @custdesc A problem isolated to firmware or firmware
- * customization occurred during the IPL of the
- * system.
- */
- pError = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ISTEP_COMPUTE_PCIE_CONFIG_ATTRS,
- ISTEP_INVALID_CONFIGURATION,
- TWO_UINT32_TO_UINT64(
- i_pProcChipTarget->getAttr<TARGETING::ATTR_HUID>(),
- TWO_UINT16_TO_UINT32(
- effectiveLaneMask[0][0],
- effectiveLaneMask[0][1])),
- FOUR_UINT16_TO_UINT64(
- effectiveLaneMask[1][0],
- effectiveLaneMask[1][1],
- effectiveLaneMask[2][0],
- effectiveLaneMask[2][1]),
- true);
- ERRORLOG::ErrlUserDetailsTarget(i_pProcChipTarget).addToLog(pError);
- pError->collectTrace(ISTEP_COMP_NAME);
- errlCommit(pError, ISTEP_COMP_ID);
- }
-
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_PHB_ACTIVE>(phbActiveMask);
- i_pProcChipTarget->setAttr<
- TARGETING::ATTR_PROC_PCIE_IOP_CONFIG>(iopConfig);
-
- } while(0);
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- EXIT_MRK "computeProcPcieConfigAttrs: EID = 0x%08X, PLID = 0x%08X, "
- "RC = 0x%08X.",
- ERRL_GETEID_SAFE(pError),ERRL_GETPLID_SAFE(pError),
- ERRL_GETRC_SAFE(pError));
-
- return pError;
-}
-
-//*****************************************************************************
-// wrapper function to call proc_pcie_scominit
-//******************************************************************************
-void* call_proc_pcie_scominit( void *io_pArgs )
-{
- errlHndl_t l_errl = NULL;
- 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
- //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();
-}
-
-//*****************************************************************************
-// 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" );
-
- //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();
-}
-
-//******************************************************************************
-// 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" );
- //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/hwpf/hwp/nest_chiplets/nest_chiplets.H b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H
deleted file mode 100644
index 75f8b756c..000000000
--- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H
+++ /dev/null
@@ -1,380 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,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 */
-#ifndef __NEST_CHIPLETS_NEST_CHIPLETS_H
-#define __NEST_CHIPLETS_NEST_CHIPLETS_H
-
-/**
- * @file nest_chiplets.H
- *
- * Nest Chiplets
- *
- * All of the following routines are "named isteps" - they are invoked as
- * tasks by the @ref IStepDispatcher.
- *
- * *****************************************************************
- * THIS FILE WAS GENERATED ON 2012-04-03:1952
- * *****************************************************************
- *
- * HWP_IGNORE_VERSION_CHECK
- *
- */
-
- /* @tag isteplist
- * @docversion v1.28 (12/03/12)
- * @istepname nest_chiplets
- * @istepnum 07
- * @istepdesc Nest Chiplets
- *
- * @{
- * @substepnum 1
- * @substepname proc_a_x_pci_dmi_pll_initf
- * @substepdesc : PLL Initfile for A, X, PCIe, DMI
- * @target_sched serial
- * @}
- * @{
- * @substepnum 2
- * @substepname proc_a_x_pci_dmi_pll_setup
- * @substepdesc : Setup PLL for A, X, PCIe, DMI
- * @target_sched serial
- * @}
- * @{
- * @substepnum 3
- * @substepname proc_startclock_chiplets
- * @substepdesc : Start clocks on A, X, PCIe chiplets
- * @target_sched serial
- * @}
- * @{
- * @substepnum 4
- * @substepname proc_chiplet_scominit
- * @substepdesc : Apply scom inits to chiplets
- * @target_sched serial
- * @}
- * @{
- * @substepnum 5
- * @substepname proc_xbus_scominit
- * @substepdesc : Apply scom inits to Xbus
- * @target_sched serial
- * @}
- * @{
- * @substepnum 6
- * @substepname proc_abus_scominit
- * @substepdesc : Apply scom inits to Abus
- * @target_sched serial
- * @}
-
- * @{
- * @substepnum 7
- * @substepname proc_pcie_scominit
- * @substepdesc : Apply scom inits to PCIe chiplets
- * @target_sched serial
- * @}
- * @{
- * @substepnum 8
- * @substepname proc_scomoverride_chiplets
- * @substepdesc : Apply sequenced scom inits
- * @target_sched serial
- * @}
- *
- */
-
-/******************************************************************************/
-// Includes
-/******************************************************************************/
-#include <stdint.h>
-
-namespace NEST_CHIPLETS
-{
-
-/**
- * @brief # of bits in a byte for computation purposes
- */
-static const size_t BITS_PER_BYTE = 8;
-
-/**
- * @brief Container for holding IOPs to bifurcate
- */
-typedef std::list<uint32_t> BifurcatedIopsContainer;
-
-/**
- * @brief Enum indicating number of usable IOP lanes for a proc
- */
-enum IopLanesPerProc
-{
- IOP_LANES_PER_PROC_24X = 24,// 24 Lanes per proc
- IOP_LANES_PER_PROC_32X = 32,// 32 Lanes per proc
- IOP_LANES_PER_PROC_40X = 40,// 40 Lanes per proc
-};
-
-/**
- * @brief Struct for PCIE lane properties within IOP configuration table
- */
-struct LaneSet
-{
- uint8_t width; // Width of each PCIE lane set (0, 8, or 16)
- uint8_t dsmp; // Whether dSMP is enabled (0=disabled, 1=enabled)
-};
-
-/**
- * @brief Max possible IOPs per processor; P8+ has 3
- * P8 has 2
- */
-static const size_t MAX_IOPS_PER_PROC = 3;
-
-/**
- * @brief Lane groups per IOP; invarient across all POWER8 processors
- */
-static const size_t MAX_LANE_GROUPS_PER_IOP = 2;
-
-/**
- * @brief Struct for each row in PCIE IOP configuration table.
- * Used by code to compute the IOP config and PHBs active mask.
- */
-struct laneConfigRow
-{
- // Grouping of lanes under one IOP
- LaneSet laneSet[MAX_IOPS_PER_PROC][MAX_LANE_GROUPS_PER_IOP];
-
- // IOP config value from PCIE IOP configuration table
- uint8_t laneConfig;
-
- // PHB active mask (see PhbActiveMask enum)
- // PHB0 = 0x80
- // PHB1 = 0x40
- // PHB2 = 0x20
- // PHB3 = 0x10
- uint8_t phbActive;
-};
-
-/**
- * @brief Enum indicating lane width (units = "number of lanes")
- */
-enum LaneWidth
-{
- LANE_WIDTH_NC = 0,
- LANE_WIDTH_8X = 8,
- LANE_WIDTH_16X = 16
-};
-
-/**
- * @brief Enum indicating whether lane set has DSMP Capability
- */
-enum DsmpCapability
-{
- DSMP_DISABLE = 0,
- DSMP_ENABLE = 1
-};
-
-/**
- * @brief Enumeration of lane mask values
- */
-enum LaneMask
-{
- LANE_MASK_X16 = 0xFFFF,
- LANE_MASK_X8_GRP0 = 0xFF00,
- LANE_MASK_X8_GRP1 = 0x00FF,
-};
-
-/**
- * @brief Enum giving bitmask values for enabled PHBs
- */
-enum PhbActiveMask
-{
- PHB_MASK_NA = 0x00, ///< Sentinel mask (loop terminations)
- PHB0_MASK = 0x80, ///< PHB0 enabled
- PHB1_MASK = 0x40, ///< PHB1 enabled
- PHB2_MASK = 0x20, ///< PHB2 enabled
- PHB3_MASK = 0x10, ///< PHB3 enabled
-};
-
-/**
- * @brief Array of unsupported lanes configs for x40 lanes
- */
-uint8_t UnsupportedLanesx40[] = {0x4,0x5,0x8,0x9,0xA,0xB,0xC};
-
-/**
- * @brief call_proc_attr_update
- *
- * Stub to enable platforms to override attributes
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void * call_proc_attr_update( void * io_pArgs );
-
-/**
- * @brief proc_enable_osclite
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_enable_osclite(void *io_pArgs);
-
-/**
- * @brief proc_a_x_pci_dmi_pll_initf
- *
- * PLL init file for A, X, PCIe, DMI
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs );
-
-/**
- * @brief proc_a_x_pci_dmi_pll_setup
- *
- * Setup PLL for A, X, PCIe, DMI
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs );
-
-
-/**
- * @brief proc_startclock_chiplets
- *
- * Start clocks on A, X, PCIe chiplets
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_startclock_chiplets( void *io_pArgs );
-
-/**
- * @brief proc_chiplet_scominit
- *
- * Apply scom inits to chiplets
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_chiplet_scominit( void *io_pArgs );
-
-/**
- * @brief proc_xbus_scominit
- *
- * Apply scom inits to Xbus
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_xbus_scominit( void *io_pArgs );
-
-/**
- * @brief proc_abus_scominit
- *
- * Apply scom inits to Abus
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_abus_scominit( void *io_pArgs );
-
-/**
- * @brief proc_obus_scominit
- *
- * Apply scom inits to OBUS
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_proc_obus_scominit( void *io_pArgs );
-
-/**
- * @brief proc_npu_scominit
- *
- * Apply scom inits to NPU
- *
- * param[in.out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_proc_npu_scominit( void *io_pArgs );
-
-/**
- * @brief proc_pcie_scominit
- *
- * Apply scom inits to PCIe chiplets
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_pcie_scominit( void *io_pArgs );
-
-/**
- * @brief proc_scomoverride_chiplets
- *
- * Apply sequenced scom inits
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_scomoverride_chiplets( void *io_pArgs );
-
-/**
- * @brief proc_chiplet_enable_ridi
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- *
- */
-void* call_proc_chiplet_enable_ridi( void *io_pArgs );
-
-/**
- * @brief Setup the ATTR_CHIP_REGIONS_TO_ENABLE attribute for input proc.
- *
- * @param[in] i_procTarget Processor target to customize data for.
- *
- * @return Valid error handle otherwise NULL
- *
- */
-errlHndl_t customizeChipRegions(TARGETING::Target* i_procTarget);
-
-}; // end namespace
-
-#endif
-
diff --git a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
index 087e07844..8b27f89ce 100644
--- a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
+++ b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
@@ -43,7 +43,6 @@
#include <fapiPlatHwpInvoker.H>
#include <hwpf/fapi/fapiMvpdAccess.H>
#include <hwpf/hwpf_reasoncodes.H>
-#include <slave_sbe.H>
#include <p8_build_pstate_datablock.H>
#include <proc_get_voltage.H>
#include <pstates.h>
diff --git a/src/usr/hwpf/hwp/slave_sbe/makefile b/src/usr/hwpf/hwp/slave_sbe/makefile
index 876ebaaac..c7543213d 100644
--- a/src/usr/hwpf/hwp/slave_sbe/makefile
+++ b/src/usr/hwpf/hwp/slave_sbe/makefile
@@ -51,7 +51,6 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/secure_boot
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer
## NOTE: add new object files when you add a new HWP
-OBJS += slave_sbe.o
OBJS += proc_extract_sbe_rc.o
OBJS += proc_read_seeprom.o
OBJS += proc_getecid.o
diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
deleted file mode 100644
index 352998471..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
+++ /dev/null
@@ -1,881 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/slave_sbe.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,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 slave_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>
-
-// fapi support
-#include <fapi.H>
-#include <fapiPlatHwpInvoker.H>
-
-#include "slave_sbe.H"
-#include "proc_getecid.H"
-#include "proc_spless_sbe_startWA.H"
-#include <sbe/sbeif.H>
-#include <freqVoltageSvc.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 SLAVE_SBE
-{
-
-uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procChipHandle );
-void fenceAttachedMembufs( TARGETING::Target * i_procChipHandle );
-
-//******************************************************************************
-// 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" );
-
- // 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 );
- 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();
-
-}
-
-//******************************************************************************
-// 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" );
-
- //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();
-}
-
-//******************************************************************************
-// 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" );
-
- //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();
-}
-
-
-//******************************************************************************
-// 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);
-
- 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_sbe_start function
-//******************************************************************************
-void* call_host_sbe_start( void *io_pArgs )
-{
- errlHndl_t l_errl = NULL;
- IStepError l_stepError;
- bool l_sbeSeepromSelect = false;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_sbe_start entry" );
-
- do
- {
- //
- // 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,
- "host_sbe_start: %d procs in the system.",
- l_procTargetList.size() );
-
-
- //
- // get the SBE Image side that master Proc booted from
- // if hostboot needs to start SBE on slave processors
- //
- if ( (l_procTargetList.size() > 0) &&
- !INITSERVICE::spBaseServicesEnabled() )
- {
- uint64_t scomData = 0x0;
- size_t op_size = sizeof(scomData);
- l_errl = deviceRead(l_pMasterProcTarget,
- &scomData,
- op_size,
- DEVICE_SCOM_ADDRESS(PORE_SBE_VITAL_0x0005001C));
-
- if(l_errl)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK"call_host_sbe_start: Error reading SBE "
- "VITAL REG (0x%.8X) from Target HUID=0x%.8X",
- PORE_SBE_VITAL_0x0005001C,
- TARGETING::get_huid(l_pMasterProcTarget));
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_pMasterProcTarget).addToLog( l_errl );
-
- l_errl->setSev(ERRL_SEV_INFORMATIONAL);
-
- // Create IStep error log and cross reference error
- // that occurred
- l_stepError.addErrorDetails( l_errl );
-
- // Commit error log
- errlCommit( l_errl, HWPF_COMP_ID );
-
- // Don't break - attempt to continue
- }
-
- // Bit 8 in VITAL REG is SBE_IMAGE_SELECT bit:
- // - if 0 then first image otherwise 2nd image
- else if( scomData & 0x0080000000000000 )
- {
- l_sbeSeepromSelect = 1;
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_host_sbe_start: Master Proc booted from "
- "2nd SBE Image. SBE_VITAL_REG(0x%X) data = 0x%.16X",
- PORE_SBE_VITAL_0x0005001C, scomData);
- }
- }
-
- // 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;
-
- fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP,
- l_pProcTarget );
-
-
- if (l_pProcTarget == l_pMasterProcTarget )
- {
- // we are just checking the Slave SBE's, skip the master
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X --> skipping proc_spless_sbe_startWA",
- TARGETING::get_huid(l_pProcTarget));
-
-
- continue;
- }
- else if (!INITSERVICE::spBaseServicesEnabled())
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X --> "
- "calling proc_spless_sbe_startWA",
- TARGETING::get_huid(l_pProcTarget));
-
- //Need to issue SBE start workaround on all slave chips
- // Invoke the HWP
- FAPI_INVOKE_HWP(l_errl,
- proc_spless_sbe_startWA,
- l_fapiProcTarget,
- l_sbeSeepromSelect);
- }
- else
- {
- //Eventually for secureboot will need to kick off
- //SBE here (different HWP), but for now not needed
- //so do nothing
- }
-
- if (l_errl)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : sbe_start (proc_spless_sbe_startWA) "
- "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
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : sbe_start (proc_spless_sbe_startWA) "
- "completed ok");
-
- }
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X --> after proc_spless_sbe_startWA",
- TARGETING::get_huid(l_pProcTarget));
-
- } // endfor
-
- }while( 0 );
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_sbe_start exit" );
-
- // end task, returning any errorlogs to IStepDisp
- return l_stepError.getErrorHandle();
-}
-
-
-//******************************************************************************
-// call_proc_check_slave_sbe_seeprom_complete function
-//******************************************************************************
-void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
-{
- errlHndl_t l_errl = NULL;
- 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 );
-
- // 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;
-
- // Invoke the HWP
- FAPI_INVOKE_HWP(l_errl,
- proc_getecid,
- l_fapiProcTarget,
- l_fuseString );
-
- if (l_errl)
- {
- if (l_pProcTarget->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, 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();
-}
-
-//******************************************************************************
-// call_proc_xmit_sbe
-//******************************************************************************
-void* call_proc_xmit_sbe(void *io_pArgs )
-{
- IStepError l_stepError;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_xmit_sbe entry" );
-
- // call proc_xmit_sbe.C
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_xmit_sbe exit" );
-
- // end task, returning any errorlogs to IStepDisp
- return l_stepError.getErrorHandle();
-}
-
-//******************************************************************************
-// 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 )
- {
-
- 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
- //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/hwpf/hwp/slave_sbe/slave_sbe.H b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
deleted file mode 100644
index 0a42ce9e4..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
+++ /dev/null
@@ -1,148 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/slave_sbe.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,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 */
-
-#ifndef __SLAVE_SBE_SLAVE_SBE_H
-#define __SLAVE_SBE_SLAVE_SBE_H
-
-/**
- * @file slave_sbe.H
- *
- * Slave SBE Isteps that invoke HWPs.
- *
- * Note that a number of IStep 6 substeps are done by Hostboot specific
- * functions, this file is for the substeps that invoke HWPs
- *
- * All of the following routines are "named isteps" - they are invoked as
- * tasks by the @ref IStepDispatcher.
- *
- *
- * HWP_IGNORE_VERSION_CHECK
- */
-
- /* @tag isteplist
- * @docversion v1.28 (12/03/12)
- * @istepname slave_sbe
- * @istepnum 6
- * @istepdesc Slave SBE
- *
- * @{
- * @substepnum 9
- * @substepname host_slave_sbe_config
- * @substepdesc :
- * @target_sched serial
- * @}
- * @{
- * @substepnum 10
- * @substepname host_sbe_start
- * @substepdesc : execute proc_start_sbe.C procedure
- * @target_sched serial
- * @}
- * @{
- * @substepnum 11
- * @substepname proc_check_slave_slave_sbe_seeprom_complete
- * @substepdesc : Check slave SBE complete
- * @target_sched serial
-
- *
- */
-
-namespace SLAVE_SBE
-{
-
-/**
- * @brief host_slave_sbe_config
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_host_slave_sbe_config(void *io_pArgs);
-
-/**
- * @brief call_host_setup_sbe
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_host_setup_sbe(void *io_pArgs);
-
-/**
- * @brief call_host_cbs_start
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_host_cbs_start(void *io_pArgs);
-
-
-/**
- * @brief set_proc_voltage_vid - sets ATTR_PROC_BOOT_VOLTAGE_VID
- *
- * return error logs
- */
-errlHndl_t set_proc_boot_voltage_vid();
-
-
-/**
- * @brief host_sbe_start
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_host_sbe_start(void *io_pArgs);
-
-/**
- * @brief proc_check_slave_sbe_seeprom_complete
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_proc_check_slave_sbe_seeprom_complete(void *io_pArgs);
-
-/**
- * @brief proc_xmit_sbe
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_proc_xmit_sbe(void *io_pArgs);
-/**
- * @brief proc_cen_ref_clk_enable
- *
- * param[in,out] - pointer to any arguments, usually NULL
- *
- * return any error logs to istep
- */
-void* call_proc_cen_ref_clk_enable(void *io_pArgs);
-
-
-}; // end namespace
-
-#endif
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
diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile
index 296b4ff56..35403a1a2 100644
--- a/src/usr/isteps/makefile
+++ b/src/usr/isteps/makefile
@@ -27,6 +27,7 @@ MODULE = isteps
SUBDIRS+=istep06.d
SUBDIRS+=istep07.d
+SUBDIRS+=istep08.d
OBJS += hwpisteperror.o
OBJS += hwpistepud.o
OpenPOWER on IntegriCloud