summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework
diff options
context:
space:
mode:
authorChris Phan <cphan@us.ibm.com>2013-11-21 20:10:12 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-15 13:37:39 -0600
commitc04465ebb93eee015d3ef1d6868a72c4726d4b3f (patch)
tree5c2f3220ce9dcf627075dce4361a941a99332891 /src/usr/diag/prdf/common/framework
parent1719a4f5d065c959020f0d7f3e2957341705b06d (diff)
downloadtalos-hostboot-c04465ebb93eee015d3ef1d6868a72c4726d4b3f.tar.gz
talos-hostboot-c04465ebb93eee015d3ef1d6868a72c4726d4b3f.zip
PRD: add clock osc callout
Change-Id: I9678f73ac5226dd7d0cd9d8817e72153feca1cae RTC: 87125 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7383 Tested-by: Jenkins Server Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8062
Diffstat (limited to 'src/usr/diag/prdf/common/framework')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/config/prdfPllDomain.C50
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/config/prdfPllDomain.H113
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfCallouts.H12
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C59
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H3
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C14
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.C120
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.H26
8 files changed, 240 insertions, 157 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C
index 2eab1698c..478720324 100755
--- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C
+++ b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* COPYRIGHT International Business Machines Corp. 2003,2014 */
/* */
/* p1 */
/* */
@@ -36,6 +36,9 @@
#include <prdfPluginDef.H>
#include <prdfGlobal.H>
#include <iipSystem.h>
+#include <UtilHash.H>
+
+using namespace TARGETING;
namespace PRDF
{
@@ -114,6 +117,8 @@ int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData,
CcAutoDeletePointerVector<ChipPtr> chip(new ChipPtr[GetSize()]());
int count = 0;
int32_t rc = SUCCESS;
+ bool calloutProcOsc = false;
+ bool calloutPciOsc = false;
// Due to clock issues some chips may be moved to non-functional during
// analysis. In this case, these chips will need to be removed from their
@@ -125,14 +130,38 @@ int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData,
for(unsigned int index = 0; index < GetSize(); ++index)
{
ExtensibleChip * l_chip = LookUp(index);
- ExtensibleChipFunction * l_query = l_chip->getExtensibleFunction("QueryPll");
- bool atAttn;
- rc = (*l_query)(l_chip,PluginDef::bindParm<bool &>(atAttn));
- if(atAttn == true)
+ bool atProcAttn = false;
+ bool atPciAttn = false;
+
+ if( CLOCK_DOMAIN_FAB == GetId() )
+ {
+ ExtensibleChipFunction * queryProc =
+ l_chip->getExtensibleFunction("QueryProcPll");
+ rc |= (*queryProc)(l_chip,PluginDef::bindParm<bool &>(atProcAttn));
+ ExtensibleChipFunction * queryPci =
+ l_chip->getExtensibleFunction("QueryPciPll");
+ rc |= (*queryPci)(l_chip,PluginDef::bindParm<bool &>(atPciAttn));
+ }
+ else
+ {
+ ExtensibleChipFunction * l_query =
+ l_chip->getExtensibleFunction("QueryPll");
+ rc |= (*l_query)(l_chip,PluginDef::bindParm<bool &>(atProcAttn));
+ }
+
+ if(atProcAttn || atPciAttn)
{
+ if( atProcAttn ) calloutProcOsc = true;
+ if( atPciAttn ) calloutPciOsc = true;
+
chip()[count] = LookUp(index);
++count;
- l_chip->CaptureErrorData(serviceData.service_data->GetCaptureData());
+ l_chip->CaptureErrorData(
+ serviceData.service_data->GetCaptureData());
+ // Capture PllFIRs group
+ l_chip->CaptureErrorData(
+ serviceData.service_data->GetCaptureData(),
+ Util::hashString("PllFIRs"));
}
else if ( !PlatServices::isFunctional(l_chip->GetChipHandle()) )
{
@@ -148,10 +177,13 @@ int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData,
}
// always suspect the clock source
- closeClockSource.Resolve(serviceData); // dg06c
- if(&closeClockSource != &farClockSource)
+ if( calloutPciOsc )
+ {
+ closeClockSource.Resolve(serviceData);
+ }
+ if( calloutProcOsc )
{
- farClockSource.Resolve(serviceData); // dg06c
+ farClockSource.Resolve(serviceData);
}
// If only one detected the error, add it to the callout list.
diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H
index 8e232604f..a17560fa2 100755
--- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H
+++ b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2006,2013 */
+/* COPYRIGHT International Business Machines Corp. 2006,2014 */
/* */
/* p1 */
/* */
@@ -47,54 +47,77 @@ class PllDomain : public RuleChipDomain, public ExtensibleDomain,
#ifdef __HOSTBOOT_MODULE
- /** @fn PllDomain
- * @brief Constructor
- * @param DOMAIN_ID - the domain ID
- * @param Resolution to callout the correct clock source
- * @param ThresholdResolution::ThresholdPolicy
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct clock source
+ * @param ThresholdResolution::ThresholdPolicy
*/
PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct second clock source
+ * @param Resolution to callout the correct clock source
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
#else // not __HOSTBOOT_MODULE
- /** @fn PllDomain
- * @brief Constructor
- * @param DOMAIN_ID - the domain ID
- * @param Resolution to callout the correct clock source
- * @param Dump content
- * @param ThresholdResolution::ThresholdPolicy
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct clock source
+ * @param Dump content
+ * @param ThresholdResolution::ThresholdPolicy
*/
PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
hwTableContent i_hwdc,
const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct second clock source
+ * @param Resolution to callout the correct clock source
+ * @param Dump content
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
#endif // not __HOSTBOOT_MODULE
/**
- Perform any initialization required by the hardware
- @returns error code
- @post PLL errors cleared in hardware.
+ * @brief Perform any initialization required by the hardware
+ * @returns error code
+ * @post PLL errors cleared in hardware.
*/
virtual int32_t Initialize(void);
/**
- Query if anything in this domain is at the attention type specified
- @param Attention type to query for. (@see iipsdbug.h)
- @returns [true|false]
- @pre Initialize()
- @post NONE
+ * @brief Query if anything in this domain is at the attention type specified
+ * @param Attention type to query for. (@see iipsdbug.h)
+ * @returns [true|false]
+ * @pre Initialize()
*/
virtual bool Query(ATTENTION_TYPE attentionType);
/**
- Analyze errors within the domain
- @param service data collector
- @param attentiont type (@see iipsdbug.h)
- @returns service data collector - completed
- @return return code
- @pre Initialize(); Query() == true
- @post domain element order may be modified.
+ * @brief Analyze errors within the domain
+ * @param service data collector
+ * @param attentiont type (@see iipsdbug.h)
+ * @returns service data collector - completed
+ * @return return code
+ * @pre Initialize(); Query() == true
+ * @post domain element order may be modified.
*/
virtual int32_t Analyze( STEP_CODE_DATA_STRUCT & serviceData,
ATTENTION_TYPE attentionType );
@@ -122,10 +145,10 @@ class PllDomain : public RuleChipDomain, public ExtensibleDomain,
protected:
/**
- Order the domain - with detecting element at the top
- @param Attention type (@see iipsdbug.h)
- @post domain elemenet order may be altered
- @note this is called by Analyze()
+ * @brief Order the domain - with detecting element at the top
+ * @param Attention type (@see iipsdbug.h)
+ * @post domain elemenet order may be altered
+ * @note this is called by Analyze()
*/
virtual void Order(ATTENTION_TYPE attentionType);
@@ -161,6 +184,19 @@ PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
i_mfgThresh ) )
{}
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(secondClockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) )
+{}
+
#else // not __HOSTBOOT_MODULE
inline
@@ -177,6 +213,21 @@ PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
iv_dumpContent(i_hwdc)
{}
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(secondClockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_dumpContent(i_hwdc)
+{}
+
#endif // not __HOSTBOOT_MODULE
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
index 00914dd1c..dc6159cd1 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2000,2013 */
+/* COPYRIGHT International Business Machines Corp. 2000,2014 */
/* */
/* p1 */
/* */
@@ -62,6 +62,14 @@ class PRDcallout
iv_type(PRDcalloutData::TYPE_TARGET)
{ iv_meldValue.target = i_target; }
+ /** @brief Constructor from TargetHandle_t
+ * with clock type info
+ */
+ PRDcallout( TARGETING::TargetHandle_t i_target,
+ PRDcalloutData::MruType i_type ) :
+ iv_type(i_type)
+ { iv_meldValue.target = i_target; }
+
/** @brief Constructor from MemoryMru */
PRDcallout( const MemoryMru & i_memmru ) :
iv_type(PRDcalloutData::TYPE_MEMMRU)
@@ -78,6 +86,8 @@ class PRDcallout
switch ( iv_type )
{
case PRDcalloutData::TYPE_TARGET:
+ case PRDcalloutData::TYPE_PROCCLK:
+ case PRDcalloutData::TYPE_PCICLK:
iv_meldValue.target = PlatServices::getTarget(i_val); break;
case PRDcalloutData::TYPE_MEMMRU:
case PRDcalloutData::TYPE_SYMFRU:
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
index de16a2b58..c86c929b8 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2001,2013 */
+/* COPYRIGHT International Business Machines Corp. 2001,2014 */
/* */
/* p1 */
/* */
@@ -43,31 +43,54 @@ int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData)
using namespace TARGETING;
uint32_t l_rc = SUCCESS;
- // Use clock routines for CLOCK_CARD types.
- // FIXME: RTC: 51628 will address clock target issue
- if ( (iv_targetType == TYPE_PROC) || (iv_targetType == TYPE_MEMBUF) )
+ // callout clock osc
+ if ( (iv_targetType == TYPE_PROC) ||
+ (iv_targetType == TYPE_PCI) ||
+ (iv_targetType == TYPE_MEMBUF) )
{
// Get clock card.
- TargetHandle_t l_ptargetClock = PlatServices::getClockId(
- iv_ptargetClock,
- iv_targetType );
+ TYPE oscType = (iv_targetType == TYPE_PCI) ?
+ TYPE_OSCPCICLK : TYPE_OSCREFCLK;
- // Find mux if no clock card available.
- if(NULL == l_ptargetClock)
- {
- l_ptargetClock = PlatServices::getClockMux(iv_ptargetClock);
- }
+ TargetHandle_t l_ptargetClock =
+ PlatServices::getClockId(iv_ptargetClock, oscType);
// Callout this chip if nothing else.
+ // FIXME - RTC: 91939
+ // will re-write this block of code when
+ // we can get osc targets from targeting again.
+ // In the mean time, we don't want to call out the
+ // chip for this.
if(NULL == l_ptargetClock)
{
- l_ptargetClock = iv_ptargetClock;
- }
+ //l_ptargetClock = iv_ptargetClock;
- //Just callout the clock source.
- //There is no clock target now so we don't want to make
- //any incorrect callout until it's implemented.
- //serviceData.service_data->SetCallout(l_ptargetClock);
+ //in hostboot, getClockId() won't work
+ //so use the chip target and clock type
+ #ifdef __HOSTBOOT_MODULE
+ serviceData.service_data->SetCallout(
+ PRDcallout(iv_ptargetClock,
+ iv_targetType == TYPE_PCI ?
+ PRDcalloutData::TYPE_PCICLK :
+ PRDcalloutData::TYPE_PROCCLK));
+ #endif
+ }
+ else
+ {
+ // callout the clock source
+ // HB does not have the osc target modeled
+ // so we need to use the proc target with
+ // osc clock type to call out
+ #ifndef __HOSTBOOT_MODULE
+ serviceData.service_data->SetCallout(l_ptargetClock);
+ #else
+ serviceData.service_data->SetCallout(
+ PRDcallout(l_ptargetClock,
+ iv_targetType == TYPE_PCI ?
+ PRDcalloutData::TYPE_PCICLK :
+ PRDcalloutData::TYPE_PROCCLK));
+ #endif
+ }
}
// Get all connected chips for non-CLOCK_CARD types.
else
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
index eb1a08c0e..35772572c 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2009,2013 */
+/* COPYRIGHT International Business Machines Corp. 2009,2014 */
/* */
/* p1 */
/* */
@@ -63,7 +63,6 @@ public:
* @param[in] i_targetType type of target connected to clock source
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
- // FIXME: The default target type needs to be set to a PROC clock card.
ClockResolution( TARGETING::TargetHandle_t i_pTargetHandle = NULL,
TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC ) :
iv_ptargetClock( i_pTargetHandle ),
diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
index 657a99b27..9a9308f86 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -623,6 +623,20 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
l_diagUpdate);
}
+ else if(PRDcalloutData::TYPE_PROCCLK == thiscallout.getType() ||
+ PRDcalloutData::TYPE_PCICLK == thiscallout.getType())
+ {
+ // FIXME - RTC: 91939
+ // Can't call out osc clock in hostboot as informational
+ // until the change from above story is in.
+ if( sdc.IsAtThreshold() )
+ {
+ PRDF_ADD_CLOCK_CALLOUT(o_errl,
+ thiscallout.getTarget(),
+ thiscallout.getType(),
+ thispriority);
+ }
+ }
else if ( PRDcalloutData::TYPE_MEMMRU == thiscallout.getType() )
{
MemoryMru memMru (thiscallout.flatten());
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
index 1b4adb88e..78b1690b5 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
@@ -38,6 +38,7 @@
#include <algorithm>
#include <fapi.H>
#include <targeting/common/targetservice.H>
+#include <targeting/common/utilFilter.H>
// Pegasus includes
#include <prdfCenAddress.H>
@@ -1284,95 +1285,66 @@ uint8_t getRanksPerDimm( TargetHandle_t i_mba, uint8_t i_ds )
//##
//##############################################################################
-// FIXME: RTC: 51628 will address clock target issue
-bool areClocksOn(TARGETING::TargetHandle_t i_pGivenTarget)
-{
- bool o_clocksOn = false;
-
- #ifdef __HOSTBOOT_MODULE
-
- o_clocksOn = true;
-
- #else
-
- if ( NULL != i_pGivenTarget )
- {
- errlHndl_t errl = NULL;
- //errl =HWSV::hwsvClockQueryOn(i_pGivenTarget,
- // HWSV::NO_MODE, o_clocksOn);
- if ( NULL != errl )
- {
- PRDF_ERR( "[areClocksOn] In areClocksOn failed" );
- PRDF_COMMIT_ERRL(errl, ERRL_ACTION_REPORT);
- }
- }
- else
- {
- PRDF_ERR( "[areClocksOn] given target is null" );
- }
-
- #endif
-
- return o_clocksOn;
-}
-
-//------------------------------------------------------------------------------
-
-// FIXME: RTC: 51628 will address clock target issue
TARGETING::TargetHandle_t getClockId(TARGETING::TargetHandle_t
i_pGivenTarget,
- TARGETING ::TYPE targetype)
+ TARGETING ::TYPE i_connType)
{
+ #define PRDF_FUNC "[PlatServices::getClockId] "
TargetHandleList l_clockCardlist;
+ TargetHandle_t l_target = i_pGivenTarget;
TargetHandle_t o_pClockCardHandle = NULL;
- return o_pClockCardHandle;
-}
-
-//------------------------------------------------------------------------------
-
-// FIXME: RTC: 51628 will address clock target issue
-TARGETING::TargetHandle_t getClockMux(TARGETING::TargetHandle_t
- i_pGivenTarget)
-{
- //Modeling info of card and Clock mux is required
- // PredicateCTM l_ClockMux(CLASS_UNIT,TYPE_CLOCK_MUX);
- //defined for compilation
- PredicateCTM l_ClockMux(CLASS_UNIT);
- TargetHandle_t o_ptargetClockMux = NULL;
- #if 0
do
{
- if(NULL != i_pGivenTarget)
+ // If membuf target, use the connected proc target
+ if(TYPE_MEMBUF == getTargetType(i_pGivenTarget))
{
- TargetHandleList l_list;
- if(TYPE_PROC==(i_pGivenTarget->getAttr<ATTR_TYPE>()))
+ l_target = getConnectedParent(i_pGivenTarget, TYPE_PROC);
+ if(NULL == l_target)
{
- targetService().getAssociated(l_list,
- i_pGivenTarget,
- TargetService::CHILD_BY_AFFINITY,
- TargetService::ALL,
- &l_ClockMux);
- }
- else
- {
- //TODO: If given target is not a proc how to query all mux units
- // which relation to be used
+ PRDF_ERR(PRDF_FUNC"failed to get proc target "
+ "connected to membuf 0x%.8X",
+ getHuid(l_target));
+ break;
}
+ }
- if (l_list.size() > 0)
- {
- // Pick out first item
- o_ptargetClockMux = l_list[0];
- }
+ PredicateIsFunctional l_funcFilter;
+ PredicateCTM l_oscFilter(CLASS_CHIP, i_connType);
+ PredicateCTM l_peerFilter(CLASS_UNIT,
+ (i_connType == TYPE_OSCREFCLK ?
+ TYPE_REFCLKENDPT: TYPE_PCICLKENDPT));
+ PredicatePostfixExpr l_funcAndOscFilter, l_funcAndPeerFilter;
+ l_funcAndOscFilter.push(&l_oscFilter).push(&l_funcFilter).And();
+ l_funcAndPeerFilter.push(&l_peerFilter).push(&l_funcFilter).And();
+
+ //PROC <---> CLKTYPE <---> PEER <---> CLKTYPE <---> OSC
+ //Get the oscillators related to this proc
+ getPeerTargets( l_clockCardlist, // List of connected OSCs
+ l_target, // to this proc
+ // filter to get to clock endpoints
+ &l_funcAndPeerFilter/*&l_peerFilter*/,
+ // filter to get the driving OSC
+ &l_funcAndOscFilter/*&l_oscFilter*/);
+
+ for(TargetHandleList::iterator l_itr = l_clockCardlist.begin();
+ l_itr != l_clockCardlist.end();
+ ++l_itr)
+ {
+ PRDF_TRAC(PRDF_FUNC"OSC 0x%.8X is connected to proc 0x%.8X",
+ getHuid(*l_itr), getHuid(l_target));
}
- else
+
+ if( 0 < l_clockCardlist.size())
{
- PRDF_ERR("[getClockMux] given target is NULL");
+ o_pClockCardHandle = l_clockCardlist[0];
}
- }while(0);
- #endif
- return o_ptargetClockMux;
+
+ } while(0);
+
+ return o_pClockCardHandle;
+
+ #undef PRDF_FUNC
}
//##############################################################################
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
index 05a8fae62..ba3bb7670 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
@@ -386,34 +386,16 @@ int32_t getDimmSpareConfig( TARGETING::TargetHandle_t i_mba, CenRank i_rank,
//##############################################################################
/**
- * @brief Queries if this chip's clocks are on.
- * @param i_pTargetHandle Handle of a chip or any logical entity.
- * @return TRUE if this chip's clocks are on, FALSE otherwise.
- * @pre None.
- * @post None.
- */
-bool areClocksOn( TARGETING::TargetHandle_t i_pTargetHandle );
-
-/**
* @brief Gets handle of the clock card for the given target.
- * @param i_pTargetHandle Handle of a functional unit.
- * @param i_targetType Type of clock source desired.
+ * @param i_pTargetHandle Handle of a functional unit.
+ * @param i_peerType Type of peer clock source
* @return Handle_t of clock source.
* @pre None.
* @post None.
*/
TARGETING::TargetHandle_t getClockId(TARGETING::TargetHandle_t
- i_pTargetHandle,TARGETING::TYPE i_targetType);
-
-/**
- * @brief Get TargetHandle_t of clock mux.
- * @param i_pFabricHandle Handle of a fabric.
- * @return Handle of clock mux.
- * @pre Fabric must be a handle of a functioning fabric.
- * @post None.
- */
-TARGETING::TargetHandle_t getClockMux(TARGETING::TargetHandle_t
- i_pFabricHandle);
+ i_pTargetHandle,
+ TARGETING::TYPE i_peerType);
//##############################################################################
//## MNFG Policy Flag Functions
OpenPOWER on IntegriCloud