Skip to content

Commit

Permalink
Istep 14.2 and 14.4 implementation
Browse files Browse the repository at this point in the history
Change-Id: I99ada7f2dc4fc3af4900c73d9c7339393cdcf1f1
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46509
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sakethan R. Kotta <sakkotta@in.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sandmantrs authored and dcrowell77 committed Sep 21, 2017
1 parent 2fc4ac0 commit dd6b90e
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 64 deletions.
20 changes: 7 additions & 13 deletions src/usr/isteps/istep14/call_mss_power_cleanup.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -38,6 +38,7 @@
#include <fapi2.H>
#include <fapi2/plat_hwp_invoker.H>
#include <p9_mss_power_cleanup.H>
#include <p9c_mss_power_cleanup.H>

using namespace ISTEP;
using namespace ISTEP_ERROR;
Expand Down Expand Up @@ -94,8 +95,6 @@ void* call_mss_power_cleanup (void *io_pArgs)
}
}

//@TODO RTC:144076 L1 HWPs for Centaur+Cumulus
#if 0
// -- Cumulus only
// Get a list of all present Centaurs
TargetHandleList l_presCentaurs;
Expand Down Expand Up @@ -144,18 +143,14 @@ void* call_mss_power_cleanup (void *io_pArgs)
l_currMBA0Huid, l_currMBA1Huid);

// Create FAPI Targets.
// @TODO RTC:155020
/*const fapi::Target l_fapiCentaurTarget(TARGET_TYPE_MEMBUF_CHIP,
(const_cast<TARGETING::Target*>(l_pCentaur)));
const fapi::Target l_fapiMba0Target(TARGET_TYPE_MBA_CHIPLET,
(const_cast<TARGETING::Target*>(l_presMbas[0])));
const fapi::Target l_fapiMba1Target(TARGET_TYPE_MBA_CHIPLET,
(const_cast<TARGETING::Target*>(l_presMbas[1])));
fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapiCentaurTarget( l_pCentaur );
fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba0Target( l_presMbas[0] );
fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba1Target( l_presMbas[1] );

// Call the HWP with each fapi::Target
FAPI_INVOKE_HWP(l_err, mss_power_cleanup, l_fapiCentaurTarget,
FAPI_INVOKE_HWP(l_err, p9c_mss_power_cleanup, l_fapiCentaurTarget,
l_fapiMba0Target, l_fapiMba1Target);
*/

if (l_err)
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
Expand All @@ -179,7 +174,6 @@ 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" );

Expand Down
97 changes: 46 additions & 51 deletions src/usr/isteps/istep14/call_mss_thermal_init.C
Expand Up @@ -37,7 +37,7 @@
#include <config.h>
#include <fapi2.H>
#include <fapi2/plat_hwp_invoker.H>
#include <p9_mss_thermal_init.H>
#include <p9c_mss_thermal_init.H>
#include <p9_throttle_sync.H>


Expand All @@ -52,67 +52,62 @@ void* call_mss_thermal_init (void *io_pArgs)
{
IStepError l_StepError;
errlHndl_t l_errl = nullptr;
//@TODO RTC:144076 L1 HWPs for Centaur+Cumulus
#if 0

// -- Cumulus only ---
// Get all Centaur targets
TARGETING::TargetHandleList l_memBufTargetList;
getAllChiplets(l_memBufTargetList, TYPE_MCBIST );

// --------------------------------------------------------------------
// run mss_thermal_init on all Centaurs
// --------------------------------------------------------------------
for (TargetHandleList::const_iterator
l_iter = l_memBufTargetList.begin();
l_iter != l_memBufTargetList.end();
++l_iter)
{
// make a local copy of the target for ease of use
TARGETING::Target* l_pCentaur = *l_iter;
// Get all Centaur targets
TARGETING::TargetHandleList l_memBufTargetList;
getAllChiplets(l_memBufTargetList, TYPE_MEMBUF );

// --------------------------------------------------------------------
// run mss_thermal_init on all Centaurs
// --------------------------------------------------------------------
for (TargetHandleList::const_iterator
l_iter = l_memBufTargetList.begin();
l_iter != l_memBufTargetList.end();
++l_iter)
{
// make a local copy of the target for ease of use
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));
// write HUID of target
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"target HUID %.8X", TARGETING::get_huid(l_pCentaur));

fapi2::Target<fapi2::TARGET_TYPE_MCBIST> l_fapi_pCentaur
(l_pCentaur);
fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> 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));
// 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));

FAPI_INVOKE_HWP( l_errl, p9_mss_thermal_init, l_fapi_pCentaur );
FAPI_INVOKE_HWP( l_errl, p9c_mss_thermal_init, l_fapi_pCentaur );

if ( l_errl )
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: mss_thermal_init HWP returns error",
l_errl->reasonCode());
if ( l_errl )
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: mss_thermal_init HWP returns error",
l_errl->reasonCode());

// capture the target data in the elog
ErrlUserDetailsTarget(l_pCentaur).addToLog( l_errl );
// capture the target data in the elog
ErrlUserDetailsTarget(l_pCentaur).addToLog( l_errl );

// Create IStep error log and cross reference
// to error that occurred
l_StepError.addErrorDetails( 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 );
// Commit Error
errlCommit( l_errl, HWPF_COMP_ID );

break;
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : mss_thermal_init HWP( )" );
}
break;
}
if (l_errl)
else
{
break;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : mss_thermal_init HWP( )" );
}
#endif
}

do
{
// Run proc throttle sync
Expand All @@ -128,8 +123,8 @@ void* call_mss_thermal_init (void *io_pArgs)
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2CpuTarget((l_procChip));

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_throttle_sync HWP on "
"target HUID %.8X", TARGETING::get_huid(l_procChip));
"Running p9_throttle_sync HWP on "
"target HUID %.8X", TARGETING::get_huid(l_procChip));

// Call p9_throttle_sync
FAPI_INVOKE_HWP( l_errl, p9_throttle_sync, l_fapi2CpuTarget );
Expand Down
12 changes: 12 additions & 0 deletions src/usr/isteps/istep14/makefile
Expand Up @@ -26,6 +26,7 @@ ROOTPATH = ../../../..
MODULE = istep14

PROCEDURE_PATH = ${ROOTPATH}/src/import/chips/p9/procedures
CEN_PROC_PATH = ${ROOTPATH}/src/import/chips/centaur/procedures

#Add all the extra include paths
EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/
Expand All @@ -41,6 +42,9 @@ EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/eff_config/
EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/
EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/mcbist/
EXTRAINCDIR += ${PROCEDURE_PATH}/hwp/memory/lib/dimm/
EXTRAINCDIR += ${CEN_PROC_PATH}/hwp/memory
EXTRAINCDIR += ${CEN_PROC_PATH}/hwp/memory/lib/shared/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/centaur/common/include/

OBJS += call_mss_memdiag.o
OBJS += call_mss_thermal_init.o
Expand Down Expand Up @@ -68,6 +72,11 @@ OBJS += p9_setup_bars.o
OBJS += p9_fbc_utils.o
OBJS += p9_fbc_smp_utils.o
OBJS += p9_mpipl_chip_cleanup.o
OBJS += p9c_mss_thermal_init.o
OBJS += p9c_mss_unmask_errors.o
OBJS += p9c_mss_power_cleanup.o
OBJS += p9c_cen_stopclocks.o
OBJS += p9c_mss_maint_cmds.o

#include ${PROCEDURE_PATH}/hwp/nest/p9_htm_setup.mk
#include ${PROCEDURE_PATH}/hwp/nest/p9_pcie_config.mk
Expand All @@ -76,6 +85,8 @@ OBJS += p9_mpipl_chip_cleanup.o

# include ${PROCEDURE_PATH}/hwp/memory/p9_mss_memdiag.mk
# include ${PROCEDURE_PATH}/hwp/memory/p9_mss_thermal_init.mk
# include ${CEN_PROC_PATH}/hwp/memory/p9c_mss_thermal_init.mk
# include ${CEN_PROC_PATH}/hwp/memory/p9c_mss_unmask_errors.mk
include ${PROCEDURE_PATH}/hwp/nest/p9_throttle_sync.mk
include ${PROCEDURE_PATH}/hwp/memory/p9_mss_power_cleanup.mk
include ${ROOTPATH}/config.mk
Expand All @@ -85,3 +96,4 @@ VPATH += ${PROCEDURE_PATH}/hwp/memory/lib/eff_config/
VPATH += ${PROCEDURE_PATH}/hwp/memory/lib/utils/
VPATH += ${PROCEDURE_PATH}/hwp/memory/lib/mcbist/
VPATH += ${PROCEDURE_PATH}/hwp/memory/lib/dimm/
VPATH += ${CEN_PROC_PATH}/hwp/memory/

0 comments on commit dd6b90e

Please sign in to comment.