summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/isteps')
-rw-r--r--src/usr/isteps/istep13/hbVddrMsg.C2
-rw-r--r--src/usr/isteps/istep14/call_host_mpipl_service.C10
-rw-r--r--src/usr/isteps/istep14/call_host_startprd_dram.C30
-rw-r--r--src/usr/isteps/istep14/call_mss_power_cleanup.C51
-rw-r--r--src/usr/isteps/istep14/call_mss_thermal_init.C34
-rw-r--r--src/usr/isteps/istep14/call_proc_exit_cache_contained.C54
-rw-r--r--src/usr/isteps/istep14/call_proc_htm_setup.C55
-rw-r--r--src/usr/isteps/istep14/call_proc_pcie_config.C33
-rw-r--r--src/usr/isteps/istep14/call_proc_setup_bars.C147
-rw-r--r--src/usr/isteps/istep14/makefile31
10 files changed, 244 insertions, 203 deletions
diff --git a/src/usr/isteps/istep13/hbVddrMsg.C b/src/usr/isteps/istep13/hbVddrMsg.C
index 527a0bdef..94b4aee32 100644
--- a/src/usr/isteps/istep13/hbVddrMsg.C
+++ b/src/usr/isteps/istep13/hbVddrMsg.C
@@ -284,7 +284,7 @@ void HBVddrMsg::createVddrData(
(void)addMemoryVoltageDomains<
TARGETING::ATTR_MSS_VOLT_VPP_OFFSET_DISABLE,
TARGETING::ATTR_MEM_VPP_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_VPP_BASE,
+ TARGETING::ATTR_MSS_VOLT_VPP,
TARGETING::ATTR_VPP_ID>(
pMembuf,
io_request);
diff --git a/src/usr/isteps/istep14/call_host_mpipl_service.C b/src/usr/isteps/istep14/call_host_mpipl_service.C
index cce2910f6..53c7382f7 100644
--- a/src/usr/isteps/istep14/call_host_mpipl_service.C
+++ b/src/usr/isteps/istep14/call_host_mpipl_service.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -49,11 +49,11 @@ void* call_host_mpipl_service (void *io_pArgs)
IStepError l_StepError;
- errlHndl_t l_err = NULL;
-
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_mpipl_service entry" );
-
+//@TODO RTC: 134431 MPIPL Changes for P9 - Placeholder
+#if 0
+ errlHndl_t l_err = NULL;
// call proc_mpipl_chip_cleanup.C
TARGETING::TargetHandleList l_procTargetList;
getAllChips(l_procTargetList, TYPE_PROC );
@@ -73,7 +73,6 @@ void* call_host_mpipl_service (void *io_pArgs)
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"target HUID %.8X", TARGETING::get_huid(l_pProcTarget));
- //@TODO RTC:133831 cast OUR type of target to a FAPI type of target.
//const fapi::Target l_fapi_pProcTarget( TARGET_TYPE_PROC_CHIP,
// (const_cast<TARGETING::Target*> (l_pProcTarget)) );
@@ -260,6 +259,7 @@ void* call_host_mpipl_service (void *io_pArgs)
// Commit Error
errlCommit( l_err, HWPF_COMP_ID );
}
+#endif
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_mpipl_service exit" );
diff --git a/src/usr/isteps/istep14/call_host_startprd_dram.C b/src/usr/isteps/istep14/call_host_startprd_dram.C
index 33b39ebf0..55a6c871c 100644
--- a/src/usr/isteps/istep14/call_host_startprd_dram.C
+++ b/src/usr/isteps/istep14/call_host_startprd_dram.C
@@ -36,36 +36,6 @@ void* call_host_startprd_dram (void *io_pArgs)
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_startPRD_dram entry" );
-#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
- // figure out what targets we need
- // customize any other inputs
- // set up loops to go through all targets (if parallel, spin off a task)
-
- // write HUID of target
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X", TARGETING::get_huid(l_@targetN_target));
-
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP,
- (const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
- // call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, host_startPRD_dram, _args_...);
- if ( l_errl )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
- }
- // @@@@@ END CUSTOM BLOCK: @@@@@
-#endif
-
#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS
// update firdata inputs for OCC
TARGETING::Target* masterproc = NULL;
diff --git a/src/usr/isteps/istep14/call_mss_power_cleanup.C b/src/usr/isteps/istep14/call_mss_power_cleanup.C
index c0e517983..562f71fc5 100644
--- a/src/usr/isteps/istep14/call_mss_power_cleanup.C
+++ b/src/usr/isteps/istep14/call_mss_power_cleanup.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -34,6 +34,10 @@
#include <targeting/common/util.H>
#include <targeting/common/utilFilter.H>
+#include <config.h>
+#include <fapi2.H>
+#include <fapi2/plat_hwp_invoker.H>
+#include <p9_mss_power_cleanup.H>
using namespace ISTEP;
using namespace ISTEP_ERROR;
@@ -50,6 +54,49 @@ void* call_mss_power_cleanup (void *io_pArgs)
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_mss_power_cleanup entry" );
+ TARGETING::TargetHandleList l_mcbistTargetList;
+ getAllChiplets(l_mcbistTargetList, TYPE_MCBIST);
+
+ for (const auto & l_target : l_mcbistTargetList)
+ {
+ // Dump current run on target
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running mss_power_cleanup HWP on "
+ "target HUID %.8X",
+ TARGETING::get_huid(l_target));
+
+ fapi2::Target <fapi2::TARGET_TYPE_MCBIST> l_fapi_target
+ (l_target);
+
+ // call the HWP with each fapi2::Target
+ FAPI_INVOKE_HWP(l_err, p9_mss_power_cleanup, l_fapi_target);
+
+ if (l_err)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: mss_power_cleanup HWP returns error",
+ l_err->reasonCode());
+
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_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 : mss_power_cleanup HWP( )" );
+ }
+ }
+
+//@TODO RTC:144076 L1 HWPs for Centaur+Cumulus
+#if 0
+ // -- Cumulus only
// Get a list of all present Centaurs
TargetHandleList l_presCentaurs;
getChipResources(l_presCentaurs, TYPE_MEMBUF, UTIL_FILTER_PRESENT);
@@ -132,7 +179,7 @@ void* call_mss_power_cleanup (void *io_pArgs)
l_currMBA0Huid, l_currMBA1Huid);
}
}
-
+#endif
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_mss_power_cleanup exit" );
diff --git a/src/usr/isteps/istep14/call_mss_thermal_init.C b/src/usr/isteps/istep14/call_mss_thermal_init.C
index 51633ba84..034c696b5 100644
--- a/src/usr/isteps/istep14/call_mss_thermal_init.C
+++ b/src/usr/isteps/istep14/call_mss_thermal_init.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -34,6 +34,11 @@
#include <targeting/common/util.H>
#include <targeting/common/utilFilter.H>
+#include <config.h>
+#include <fapi2.H>
+#include <fapi2/plat_hwp_invoker.H>
+#include <p9_mss_thermal_init.H>
+
using namespace ISTEP;
using namespace ISTEP_ERROR;
@@ -44,14 +49,18 @@ namespace ISTEP_14
{
void* call_mss_thermal_init (void *io_pArgs)
{
- errlHndl_t l_errl = NULL;
IStepError l_StepError;
+//@TODO RTC:144076 L1 HWPs for Centaur+Cumulus
+#if 0
+ // -- Cumulus only ---
+ errlHndl_t l_errl = NULL;
+
do
{
// Get all Centaur targets
TARGETING::TargetHandleList l_memBufTargetList;
- getAllChips(l_memBufTargetList, TYPE_MEMBUF );
+ getAllChiplets(l_memBufTargetList, TYPE_MCBIST );
// --------------------------------------------------------------------
// run mss_thermal_init on all Centaurs
@@ -62,24 +71,21 @@ void* call_mss_thermal_init (void *io_pArgs)
++l_iter)
{
// make a local copy of the target for ease of use
- const TARGETING::Target* l_pCentaur = *l_iter;
+ TARGETING::Target* l_pCentaur = *l_iter;
// write HUID of target
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"target HUID %.8X", TARGETING::get_huid(l_pCentaur));
- //@TODO RTC:133831 cast OUR type of target to a FAPI type of target.
- //const fapi::Target l_fapi_pCentaur( TARGET_TYPE_MEMBUF_CHIP,
- // (const_cast<TARGETING::Target*>(l_pCentaur)) );
+ fapi2::Target<fapi2::TARGET_TYPE_MCBIST> l_fapi_pCentaur
+ (l_pCentaur);
// Current run on target
- //TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- // "Running call_mss_thermal_init HWP on "
- // "target HUID %.8X", TARGETING::get_huid(l_pCentaur));
-
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running call_mss_thermal_init HWP on "
+ "target HUID %.8X", TARGETING::get_huid(l_pCentaur));
- // call the HWP with each fapi::Target
- //FAPI_INVOKE_HWP( l_errl, mss_thermal_init, l_fapi_pCentaur );
+ FAPI_INVOKE_HWP( l_errl, p9_mss_thermal_init, l_fapi_pCentaur );
if ( l_errl )
{
@@ -122,7 +128,6 @@ void* call_mss_thermal_init (void *io_pArgs)
{
const TARGETING::Target* l_pTarget = *l_cpuIter;
- //@TODO RTC:133831
//fapi::Target l_fapiproc_target( TARGET_TYPE_PROC_CHIP,
// (const_cast<TARGETING::Target*>(l_pTarget)));
@@ -166,6 +171,7 @@ void* call_mss_thermal_init (void *io_pArgs)
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : call_mss_thermal_init" );
}
+#endif
// end task, returning any errorlogs to IStepDisp
return l_StepError.getErrorHandle();
diff --git a/src/usr/isteps/istep14/call_proc_exit_cache_contained.C b/src/usr/isteps/istep14/call_proc_exit_cache_contained.C
index f62982465..1fb70dd2f 100644
--- a/src/usr/isteps/istep14/call_proc_exit_cache_contained.C
+++ b/src/usr/isteps/istep14/call_proc_exit_cache_contained.C
@@ -34,6 +34,14 @@
#include <targeting/common/commontargeting.H>
#include <targeting/common/util.H>
#include <targeting/common/utilFilter.H>
+#include <fapi2/target.H>
+
+
+//HWP Invoker
+#include <fapi2/plat_hwp_invoker.H>
+
+#include <p9_exit_cache_contained.H>
+
#include <sys/mm.h>
#include <arch/pirformat.H>
@@ -74,11 +82,13 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
targetService().getTopLevelTarget(l_sys);
assert( l_sys != NULL );
- //@TODO RTC:133831 Commenting out due to missing attributes
errlHndl_t l_errl = NULL;
uint8_t l_mpipl = l_sys->getAttr<ATTR_IS_MPIPL_HB>();
ATTR_PAYLOAD_BASE_type payloadBase = 0;
+ TARGETING::TargetHandleList l_procList;
+ getAllChips(l_procList, TYPE_PROC);
+
if(!l_mpipl)
{
ATTR_PAYLOAD_IN_MIRROR_MEM_type l_mirrored = false;
@@ -116,15 +126,13 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
// Verify there is memory at the mirrored location
bool mirroredMemExists = false;
- TARGETING::TargetHandleList l_procList;
- getAllChips(l_procList, TYPE_PROC);
for (TargetHandleList::const_iterator proc = l_procList.begin();
proc != l_procList.end() && !mirroredMemExists;
++proc)
{
- uint64_t mirrorBase[4];
- uint64_t mirrorSize[4];
+ uint64_t mirrorBase[sizeof(fapi2::ATTR_PROC_MIRROR_BASES_Type)/sizeof(uint64_t)];
+ uint64_t mirrorSize[sizeof(fapi2::ATTR_PROC_MIRROR_SIZES_Type)/sizeof(uint64_t)];
bool rc = (*proc)->
tryGetAttr<TARGETING::ATTR_PROC_MIRROR_BASES>(mirrorBase);
if(false == rc)
@@ -143,7 +151,9 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
assert(0);
}
- for(uint64_t i = 0; i < 4 && !mirroredMemExists; ++i)
+ for(uint64_t i = 0;
+ i < sizeof(fapi2::ATTR_PROC_MIRROR_BASES_Type) && !mirroredMemExists;
+ ++i)
{
if(mirrorSize[i] != 0 &&
l_mirrorBaseAddr >= mirrorBase[i] &&
@@ -208,25 +218,31 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
l_sys->setAttr<ATTR_PAYLOAD_BASE>(payloadBase);
}
- //@TODO RTC:133831 call the HWP with each fapi::Target
- //FAPI_INVOKE_HWP( l_errl,
- // proc_exit_cache_contained
- // );
+ for (const auto & l_procChip: l_procList)
+ {
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapi_cpu_target(l_procChip);
+ // call p9_proc_exit_cache_contained.C HWP
+ FAPI_INVOKE_HWP( l_errl,
+ p9_exit_cache_contained,
+ l_procChip);
+
+ if(l_errl)
+ {
+ ErrlUserDetailsTarget(l_procChip).addToLog(l_errl);
+ l_stepError.addErrorDetails( l_errl );
+ errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_exit_cache_contained:: failed on proc with HUID : %d",TARGETING::get_huid(l_procChip) );
+ }
+ }
- if ( l_errl )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : call_proc_exit_cache_contained, "
- "errorlog PLID=0x%x",
- l_errl->plid() );
- }
// no errors so extend VMM.
- else
+ if(!l_errl)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : call_proc_exit_cache_contained" );
+ "SUCCESS : call_proc_exit_cache_contained on all procs" );
// @TODO RTC:134082 remove below block
#if 1
diff --git a/src/usr/isteps/istep14/call_proc_htm_setup.C b/src/usr/isteps/istep14/call_proc_htm_setup.C
index 5979f0c83..cc27c2a2e 100644
--- a/src/usr/isteps/istep14/call_proc_htm_setup.C
+++ b/src/usr/isteps/istep14/call_proc_htm_setup.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -22,19 +22,64 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-#include <errl/errlentry.H>
+//From Hostboot Directory
+////Error handling and traces
+#include <errl/errlentry.H>
+#include <errl/errluserdetails.H>
+#include <errl/errludtarget.H>
+#include <errl/errlmanager.H>
+#include <isteps/hwpisteperror.H>
+#include <initservice/isteps_trace.H>
+//HWP Invoker
+#include <fapi2/plat_hwp_invoker.H>
+
+//Targeting Support
+#include <targeting/common/utilFilter.H>
+#include <fapi2/target.H>
+
+//From Import Directory (EKB Repository)
+// #include <p9_htm_setup.H>
+
+//Namespaces
using namespace ERRORLOG;
+using namespace TARGETING;
+using namespace fapi2;
namespace ISTEP_14
{
void* call_proc_htm_setup (void *io_pArgs)
{
- errlHndl_t l_err = NULL;
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_htm_setup entry" );
+ ISTEP_ERROR::IStepError l_StepError;
+ errlHndl_t l_errl = NULL;
+ do {
+ //Use targeting code to get a list of all processors
+ TARGETING::TargetHandleList l_procChips;
+ getAllChips( l_procChips, TARGETING::TYPE_PROC );
+
+ for (const auto & l_procChip: l_procChips)
+ {
+ const fapi2::Target<TARGET_TYPE_PROC_CHIP>
+ l_fapi_cpu_target(l_procChip);
+ // call p9_htm_setup.C HWP
+// FAPI_INVOKE_HWP( l_errl,
+// p9_htm_setup,
+// l_fapi_cpu_target);
- //@TODO RTC:33831 call p9_htm_setup.C HWP
+ if(l_errl)
+ {
+ ErrlUserDetailsTarget(l_procChip).addToLog(l_errl);
+ l_StepError.addErrorDetails( l_errl );
+ errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_htm_setup:: failed on proc with HUID : %d",TARGETING::get_huid(l_procChip) );
+ }
+ }
+ }while(0);
- return l_err;
+ // end task, returning any errorlogs to IStepDisp
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_htm_setup exit" );
+ return l_StepError.getErrorHandle();
}
};
diff --git a/src/usr/isteps/istep14/call_proc_pcie_config.C b/src/usr/isteps/istep14/call_proc_pcie_config.C
index 7eb44fb6c..4851b4a7e 100644
--- a/src/usr/isteps/istep14/call_proc_pcie_config.C
+++ b/src/usr/isteps/istep14/call_proc_pcie_config.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -25,14 +25,19 @@
#include <errl/errlentry.H>
#include <errl/errlmanager.H>
#include <errl/errludtarget.H>
-
#include <isteps/hwpisteperror.H>
#include <initservice/isteps_trace.H>
+//HWP Invoker
+#include <fapi2/plat_hwp_invoker.H>
+
// targeting support
#include <targeting/common/commontargeting.H>
#include <targeting/common/util.H>
#include <targeting/common/utilFilter.H>
+#include <fapi2/target.H>
+
+#include <p9_pcie_config.H>
using namespace ISTEP;
@@ -51,32 +56,24 @@ void* call_proc_pcie_config (void *io_pArgs)
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_proc_pcie_config entry" );
- TARGETING::TargetHandleList l_procTargetList;
- getAllChips(l_procTargetList, TYPE_PROC );
+ TARGETING::TargetHandleList l_procChips;
+ getAllChips(l_procChips, TYPE_PROC );
- for ( TargetHandleList::const_iterator
- l_iter = l_procTargetList.begin();
- l_iter != l_procTargetList.end();
- ++l_iter )
+ for (const auto & l_procChip: l_procChips)
{
- const TARGETING::Target* l_pTarget = *l_iter;
-
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapi_cpu_target(l_procChip);
// write HUID of target
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X", TARGETING::get_huid(l_pTarget));
-
- //@TODO RTC:133831
- // build a FAPI type of target.
- //const fapi::Target l_fapi_pTarget( TARGET_TYPE_PROC_CHIP,
- // (const_cast<TARGETING::Target*>(l_pTarget)) );
+ "target HUID %.8X", TARGETING::get_huid(l_procChip));
// call the HWP with each fapi::Target
- //FAPI_INVOKE_HWP( l_errl, proc_pcie_config, l_fapi_pTarget );
+// FAPI_INVOKE_HWP( l_errl, p9_pcie_config, l_fapi_cpu_target );
if ( l_errl )
{
// capture the target data in the elog
- ErrlUserDetailsTarget(l_pTarget).addToLog( l_errl );
+ ErrlUserDetailsTarget(l_procChip).addToLog( l_errl );
// Create IStep error log and cross reference to error that occurred
l_stepError.addErrorDetails( l_errl );
diff --git a/src/usr/isteps/istep14/call_proc_setup_bars.C b/src/usr/isteps/istep14/call_proc_setup_bars.C
index 536cd5da4..4ec689be0 100644
--- a/src/usr/isteps/istep14/call_proc_setup_bars.C
+++ b/src/usr/isteps/istep14/call_proc_setup_bars.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -25,6 +25,22 @@
#include <errl/errlentry.H>
#include <isteps/hwpisteperror.H>
#include <initservice/isteps_trace.H>
+#include <errl/errlmanager.H>
+#include <errl/errludtarget.H>
+
+// targeting support
+#include <targeting/common/commontargeting.H>
+#include <targeting/common/util.H>
+#include <targeting/common/utilFilter.H>
+#include <fapi2/target.H>
+
+#include <p9_setup_bars.H>
+#include <p9_mss_setup_bars.H>
+
+//HWP Invoker
+#include <fapi2/plat_hwp_invoker.H>
+
+#include <attribute_ids.H>
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
@@ -34,8 +50,7 @@ namespace ISTEP_14
void* call_proc_setup_bars (void *io_pArgs)
{
IStepError l_stepError;
-/*
- @TODO RTC:133831
+
errlHndl_t l_errl = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
@@ -45,60 +60,30 @@ void* call_proc_setup_bars (void *io_pArgs)
// @@@@@ CUSTOM BLOCK: @@@@@
// Get all Centaur targets
TARGETING::TargetHandleList l_cpuTargetList;
- getAllChips(l_cpuTargetList, TYPE_PROC );
+ getAllChips(l_cpuTargetList, TARGETING::TYPE_PROC );
// --------------------------------------------------------------------
// run mss_setup_bars on all CPUs.
// --------------------------------------------------------------------
- for (TargetHandleList::const_iterator
- l_cpu_iter = l_cpuTargetList.begin();
- l_cpu_iter != l_cpuTargetList.end();
- ++l_cpu_iter)
+ for (const auto & l_procChip: l_cpuTargetList)
{
- // make a local copy of the target for ease of use
- const TARGETING::Target* l_pCpuTarget = *l_cpu_iter;
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapi_cpu_target(l_procChip);
// write HUID of target
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "mss_setup_bars: proc "
- "target HUID %.8X", TARGETING::get_huid(l_pCpuTarget));
-
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_pCpuTarget( TARGET_TYPE_PROC_CHIP,
- (const_cast<TARGETING::Target*> (l_pCpuTarget)) );
-
- TARGETING::TargetHandleList l_membufsList;
- getChildAffinityTargets(l_membufsList, l_pCpuTarget,
- CLASS_CHIP, TYPE_MEMBUF);
- std::vector<fapi::Target> l_associated_centaurs;
-
- for (TargetHandleList::const_iterator
- l_membuf_iter = l_membufsList.begin();
- l_membuf_iter != l_membufsList.end();
- ++l_membuf_iter)
- {
- // make a local copy of the target for ease of use
- const TARGETING::Target* l_pTarget = *l_membuf_iter;
+ "p9_mss_setup_bars: proc "
+ "target HUID %.8X", TARGETING::get_huid(l_procChip));
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_centaur_target
- (fapi::TARGET_TYPE_MEMBUF_CHIP,
- (const_cast<TARGETING::Target*>(l_pTarget)) );
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X", TARGETING::get_huid(l_pTarget));
-
- l_associated_centaurs.push_back(l_fapi_centaur_target);
- }
-
- // call the HWP with each fapi::Target
- FAPI_INVOKE_HWP(l_errl,
- mss_setup_bars,
- l_fapi_pCpuTarget, l_associated_centaurs );
+ // call the HWP with all fapi2::Target
+// FAPI_INVOKE_HWP(l_errl,
+// p9_mss_setup_bars,
+// l_fapi_cpu_target );
if ( l_errl )
{
// capture the target data in the elog
- ErrlUserDetailsTarget(l_pCpuTarget).addToLog( l_errl );
+ ErrlUserDetailsTarget(l_procChip).addToLog( l_errl );
// Create IStep error log and cross reference to error that occurred
l_stepError.addErrorDetails( l_errl );
@@ -114,7 +99,7 @@ void* call_proc_setup_bars (void *io_pArgs)
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : mss_setup-bars" );
+ "SUCCESS : p9_mss_setup-bars" );
}
} // endfor
@@ -124,83 +109,29 @@ void* call_proc_setup_bars (void *io_pArgs)
//----------------------------------------------------------------------
// run proc_setup_bars on all CPUs
//----------------------------------------------------------------------
- std::vector<proc_setup_bars_proc_chip> l_proc_chips;
-
- TargetPairs_t l_abusLinks;
- l_errl = PbusLinkSvc::getTheInstance().getPbusConnections(
- l_abusLinks, TYPE_ABUS, false );
+ std::vector<fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>> l_proc_chips;
- for (TargetHandleList::const_iterator
- l_cpu_iter = l_cpuTargetList.begin();
- l_cpu_iter != l_cpuTargetList.end() && !l_errl;
- ++l_cpu_iter)
+ for(uint8_t i = 0; i < l_cpuTargetList.size(); i++)
{
- // make a local copy of the target for ease of use
- const TARGETING::Target* l_pCpuTarget = *l_cpu_iter;
-
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_pCpuTarget( TARGET_TYPE_PROC_CHIP,
- (const_cast<TARGETING::Target*> (l_pCpuTarget)) );
-
- proc_setup_bars_proc_chip l_proc_chip ;
- l_proc_chip.this_chip = l_fapi_pCpuTarget;
- l_proc_chip.process_f0 = true;
- l_proc_chip.process_f1 = true;
-
- TARGETING::TargetHandleList l_abuses;
- getChildChiplets( l_abuses, l_pCpuTarget, TYPE_ABUS );
-
- for (TargetHandleList::const_iterator
- l_abus_iter = l_abuses.begin();
- l_abus_iter != l_abuses.end();
- ++l_abus_iter)
- {
- const TARGETING::Target* l_target = *l_abus_iter;
- uint8_t l_srcID = l_target->getAttr<ATTR_CHIP_UNIT>();
- TargetPairs_t::iterator l_itr = l_abusLinks.find(l_target);
- if ( l_itr == l_abusLinks.end() )
- {
- continue;
- }
-
- const TARGETING::Target *l_pParent = NULL;
- l_pParent = getParentChip(
- (const_cast<TARGETING::Target*>(l_itr->second)));
- fapi::Target l_fapiproc_parent( TARGET_TYPE_PROC_CHIP,
- (void *)l_pParent );
-
- switch (l_srcID)
- {
- case 0: l_proc_chip.a0_chip = l_fapiproc_parent; break;
- case 1: l_proc_chip.a1_chip = l_fapiproc_parent; break;
- case 2: l_proc_chip.a2_chip = l_fapiproc_parent; break;
- default: break;
- }
- }
-
- l_proc_chips.push_back( l_proc_chip );
-
- } // endfor
+ l_proc_chips.push_back(l_cpuTargetList[i]);
+ }
- if (!l_errl)
- {
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call proc_setup_bars");
+ "call p9_setup_bars");
// call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, proc_setup_bars, l_proc_chips, true );
+ FAPI_INVOKE_HWP( l_errl, p9_setup_bars, l_proc_chips, BAR_SETUP_PHASE1 );
if ( l_errl )
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : proc_setup_bars" );
+ "ERROR : p9_setup_bars" );
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : proc_setup_bars" );
+ "SUCCESS : p9_setup_bars" );
}
- }
} // end if !l_errl
// @@@@@ END CUSTOM BLOCK: @@@@@
@@ -217,7 +148,7 @@ void* call_proc_setup_bars (void *io_pArgs)
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_proc_setup_bars exit" );
-*/
+
// end task, returning any errorlogs to IStepDisp
return l_stepError.getErrorHandle();
}
diff --git a/src/usr/isteps/istep14/makefile b/src/usr/isteps/istep14/makefile
index bfeae4023..b15201811 100644
--- a/src/usr/isteps/istep14/makefile
+++ b/src/usr/isteps/istep14/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015
+# Contributors Listed Below - COPYRIGHT 2015,2016
# [+] International Business Machines Corp.
#
#
@@ -25,6 +25,20 @@
ROOTPATH = ../../../..
MODULE = istep14
+PROCEDURE_PATH = ${ROOTPATH}/src/import/chips/p9/procedures
+
+#Add all the extra include paths
+EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/
+EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils
+EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/nest
+EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
+EXTRAINCDIR += ${PROCEDURE_PATH}/xml/error_info/
+EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/eff_config/
+EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/
+
OBJS += call_host_startprd_dram.o
OBJS += call_mss_memdiag.o
OBJS += call_mss_thermal_init.o
@@ -35,4 +49,19 @@ OBJS += call_proc_htm_setup.o
OBJS += call_proc_exit_cache_contained.o
OBJS += call_host_mpipl_service.o
+
+
+include ${ROOTPATH}/procedure.rules.mk
+# include ${PROCEDURE_PATH}/hwp/nest/p9_htm_setup.mk
+include ${PROCEDURE_PATH}/hwp/nest/p9_pcie_config.mk
+include ${PROCEDURE_PATH}/hwp/nest/p9_exit_cache_contained.mk
+include ${PROCEDURE_PATH}/hwp/nest/p9_setup_bars.mk
+# include ${PROCEDURE_PATH}/hwp/nest/p9_mss_setup_bars.mk
+# include ${PROCEDURE_PATH}/hwp/memory/p9_mss_memdiag.mk
+# include ${PROCEDURE_PATH}/hwp/memory/p9_mss_thermal_init.mk
+include ${PROCEDURE_PATH}/hwp/memory/p9_mss_power_cleanup.mk
+
include ${ROOTPATH}/config.mk
+
+
+VPATH += ${PROCEDURE_PATH}/hwp/nest/ ${PROCEDURE_PATH}/hwp/memory/ \ No newline at end of file
OpenPOWER on IntegriCloud