Skip to content

Commit

Permalink
MDIA: ensure full MBA target support for P9
Browse files Browse the repository at this point in the history
Change-Id: I16fa359948c03725dae6ef70b4964dcb8b5edb16
RTC: 187474
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55653
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>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
  • Loading branch information
cnpalmer authored and zane131 committed Mar 14, 2018
1 parent 5353bb4 commit 8f68014
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 74 deletions.
37 changes: 18 additions & 19 deletions src/usr/diag/mdia/mdiafwd.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -97,11 +97,10 @@ enum
MCBIST_FIR_ACT1 = 0x07012307,

// mcs unit regs
MCI_FIR = 0x02011840,
MCI_FIR_MASK = 0x02011843,
MCI_FIR_ACT0 = 0x02011846,
MCI_FIR_ACT1 = 0x02011847,
MCS_MODE4 = 0x0201181A,
CHI_FIR = 0x07010900,
CHI_FIR_MASK = 0x07010903,
CHI_FIR_ACT0 = 0x07010906,
CHI_FIR_ACT1 = 0x07010907,

// proc regs
IPOLL_MASK = 0x000F0033,
Expand Down Expand Up @@ -168,22 +167,22 @@ typedef std::vector<uint64_t> MonitorIDs;
* @brief getDiagnosticMode get the mode (scrub, init, one, four, nine)
*
* @param[in] i_globals policy flags needed to determine the mode
* @param[in] i_target the mba target for which the mode is determined
* @param[out] o_mode the mode for the target mba
* @param[in] i_target the mba/mcbist target for which the mode is determined
* @param[out] o_mode the mode for the target mba/mcbist
*
* @retval 0 no error
* @retval !0 unexpected error occurred
*/
errlHndl_t getDiagnosticMode(
const Globals & i_globals,
TARGETING::TargetHandle_t i_mba,
TARGETING::TargetHandle_t i_trgt,
DiagMode & o_mode);

/**
* @brief getWorkFlow get the workflow for an mba target
* @brief getWorkFlow get the workflow for an mba/mcbist target
*
* @param[in] i_mode the diagnostic mode for the target
* @param[out] o_wf the workflow for the mba target
* @param[out] o_wf the workflow for the mba/mcbist target
* @param[in] i_globals policy flags needed to determine MNFG status
*
* @retval 0 no error
Expand All @@ -202,23 +201,23 @@ errlHndl_t getWorkFlow(
void doStepCleanup(const Globals & i_globals);

/**
* @brief check if hw state has been changed for an mba's
* associated targets
* @brief check if hw state has been changed for an mba
* or mcbist's associated targets
*
* @param[in] i_mba input mba target
* @param[in] i_trgt input mba/mcbist target
*
* @retval true if hw state has been changed or else
*/
bool isHWStateChanged(TARGETING::TargetHandle_t i_mba);
bool isHWStateChanged(TARGETING::TargetHandle_t i_trgt);

/**
* @brief clear hw changed state for an mba's
* associated targets
* @brief clear hw changed state for an mba
* or mcbist's associated targets
*
* @param[in] i_mba input mba target
* @param[in] i_trgt input mba/mcbist target
*
*/
void clearHWStateChanged(TARGETING::TargetHandle_t i_mba);
void clearHWStateChanged(TARGETING::TargetHandle_t i_trgt);

}
#endif
31 changes: 20 additions & 11 deletions src/usr/diag/mdia/mdiamba.C
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ errlHndl_t getWorkFlow(
}

/*
* Local helper function to return a list of Centaur
* DIMMs, and MCS associated with the input MBA target
* Local helper function to return a list of DIMMs, MCS, and
* MCA/Centaur associated with the input MBA/MCBIST target
*
* If i_queryOnly = true (Query)
* - Return a list of DIMMs, Centaur, and
* MCS connected to this MBA
* If i_queryOnly = true (Query) or MCBIST case
* - Return a list of DIMMs, Centaur/MCA, and
* MCS connected to this MBA/MCBIST
*
* Else (Clear)
* Else (Clear) - Centaur case only
* - Return a list of DIMMs and
* (Centaur + MCS) if all the DIMMs behind this
* Centaur have hwchangedState flags cleared
Expand Down Expand Up @@ -265,18 +265,21 @@ TargetHandleList getMemTargetsForQueryOrClear(
// add associated MCBIST
o_list.push_back( i_trgt );

// add associated MCSs
TargetHandleList mcsList;
getChildAffinityTargets( mcsList, i_trgt, CLASS_UNIT, TYPE_MCS );
if ( !mcsList.empty() )
o_list.insert( o_list.end(), mcsList.begin(), mcsList.end() );

// add associated MCAs
TargetHandleList mcaList;
getChildAffinityTargets(mcaList, i_trgt, CLASS_UNIT, TYPE_MCA);

getChildAffinityTargets( mcaList, i_trgt, CLASS_UNIT, TYPE_MCA );
if ( !mcaList.empty() )
{
o_list.insert( o_list.end(), mcaList.begin(), mcaList.end() );
}

}
// MBA target
else
else if ( TYPE_MBA == trgtType )
{
// add associated Centaur
TargetHandleList targetList;
Expand Down Expand Up @@ -372,6 +375,12 @@ TargetHandleList getMemTargetsForQueryOrClear(
}

}
else
{
assert( false, "getMemTargetsForQueryOrClear: Invalid target "
"type from i_trgt: %x", get_huid(i_trgt) );
break;
}

} while(0);

Expand Down

0 comments on commit 8f68014

Please sign in to comment.