Skip to content

Commit

Permalink
PRD: Lane repair OMI bus callout changes
Browse files Browse the repository at this point in the history
Change-Id: I6c282e0d3db63df2bb9badbf717f75aff16e6c4e
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83666
Reviewed-by: Benjamen G Tyner <ben.tyner@ibm.com>
Reviewed-by: Paul Greenwood <paul.greenwood@ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84008
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>
  • Loading branch information
cnpalmer authored and zane131 committed Sep 20, 2019
1 parent d9057b4 commit d0f0ff1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
35 changes: 22 additions & 13 deletions src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C
Expand Up @@ -75,6 +75,16 @@ TargetHandle_t getTxBusEndPt( TargetHandle_t i_rxTrgt)
// grab connected DMI parent
o_txTrgt = getConnectedParent( i_rxTrgt, TYPE_DMI );
}
else if ( TYPE_OMI == busType )
{
// Get connected child OCMB (one OCMB per OMI)
o_txTrgt = getConnectedChild( i_rxTrgt, TYPE_OCMB_CHIP, 0 );
}
else if ( TYPE_OCMB_CHIP == busType )
{
// Get connected parent OMI
o_txTrgt = getConnectedParent( i_rxTrgt, TYPE_OMI );
}

PRDF_ASSERT(nullptr != o_txTrgt);
return o_txTrgt;
Expand Down Expand Up @@ -892,7 +902,7 @@ PRDF_PLUGIN_DEFINE_NS( cumulus_proc, LaneRepair, captureSmpObus3 );
PRDF_PLUGIN_DEFINE_NS( nimbus_proc, LaneRepair, captureSmpObus3 );
PRDF_PLUGIN_DEFINE_NS( axone_proc, LaneRepair, captureSmpObus3 );

int32_t calloutBusInterface( ExtensibleChip * i_chip,
int32_t calloutBusInterface( TargetHandle_t i_rxTrgt,
STEP_CODE_DATA_STRUCT & i_sc,
PRDpriority i_priority )
{
Expand All @@ -902,30 +912,29 @@ int32_t calloutBusInterface( ExtensibleChip * i_chip,

do {
// Get both endpoints
TargetHandle_t rxTrgt = i_chip->getTrgt();
TYPE rxType = getTargetType(rxTrgt);
TYPE rxType = getTargetType(i_rxTrgt);

if ( rxType == TYPE_OBUS && !obusInSmpMode( rxTrgt ) )
if ( rxType == TYPE_OBUS && !obusInSmpMode( i_rxTrgt ) )
{
// There is no support in hostboot for calling out the other end of
// an NV or openCAPI bus. By design, any FIR bits associated with
// those bus types should not be taking a CalloutBusInterface
// action. So if we hit this case, just make a default callout.

PRDF_ERR( PRDF_FUNC "Lane repair only supported in SMP mode "
"obus: 0x%08x", getHuid(rxTrgt) );
"obus: 0x%08x", getHuid(i_rxTrgt) );

i_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_MED, NO_GARD );
i_sc.service_data->SetCallout( SP_CODE, MRU_MED, NO_GARD );
i_sc.service_data->setServiceCall();
break;
}

TargetHandle_t txTrgt = getTxBusEndPt(rxTrgt);
TargetHandle_t txTrgt = getTxBusEndPt(i_rxTrgt);
TYPE txType = getTargetType(txTrgt);

// Add the endpoint target callouts
i_sc.service_data->SetCallout( rxTrgt, MRU_MEDA );
i_sc.service_data->SetCallout( i_rxTrgt, MRU_MEDA );
i_sc.service_data->SetCallout( txTrgt, MRU_MEDA);

// Get the HWAS bus type.
Expand Down Expand Up @@ -963,7 +972,7 @@ int32_t calloutBusInterface( ExtensibleChip * i_chip,
}

// Callout this bus interface.
PRDF_ADD_BUS_CALLOUT( errl, rxTrgt, txTrgt, hwasType, i_priority );
PRDF_ADD_BUS_CALLOUT( errl, i_rxTrgt, txTrgt, hwasType, i_priority );

} while(0);

Expand Down Expand Up @@ -1042,7 +1051,7 @@ PRDF_PLUGIN_DEFINE_NS( centaur_membuf, LaneRepair, tooManyBusErrors );
int32_t calloutBusInterfacePlugin( ExtensibleChip * i_chip,
STEP_CODE_DATA_STRUCT & io_sc )
{
calloutBusInterface(i_chip, io_sc, MRU_LOW);
calloutBusInterface(i_chip->getTrgt(), io_sc, MRU_LOW);
return SUCCESS;
}
PRDF_PLUGIN_DEFINE_NS( nimbus_xbus, LaneRepair, calloutBusInterfacePlugin );
Expand All @@ -1064,12 +1073,12 @@ int32_t omiParentCalloutBusInterfacePlugin( ExtensibleChip * i_chip,
STEP_CODE_DATA_STRUCT & io_sc,
uint8_t i_pos )
{
ExtensibleChip * omi = getConnectedChild( i_chip, TYPE_OMI, i_pos );
ExtensibleChip * ocmb = getConnectedChild( omi, TYPE_OCMB_CHIP, 0 );
TargetHandle_t omi = getConnectedChild(i_chip->getTrgt(), TYPE_OMI, i_pos);
TargetHandle_t ocmb = getConnectedChild( omi, TYPE_OCMB_CHIP, 0 );

// Callout both ends of the bus as well (OMI and OCMB)
io_sc.service_data->SetCallout( omi->getTrgt(), MRU_MEDA );
io_sc.service_data->SetCallout( ocmb->getTrgt(), MRU_MEDA );
io_sc.service_data->SetCallout( omi, MRU_MEDA );
io_sc.service_data->SetCallout( ocmb, MRU_MEDA );

calloutBusInterface(omi, io_sc, MRU_LOW);
return SUCCESS;
Expand Down
8 changes: 4 additions & 4 deletions src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017 */
/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -56,12 +56,12 @@ int32_t handleLaneRepairEvent (ExtensibleChip * i_chip,
/**
* @brief Will add target bus interface endpoints and all parts in between the
* endpoints to the global error log in RasServices.
* @param i_chip RX-side chip of bus interface
* @param i_sc The step code data struct.
* @param i_rxTrgt RX-side target of bus interface
* @param i_sc The step code data struct.
* @param i_priority Callout priority (default MRU_LOW).
* @return Non-SUCCESS if an internal function fails. SUCCESS otherwise.
*/
int32_t calloutBusInterface( ExtensibleChip * i_chip,
int32_t calloutBusInterface( TARGETING::TargetHandle_t i_rxTrgt,
STEP_CODE_DATA_STRUCT & i_sc,
PRDpriority i_priority = MRU_LOW );

Expand Down

0 comments on commit d0f0ff1

Please sign in to comment.