summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/targeting/common/utilFilter.H10
-rw-r--r--src/usr/hwpf/hwp/core_activate/core_activate.C29
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C77
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H10
-rw-r--r--src/usr/targeting/common/utilFilter.C29
5 files changed, 123 insertions, 32 deletions
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index aa69a92c0..85d123780 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -119,6 +119,16 @@ void getParentAffinityTargets ( TARGETING::TargetHandleList& o_vector,
*/
const Target * getParentChip( const Target * i_pChiplet );
+/**
+ * @brief return the EX target of the specified input core chiplet
+ *
+ * @parm[in] i_pCoreChiplet, core chiplet target for retrieving the
+ * EX target
+ *
+ * @return EX target pointer or NULL if error
+ */
+const Target * getExChiplet( const Target * i_pCoreChiplet );
+
/**
* @brief Return a list of all cards in a system
diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C
index 4cbb45948..e9bdd5a0b 100644
--- a/src/usr/hwpf/hwp/core_activate/core_activate.C
+++ b/src/usr/hwpf/hwp/core_activate/core_activate.C
@@ -102,27 +102,31 @@ void* call_host_activate_master( void *io_pArgs )
const TARGETING::Target* l_masterCore = getMasterCore( );
assert( l_masterCore != NULL );
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_host_activate_master: Find master chip: " );
+
TARGETING::Target* l_cpu_target = const_cast<TARGETING::Target *>
( getParentChip( l_masterCore ) );
- // trace HUID
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "target HUID %.8X", TARGETING::get_huid(l_cpu_target));
-
- // cast OUR type of target to a FAPI type of target.
+ // Cast OUR type of target to a FAPI type of target.
const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP,
(const_cast<TARGETING::Target*> (l_cpu_target)) );
+ // Pass in Master EX target
+ const TARGETING::Target* l_masterEx = getExChiplet(l_masterCore);
+ assert(l_masterEx != NULL );
+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_host_activate_master: call proc_prep_master_winkle." );
+ "call_host_activate_master: call proc_prep_master_winkle. "
+ "Target HUID %.8X",
+ TARGETING::get_huid(l_masterEx));
+
+ // cast OUR type of target to a FAPI type of target.
+ const fapi::Target l_fapi_ex_target( TARGET_TYPE_EX_CHIPLET,
+ (const_cast<TARGETING::Target*> (l_masterEx)) );
// call the HWP with each fapi::Target
FAPI_INVOKE_HWP( l_errl,
proc_prep_master_winkle,
- l_fapi_cpu_target,
+ l_fapi_ex_target,
true );
if ( l_errl )
{
@@ -131,7 +135,7 @@ void* call_host_activate_master( void *io_pArgs )
l_errl->reasonCode() );
// capture the target data in the elog
- ErrlUserDetailsTarget(l_cpu_target).addToLog( l_errl );
+ ErrlUserDetailsTarget(l_masterEx).addToLog( l_errl );
break;
}
@@ -178,7 +182,8 @@ void* call_host_activate_master( void *io_pArgs )
"Returned from Winkle." );
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Call proc_stop_deadman_timer..." );
+ "Call proc_stop_deadman_timer. Target %.8X",
+ TARGETING::get_huid(l_cpu_target) );
// call the HWP with each fapi::Target
FAPI_INVOKE_HWP( l_errl,
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C
index 453c13493..cfa7f462f 100644
--- a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -21,7 +21,7 @@
/* */
/* IBM_PROLOG_END_TAG */
// -*- mode: C++; c-file-style: "linux"; -*-
-// $Id: proc_prep_master_winkle.C,v 1.11 2012/10/24 22:22:23 jmcgill Exp $
+// $Id: proc_prep_master_winkle.C,v 1.12 2013/07/01 18:41:34 stillgs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_prep_master_winkle.C,v $
//------------------------------------------------------------------------------
// *|
@@ -75,22 +75,32 @@ extern "C"
// Start SBE deadman timer
// *Enter winkle*
//
-// parameters: i_target => master chip target
+// parameters: i_ex_target => Reference to master chiplet target
// i_useRealSBE => True if proc_sbe_trigger_winkle is supposed to be
// running on the real SBE (default is true), else
// false if proc_sbe_trigger_winkle is running on
// the FSP (via poreve).
// returns: FAPI_RC_SUCCESS if operation was successful, else error
//------------------------------------------------------------------------------
- fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_target,
- const bool & i_useRealSBE = true)
+ fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_ex_target,
+ const bool & i_useRealSBE)
{
// data buffer to hold register values
ecmdDataBufferBase data(64);
+ ecmdDataBufferBase pmgp1(64);
// return codes
- uint32_t rc_ecmd = 0;
- fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+ fapi::ReturnCode rc;
+
+ // istep/substep umbers
+ uint32_t istep_num = 0;
+ uint8_t substep_num = 0;
+
+ // addressing variables
+ uint64_t address;
+ uint8_t l_ex_number = 0;
+ fapi::Target l_parentTarget;
// mark function entry
FAPI_INF("Entry, useRealSBE is %s\n", i_useRealSBE? "true":"false");
@@ -98,11 +108,19 @@ extern "C"
do
{
+ // Get the parent chip to target the PCBS registers
+ rc = fapiGetParentChip(i_ex_target, l_parentTarget);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetParentChip access");
+ break;
+ }
+
// Wait for SBE ready
// ie. SBE running, and istep num and substep num correct
if( i_useRealSBE )
{
- rc = fapiGetScom(i_target, PORE_SBE_CONTROL_0x000E0001, data);
+ rc = fapiGetScom(l_parentTarget, PORE_SBE_CONTROL_0x000E0001, data);
if(!rc.ok())
{
FAPI_ERR("Scom error reading SBE STATUS\n");
@@ -111,22 +129,20 @@ extern "C"
if( data.isBitSet( 0 ) )
{
FAPI_ERR("SBE isn't running when it should be\n");
- const fapi::Target & CHIP_IN_ERROR = i_target;
+ const fapi::Target & CHIP_IN_ERROR = l_parentTarget;
ecmdDataBufferBase & SBE_STATUS = data;
FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_SBE_NOT_RUNNING);
break;
}
}
- rc = fapiGetScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ rc = fapiGetScom(l_parentTarget, MBOX_SBEVITAL_0x0005001C, data);
if(!rc.ok())
{
FAPI_ERR("Scom error reading SBE VITAL\n");
break;
}
- uint32_t istep_num = 0;
- uint8_t substep_num = 0;
rc_ecmd |= data.extractToRight(&istep_num,
ISTEP_NUM_BIT_POSITION,
ISTEP_NUM_BIT_LENGTH);
@@ -145,7 +161,7 @@ extern "C"
FAPI_ERR("Expected istep num %llX but found %X\n",
PROC_SBE_TRIGGER_WINKLE_ISTEP_NUM,
istep_num );
- const fapi::Target & CHIP_IN_ERROR = i_target;
+ const fapi::Target & CHIP_IN_ERROR = l_parentTarget;
ecmdDataBufferBase & SBE_VITAL = data;
FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_BAD_ISTEP_NUM);
break;
@@ -155,13 +171,44 @@ extern "C"
FAPI_ERR("Expected substep num %X but found %X\n",
SUBSTEP_SBE_READY,
substep_num );
- const fapi::Target & CHIP_IN_ERROR = i_target;
+ const fapi::Target & CHIP_IN_ERROR = l_parentTarget;
ecmdDataBufferBase & SBE_VITAL = data;
FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_BAD_SUBSTEP_NUM);
break;
}
FAPI_INF("SBE is ready for master to enter winkle\n");
+ // Get the core number
+ rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &i_ex_target, l_ex_number);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_CHIP_UNIT_POS with rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+
+ FAPI_INF("Processing core %d on %s", l_ex_number, l_parentTarget.toEcmdString());
+
+ // Disable movement to Fast Winkle if errors are present
+ rc_ecmd |= pmgp1.flushTo0();
+ rc_ecmd |= pmgp1.setBit(20);
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+
+ address = EX_PMGP1_OR_0x100F0105 + (l_ex_number*0x01000000);
+ rc = fapiPutScom(l_parentTarget, address, pmgp1);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error updating PMGP1\n");
+ break;
+ }
+ FAPI_INF("Disabled the ability to have Deep Winkle turned to Fast Winkle if errors are present\n");
+
+
//Start the deadman timer
substep_num = SUBSTEP_DEADMAN_START;
rc_ecmd |= data.insertFromRight(&substep_num,
@@ -173,7 +220,7 @@ extern "C"
rc.setEcmdError(rc_ecmd);
break;
}
- rc = fapiPutScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ rc = fapiPutScom(l_parentTarget, MBOX_SBEVITAL_0x0005001C, data);
if(!rc.ok())
{
FAPI_ERR("Scom error updating SBE VITAL\n");
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H
index 39aeabf14..ae37dcf63 100644
--- a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: proc_prep_master_winkle.H,v 1.6 2012/10/24 22:22:43 jmcgill Exp $
+// $Id: proc_prep_master_winkle.H,v 1.7 2013/07/01 18:41:37 stillgs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_prep_master_winkle.H,v $
//------------------------------------------------------------------------------
// *|
@@ -50,7 +50,7 @@
// function pointer typedef definition for HWP call support
typedef fapi::ReturnCode (*proc_prep_master_winkle_FP_t)(const fapi::Target &,
- const bool );
+ const bool &);
//------------------------------------------------------------------------------
// Constant definitions
@@ -67,7 +67,7 @@ extern "C"
/**
* @brief Start the auto-POR engine and the SBE
*
- * @param[in] i_target Reference to master chip target
+ * @param[in] i_ex_target Reference to master chiplet target
* @param[in] i_useRealSBE True if proc_sbe_trigger_winkle is supposed to be
* running on the real SBE (default is true), else
* false if proc_sbe_trigger_winkle is running on
@@ -75,7 +75,7 @@ extern "C"
*
* @return ReturnCode
*/
- fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_target,
+ fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_ex_target,
const bool & i_useRealSBE);
} // extern "C"
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index 544ec9b90..2cc0920d5 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -238,6 +238,35 @@ const Target * getParentChip( const Target * i_pChiplet )
return l_pChip;
}
+const Target * getExChiplet( const Target * i_pCoreChiplet )
+{
+ const Target * l_pExChiplet = NULL;
+
+ // Create a Class/Type/Model predicate to look for EX chiplet of the input
+ // core (i.e. the core's parent)
+ TARGETING::PredicateCTM l_predicate(TARGETING::CLASS_UNIT);
+
+ // Create a vector of TARGETING::Target pointers
+ TARGETING::TargetHandleList l_exList;
+
+ // Get parent
+ TARGETING::targetService().getAssociated(l_exList, i_pCoreChiplet,
+ TARGETING::TargetService::PARENT,
+ TARGETING::TargetService::ALL, &l_predicate);
+
+ if (l_exList.size() == 1)
+ {
+ l_pExChiplet = l_exList[0];
+ }
+ else
+ {
+ TARG_ERR("Number of EX chiplet is not 1, but %d", l_exList.size());
+ }
+
+ return l_pExChiplet;
+}
+
+
void getPeerTargets(
TARGETING::TargetHandleList& o_peerTargetList,
const Target* i_pSrcTarget,
OpenPOWER on IntegriCloud