diff options
| author | Zane Shelley <zshelle@us.ibm.com> | 2016-03-04 15:42:45 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-03-22 00:18:15 -0400 |
| commit | cbc275abb4f8a43edbbb9f7425e45f9ea7815263 (patch) | |
| tree | d9369a3628d588cd04237d33ea2fbf983a881941 /src/usr/diag/prdf/common/framework/config | |
| parent | 265ac2d6c7eee92deb434808c72af19b9ff4c9d5 (diff) | |
| download | talos-hostboot-cbc275abb4f8a43edbbb9f7425e45f9ea7815263.tar.gz talos-hostboot-cbc275abb4f8a43edbbb9f7425e45f9ea7815263.zip | |
PRD: Moved P8 Domain files to plat/pegasus/
Change-Id: I21c01ef76e25ba3580e44703fa691160f7be10a2
RTC: 140081
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21863
Tested-by: Jenkins Server
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22140
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/usr/diag/prdf/common/framework/config')
10 files changed, 0 insertions, 2266 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/prdfExDomain.H b/src/usr/diag/prdf/common/framework/config/prdfExDomain.H deleted file mode 100644 index 0116c0396..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfExDomain.H +++ /dev/null @@ -1,60 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfExDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef __PRDFEXDOMAIN_H -#define __PRDFEXDOMAIN_H - -#include <prdfRuleChipDomain.H> - -namespace PRDF -{ - -class ExDomain : public RuleChipDomain -{ - public: - - /** - * @brief Constructor - * @param i_did The domain ID - * @param i_size The projected size of the domain - */ - ExDomain( DOMAIN_ID i_did, uint32_t i_size = EX_DOMAIN_SIZE ) : - RuleChipDomain( i_did, i_size ) - {} - - /** - * @brief Query for an attention of a specific type in this domain - * @param i_attnType [MACHINE_CHECK | RECOVERABLE | SPECIAL] - * @return false - * @note This function will always return false. That way PRD will look - * for the attention via the processor chip. - */ - virtual bool Query( ATTENTION_TYPE i_attnType ) - { return false; } - -}; - -} // end namespace PRDF - -#endif /* __PRDFEXDOMAIN_H */ - diff --git a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C b/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C deleted file mode 100755 index f91ce88bf..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C +++ /dev/null @@ -1,536 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -// Module Description ************************************************** -// -// Description: -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define prdfFabricDomain_C - -#include <prdfGlobal.H> -#include <iipstep.h> -#include <iipsdbug.h> -#include <iipErrorRegister.h> -#include <iipServiceDataCollector.h> -#include <prdfFabricDomain.H> -#include <UtilHash.H> -#include <prdfPluginDef.H> - -#include <prdfPlatServices.H> - -#include <algorithm> - -#undef prdfFabricDomain_C - -using namespace TARGETING; - -namespace PRDF -{ - -using namespace PlatServices; - -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Global Variables -//---------------------------------------------------------------------- - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- -int32_t FabricDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData, - ATTENTION_TYPE attentionType) -{ - int32_t l_rc; - l_rc = DomainContainer<RuleChip>::Analyze(serviceData, attentionType); - - - if( l_rc == PRD_POWER_FAULT ) - { - PRDF_ERR( "PrdfFabricDomain::Analyze::Power Fault detected!" ); - } - else - { - // Capture Global FIRs on xstp and recovered errors for domain. - if ((attentionType == MACHINE_CHECK) || (attentionType == RECOVERABLE)) - { - for (uint32_t i = 1; i < GetSize(); ++i) // start at 1 to skip analyzed. - { - LookUp(i)->CaptureErrorData( - serviceData.service_data->GetCaptureData(), - Util::hashString("GlobalFIRs")); - - if (attentionType == MACHINE_CHECK) - { - LookUp(i)->CaptureErrorData( - serviceData.service_data->GetCaptureData(), - Util::hashString("AllFIRs")); - } - } - } - } - - return l_rc; -} - -void FabricDomain::Order(ATTENTION_TYPE attentionType) -{ - - if (attentionType == MACHINE_CHECK) - { - SortForXstop(); - - } - else if (attentionType == RECOVERABLE) - { - SortForRecov(); - } - else // Recovered or Special - { - SYSTEM_DEBUG_CLASS sysdbug; - for (int32_t i = (GetSize() - 1); i >= 0; --i) - { - RuleChip * l_fabChip = LookUp(i); - TARGETING::TargetHandle_t l_pchipHandle = - l_fabChip->GetChipHandle(); - bool l_analysisPending = - sysdbug.isActiveAttentionPending(l_pchipHandle, attentionType ); - if ( l_analysisPending ) - { - MoveToFront(i); - break; - } - } - } -} - -// Determine the proper sorting for a checkstop based on: -// 1. Find only a single chip with an internal checkstop -// 2. Graph reduction algorithm -// 3. WOF/TOD counters -void FabricDomain::SortForXstop() -{ - using namespace PluginDef; - using namespace TARGETING; - - uint32_t l_internalOnlyCount = 0; - int l_chip = 0; - - uint64_t l_externalDrivers[GetSize()]; - uint64_t l_wofValues[GetSize()]; - bool l_internalCS[GetSize()]; - - memset( &l_externalDrivers[0], 0x00, sizeof(l_externalDrivers) ); - memset( &l_wofValues[0], 0x00, sizeof(l_wofValues) ); - memset( &l_internalCS[0], 0x00, sizeof(l_internalCS) ); - - union { uint64_t * u; CPU_WORD * c; } ptr; // zs01 - SYSTEM_DEBUG_CLASS sysDebug; - TargetHandle_t node = NULL; - - if( false == isSmpCoherent() ) - { - // Before node stitching, any system CS is only limited - // to a node. ATTN will only pass us proc chips belonging - // to a single node. In this scenario, we should only consider - // chips belonging to one node. - TargetHandle_t proc = sysDebug.getTargetWithAttn( TYPE_PROC, - MACHINE_CHECK); - node = getConnectedParent( proc, TYPE_NODE); - if( NULL == node ) - { - // We should never reach here. Even if we reach here, as this is - // XSTOP, we would like to go ahead with analysis to have as much - // data as possible. So just print a trace. - PRDF_ERR("[FabricDomain::SortForXstop] Node is Null"); - } - } - // Get internal setting and external driver list for each chip. - for(uint32_t i = 0; i < GetSize(); ++i) - { - l_externalDrivers[i] = 0; - l_wofValues[i] = 0; - - RuleChip * l_fabChip = LookUp(i); - - // if it is a node check stop, limit the scope of sorting only to the - // node which is causing ATTN to invoke PRD. - if ( ( NULL != node ) && ( node != getConnectedParent( - l_fabChip->GetChipHandle(), TYPE_NODE) )) - continue; - - ptr.u = &l_externalDrivers[i]; // zs01 - BitString l_externalChips(GetSize(), ptr.c); // zs01 - TargetHandleList l_tmpList; - - // Call "GetCheckstopInfo" plugin. - ExtensibleChipFunction * l_extFunc - = l_fabChip->getExtensibleFunction("GetCheckstopInfo"); - - (*l_extFunc)(l_fabChip, - bindParm<bool &, TargetHandleList &, uint64_t &> - (l_internalCS[i], - l_tmpList, - l_wofValues[i] - ) - ); - - - // Update bit buffer. - for (TargetHandleList::iterator j = l_tmpList.begin(); - j != l_tmpList.end(); ++j) - { - for (uint32_t k = 0; k < GetSize(); k++) - if ((*j) == LookUp(k)->GetChipHandle()) - l_externalChips.Set(k); - }; - - // Check if is internal. - if (l_internalCS[i]) - { - l_internalOnlyCount++; - l_chip = i; - } - } - - // Check if we are done... only one with an internal error. - if (1 == l_internalOnlyCount) - { - MoveToFront(l_chip); //pw03 - return; - } - else if (0 == l_internalOnlyCount) - { - PRDF_TRAC("[FabricDomain::SortForXstop] continue " - "with analysis to determine which chip " - "sourced the error."); - } - - // --- Do graph reduction --- - // Currently does not do cycle elimination. - - // Get initial list (all chips). - BIT_STRING_BUFFER_CLASS l_current(GetSize()); - l_current.Pattern(0,GetSize(),0xFFFFFFFF, 32); // turn on all bits. - - // Do reduction. - // When done, l_prev will have the minimal list. - BIT_STRING_BUFFER_CLASS l_prev(GetSize()); - l_prev.Clear(); - - while ((!(l_current == l_prev)) && (!l_current.IsZero())) - { - l_prev = l_current; - l_current.Clear(); - - for (uint32_t i = 0; i < GetSize(); i++) - { - if (l_prev.IsSet(i)) // skip if this chip isn't in the pool. - for (uint32_t j = 0; j < GetSize(); j++) - { - ptr.u = &l_externalDrivers[i]; // zs01 - if ( BitString(GetSize(), ptr.c).IsSet(j) ) // zs01 - l_current.Set(j); - } - } - } - - // Hopefully, we got just one chip left... - if (1 == l_prev.GetSetCount()) - { - // Now find it. - for (uint32_t i = 0; i < GetSize(); i++) - if ((l_prev.IsSet(i)) && - (l_internalCS[i] || (0 == l_internalOnlyCount))) - { - MoveToFront(i); //pw03 - return; - } - } - - // --- Do WOF compare --- - uint32_t l_minWof = 0; - for (uint32_t i = 0; i < GetSize(); i++) - { - // Search for minimum WOF value. - if (l_wofValues[i] < l_wofValues[l_minWof]) - // Only choose chips with internal checkstop, - // unless no internals. - if ((l_internalCS[i] || (0 == l_internalOnlyCount))) - l_minWof = i; - } - MoveToFront(l_minWof); //pw03 - return; - -}; - -namespace __prdfFabricDomain // pw03 --- -{ - // This function is used for the std::max_element function in SortForRecov - // to ensure that elements towards the end of the list are favored (and - // therefore preventing starvation of chips at the end of the domain list) - inline bool lessThanOperator(uint32_t & l, uint32_t & r) - { - if (l == r) - { - return ((void *)&l) < ((void *)&r); - } - return l < r; - } -}; // --- pw03 - -void FabricDomain::SortForRecov() -{ - using namespace PluginDef; - - SYSTEM_DEBUG_CLASS sysdbug; - uint32_t l_sev[GetSize()]; - std::fill(&l_sev[0], &l_sev[GetSize()], 0); - - // Loop through all chips. - for ( uint32_t i = 0; i < GetSize(); ++i ) - { - RuleChip * l_fabChip = LookUp(i); - TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle(); - - //check if chip has an attention which has not been analyzed as yet - if( sysdbug.isActiveAttentionPending( l_pchipHandle, RECOVERABLE ) ) - { - // Find severity level. - ExtensibleChipFunction * l_extFunc - = l_fabChip->getExtensibleFunction( - "CheckForRecoveredSev"); - - (*l_extFunc)(l_fabChip, bindParm<uint32_t &>( l_sev[i] )); - } - - } - - // Find item with highest severity. - MoveToFront(std::distance(&l_sev[0], - std::max_element(&l_sev[0], - &l_sev[GetSize()], - __prdfFabricDomain::lessThanOperator)) - ); -} - - -//Analyze a subset of chips in a Domain... -//This is a mini analysis of some of the chips in the Fabric Domain. -int32_t FabricDomain::AnalyzeTheseChips(STEP_CODE_DATA_STRUCT & serviceData, - ATTENTION_TYPE attentionType, - TARGETING::TargetHandleList & i_chips) -{ - using namespace TARGETING ; - PRDF_DENTER( "FabricDomain::AnalyzeTheseChips" ); - int32_t l_rc = ~SUCCESS; - - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips:: Domain ID = 0x%X", GetId() ); - - if(i_chips.size() != 0) - { - - for (TargetHandleList::iterator i = i_chips.begin(); i != i_chips.end(); ++i) - { - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips::Before--chip=0x%X", - PlatServices::getHuid(*i)); - } - - OrderTheseChips(attentionType, i_chips); - - for (TargetHandleList::iterator i = i_chips.begin(); i != i_chips.end(); ++i) - { - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips::After--chip=0x%X", - PlatServices::getHuid(*i) ); - } - //After the Order function is called the first chip should contain the chip to look at. - //Look here for the correct LookUp function. I don't think this is working. - RuleChip * l_fabChip = FindChipInTheseChips(i_chips[0], i_chips); - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips::Analyzing this one: 0x%X", - l_fabChip->GetId() ); - if(NULL != l_fabChip) - { - l_rc = l_fabChip->Analyze(serviceData, attentionType); - } - else - { - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips::l_fabChip is NULL" ); - l_rc = ~SUCCESS; - } - } - else - { - PRDF_DTRAC( "FabricDomain::AnalyzeTheseChips::i_chips = %d", - i_chips.size() ); - } - - //Get P7 chip Global FIR data for FFDC - for (TargetHandleList::iterator i = i_chips.begin(); i != i_chips.end(); ++i) - { - RuleChip * l_fabChip = FindChipInTheseChips(*i, i_chips); - l_fabChip->CaptureErrorData( - serviceData.service_data->GetCaptureData(), - Util::hashString("GlobalFIRs")); - } - - - PRDF_DEXIT( "FabricDomain::AnalyzeTheseChips" ); - return l_rc; -} - - -int32_t FabricDomain::OrderTheseChips(ATTENTION_TYPE attentionType, - TARGETING::TargetHandleList & i_chips) -{ - using namespace PluginDef; - using namespace TARGETING; - PRDF_DENTER( "FabricDomain::OrderTheseChips" ); - - uint32_t l_internalOnlyCount = 0; - uint64_t l_externalDrivers[i_chips.size()]; - uint64_t l_wofValues[i_chips.size()]; - bool l_internalCS[i_chips.size()]; - - union { uint64_t * u; CPU_WORD * c; } ptr; - - uint32_t l_chip = 0; - uint32_t l_chipToFront = 0; - // Get internal setting and external driver list for each chip. - for (TargetHandleList::iterator i = i_chips.begin(); i != i_chips.end(); ++i) - { - - RuleChip * l_fabChip = FindChipInTheseChips(*i, i_chips); - - ptr.u = &l_externalDrivers[l_chip]; - BitString l_externalChips(i_chips.size(), ptr.c); - TargetHandleList l_tmpList; - - if(l_fabChip != NULL) - { - // Call "GetCheckstopInfo" plugin. - ExtensibleChipFunction * l_extFunc - = l_fabChip->getExtensibleFunction("GetCheckstopInfo"); - - (*l_extFunc)(l_fabChip, - bindParm<bool &, TargetHandleList &, uint64_t &> - (l_internalCS[l_chip], - l_tmpList, - l_wofValues[l_chip] - ) - ); - } - else - { - l_internalCS[l_chip] = false; - PRDF_DTRAC( "FabricDomain::OrderTheseChips: l_fabChip is NULL" ); - } - - //If we are just checking for internal errors then there is no need for - //a list of what chips sent checkstops where. - // Update bit buffer. - for (TargetHandleList::iterator j = l_tmpList.begin(); - j != l_tmpList.end(); - ++j) - { - for (uint32_t k = 0; k < i_chips.size(); k++) - if ((*j) == LookUp(k)->GetChipHandle()) - l_externalChips.Set(k); - }; - - // Check if is internal. - if (l_internalCS[l_chip]) - { - l_internalOnlyCount++; - l_chipToFront = l_chip; - } - l_chip++; //Move to next chip in the list. - } - - // Check if we are done... only one with an internal error. - if (1 == l_internalOnlyCount) - { - MoveToFrontInTheseChips(l_chipToFront, i_chips); - return(SUCCESS); - } - - PRDF_DEXIT( "FabricDomain::OrderTheseChips" ); - return(SUCCESS); -} - -//This function is to ensure the order of the chip in the list is the correct chip. -//Because there is no garaunteed order within the domain container this is necessary. -RuleChip * FabricDomain::FindChipInTheseChips(TARGETING::TargetHandle_t i_pchipHandle, TARGETING::TargetHandleList & i_chips) -{ - using namespace TARGETING; - - PRDF_DENTER( "FabricDomain::FindChipNumber" ); - RuleChip * l_fabChip = NULL; - TargetHandle_t l_tmpfabHandle= NULL; - // Loop through all chips. - for (TargetHandleList::iterator iter = i_chips.begin(); iter != i_chips.end(); ++iter) - { - for (uint32_t i = 0; i < GetSize(); ++i) - { - l_fabChip = LookUp(i); - l_tmpfabHandle = l_fabChip->GetChipHandle(); - if( (l_tmpfabHandle == (*iter)) && (l_tmpfabHandle == i_pchipHandle) ) return(l_fabChip); - } - } - - PRDF_DEXIT( "FabricDomain::FindChipNumber" ); - return(NULL); -} - -//Swaps chip at location 0 with a chip at location i_chipToFront -void FabricDomain::MoveToFrontInTheseChips(uint32_t i_chipToFront, TARGETING::TargetHandleList & i_chips) -{ - using namespace TARGETING; - - for (TargetHandleList::iterator i = i_chips.begin()+i_chipToFront; i != i_chips.begin(); i--) - { - std::swap((*i), (*(i-1))); - } -} - -} //End namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.H b/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.H deleted file mode 100755 index efc8ed749..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.H +++ /dev/null @@ -1,169 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfFabricDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2002,2014 */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef prdfFabricDomain_H -#define prdfFabricDomain_H - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipCallResolutionTemplate_h) - #include <iipCallResolutionTemplate.h> -#endif - -#include <prdfRuleChipDomain.H> -#include <prdfPlatServices.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -/** - @file prdfFabricDomain.H - @brief Fabric Domain, contains Fabric Chips - @author Mike Kobler -*/ - -namespace PRDF -{ - -class FabricDomain : public RuleChipDomain -{ - public: - - /** - * @brief Constructor - * @param i_did The domain ID - * @param i_size The projected size of the domain - */ - FabricDomain( DOMAIN_ID i_did, uint32_t i_size = PROC_DOMAIN_SIZE ) : - RuleChipDomain( i_did, i_size ) - {} - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default sufficient - </ul><br> - */ - //~FabricDomain(); - - /* - Determin which chip to Analyze and call it's Analyze() function - <ul> - <br><b>Parameter: </b> serviceData (See iipServiceDataCollector.h) - <br><b>Parameter: </b> attentionType [MACHINE_CHECK|RECOVERED|SPECIAL] - <br><b>Returns: </b> return code (0 == SUCCESS) - <br><b>Requirements:</b> Query() == true, Initialize() - <br><b>Promises: </b> serviceData complete - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> This implementation calls Order() to determin - which chip to analyze and calls that chips - Analyze() function. - </ul><br> - */ - virtual int32_t Analyze( STEP_CODE_DATA_STRUCT & serviceData, - ATTENTION_TYPE attentionType ); - - /** - * @brief Determine which chip to Analyze in a list of chips in this domain. - * @note This main only analyze one chip in the domain. Not the whole domain. - * @param serviceData Service data collector. - * @param attentionType Attention of the chip. - * @param i_chips List of chips in the domain to analyze. - * @return SUCCESS - */ - virtual int32_t AnalyzeTheseChips( STEP_CODE_DATA_STRUCT & serviceData, - ATTENTION_TYPE attentionType, - TARGETING::TargetHandleList & i_chips ); - /** - * @brief Order chips in a list of chips in this domain. - * @note - * @param attentionType Attention of the chip. - * @param i_chips List of chips in the domain to analyze. - * @return SUCCESS - */ - virtual int32_t OrderTheseChips( ATTENTION_TYPE attentionType, - TARGETING::TargetHandleList & i_chips ); - - /** - * @brief Finds the pointer to the appropriate chip to do analysis or other. - * @note Just a function to help keep order in a subset of the domain. - * @param i_chipId Handle of the chip to find. - * @param i_chips List of chips in the domain to analyze. - * @return SUCCESS - */ - virtual RuleChip * FindChipInTheseChips( TARGETING::TargetHandle_t i_chipId, - TARGETING::TargetHandleList & i_chips ); - - /** - * @brief Moves the chip in question to the front of the list of chips. - * @note This gives analysis some good chance of finding the correct chip first. - * @param i_chipToFront The chip that should be in the front of the list. - * @param i_chips List of chips in the domain to analyze. - * @return SUCCESS - */ - virtual void MoveToFrontInTheseChips( uint32_t i_chipToFront, - TARGETING::TargetHandleList & i_chips ); - -protected: - - /** - Determin which chip to Analyze and call it's Analyze() function - <ul> - <br><b>Parameter: </b> attentionType [MACHINE_CHECK|RECOVERED|SPECIAL] - <br><b>Returns: </b> return code (0 == SUCCESS) - <br><b>Requirements:</b> Query() == true, Initialize() - <br><b>Promises: </b> chip at attention at top of list - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> - </ul><br> - */ - virtual void Order(ATTENTION_TYPE attentionType); - - /** - Determine which chip to Analyze on checkstop and put at front of list. - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> None. - <br><b>Requirements:</b> Query() == true, Initialize() - <br><b>Promises: </b> chip at attention at top of list - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> - </ul><br> - */ - virtual void SortForXstop(); - virtual void SortForRecov(); - -private: // functions -private: // Data - -}; - -} // end namespace PRDF - -#endif /* prdfFabricDomain_H */ diff --git a/src/usr/diag/prdf/common/framework/config/prdfMbaDomain_common.H b/src/usr/diag/prdf/common/framework/config/prdfMbaDomain_common.H deleted file mode 100644 index 35dd2af9e..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfMbaDomain_common.H +++ /dev/null @@ -1,60 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfMbaDomain_common.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef __prdfMbaDomain_common_H -#define __prdfMbaDomain_common_H - -#include <prdfRuleChipDomain.H> - -namespace PRDF -{ - -class MbaDomainCommon : public RuleChipDomain -{ - public: - - /** - * @brief Constructor - * @param i_did The domain ID - * @param i_size The projected size of the domain - */ - MbaDomainCommon( DOMAIN_ID i_did, uint32_t i_size = MBA_DOMAIN_SIZE ) : - RuleChipDomain( i_did, i_size ) - {} - - /** - * @brief Query for an attention of a specific type in this domain - * @param i_attnType [MACHINE_CHECK | RECOVERABLE | SPECIAL] - * @return false - * @note This function will always return false. That way PRD will look - * for the attention via the memory buffer chip. - */ - virtual bool Query( ATTENTION_TYPE i_attnType ) - { return false; } - -}; - -} // end namespace PRDF - -#endif /* __prdfMbaDomain_common_H */ - diff --git a/src/usr/diag/prdf/common/framework/config/prdfMcsDomain.H b/src/usr/diag/prdf/common/framework/config/prdfMcsDomain.H deleted file mode 100644 index 7fa8ed77e..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfMcsDomain.H +++ /dev/null @@ -1,60 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfMcsDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef __PRDFMCSDOMAIN_H -#define __PRDFMCSDOMAIN_H - -#include <prdfRuleChipDomain.H> - -namespace PRDF -{ - -class McsDomain : public RuleChipDomain -{ - public: - - /** - * @brief Constructor - * @param i_did The domain ID - * @param i_size The projected size of the domain - */ - McsDomain( DOMAIN_ID i_did, uint32_t i_size = MCS_DOMAIN_SIZE ) : - RuleChipDomain( i_did, i_size ) - {} - - /** - * @brief Query for an attention of a specific type in this domain - * @param i_attnType [MACHINE_CHECK | RECOVERABLE | SPECIAL] - * @return false - * @note This function will always return false. That way PRD will look - * for the attention via the processor chip. - */ - virtual bool Query( ATTENTION_TYPE i_attnType ) - { return false; } - -}; - -} // end namespace PRDF - -#endif /* __PRDFMCSDOMAIN_H */ - diff --git a/src/usr/diag/prdf/common/framework/config/prdfMembufDomain.H b/src/usr/diag/prdf/common/framework/config/prdfMembufDomain.H deleted file mode 100644 index 8e36e1325..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfMembufDomain.H +++ /dev/null @@ -1,50 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfMembufDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef __PRDFMEMBUFDOMAIN_H -#define __PRDFMEMBUFDOMAIN_H - -#include <prdfRuleChipDomain.H> - -namespace PRDF -{ - -class MembufDomain : public RuleChipDomain -{ - public: - - /** - * @brief Constructor - * @param i_did The domain ID - * @param i_size The projected size of the domain - */ - MembufDomain( DOMAIN_ID i_did, uint32_t i_size = MEMBUF_DOMAIN_SIZE ) : - RuleChipDomain( i_did, i_size ) - {} - -}; - -} // end namespace PRDF - -#endif /* __PRDFMEMBUFDOMAIN_H */ - diff --git a/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.C deleted file mode 100644 index bc6eae851..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.C +++ /dev/null @@ -1,420 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.C $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -/** @file PciOscSwitchDomain.C - * @brief Definition of PllDomain class - */ - -#include <iipscr.h> -#include <iipsdbug.h> -#include <iipServiceDataCollector.h> -#include <prdfErrorSignature.H> -#include <iipResolution.h> -#include <prdfPlatServices.H> -#include <prdfPluginDef.H> -#include <prdfGlobal.H> -#include <iipSystem.h> -#include <UtilHash.H> -#include <prdfPciOscSwitchDomain.H> -#include <prdfP8ProcExtraSig.H> - -#ifndef __HOSTBOOT_MODULE -#include <hdctContent.H> -#include <prdfSdcFileControl.H> -#endif - -using namespace TARGETING; - -namespace PRDF -{ - -using namespace PlatServices; - -//------------------------------------------------------------------------------ - -int32_t PciOscSwitchDomain::Initialize(void) -{ - return SUCCESS; -} - -//------------------------------------------------------------------------------ - -bool PciOscSwitchDomain::Query(ATTENTION_TYPE attentionType) -{ - #define PRDF_FUNC "PciOscSwitchDomain::Query " - bool errorFound = false; - - // Only check for PCI osc switchover on redundant clock systems - // System always checks for RE's first, even if there is an XSTOP - // So we only need to check for PLL errors on RECOVERABLE type - if( hasRedundantClocks() && ( attentionType == RECOVERABLE ) ) - { - // check sysdbug for attention first - SYSTEM_DEBUG_CLASS sysdbug; - for( unsigned int index = 0; - (index < GetSize()) && (errorFound == false); ++index ) - { - ExtensibleChip * l_chip = LookUp( index ); - TARGETING::TargetHandle_t l_chipTgt = l_chip->GetChipHandle(); - bool l_analysisPending = - sysdbug.isActiveAttentionPending( l_chipTgt, RECOVERABLE ); - - if( l_analysisPending ) - { - ExtensibleChipFunction * l_query = - l_chip->getExtensibleFunction("queryPciOscErr"); - int32_t rc = (*l_query)(l_chip, - PluginDef::bindParm< bool &>(errorFound) ); - - // if rc then scom read failed - Error log has already - // been generated. - - if( PRD_POWER_FAULT == rc ) - { - PRDF_ERR( PRDF_FUNC "Power Fault detected!" ); - break; - } - - if( SUCCESS != rc ) - { - PRDF_ERR( PRDF_FUNC "SCOM fail. RC=%x", rc ); - } - } - } - } - - #undef PRDF_FUNC - return errorFound; -} - -//------------------------------------------------------------------------------ -int32_t PciOscSwitchDomain::Analyze( STEP_CODE_DATA_STRUCT & i_sc, - ATTENTION_TYPE i_attentionType ) -{ - #define PRDF_FUNC "PciOscSwitchDomain::Analyze " - - int32_t o_rc = SUCCESS; - bool foundAttn = false; - - for( uint32_t index = 0; index < GetSize(); ++index ) - { - ExtensibleChip * l_chip = LookUp( index ); - ExtensibleChipFunction * l_query = - l_chip->getExtensibleFunction( "queryPciOscErr" ); - - if( NULL == l_query ) - { - continue; - } - - o_rc = (*l_query)(l_chip, - PluginDef::bindParm< bool &>(foundAttn) ); - - if( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "Query failed HUID: 0x%08x", l_chip->GetId() ); - break; - } - - if( foundAttn ) - { - // Set Signature - i_sc.service_data->GetErrorSignature()->setChipId( - l_chip->GetId()); - - PciOscConnList l_pciOscData; - o_rc = analyzePciOscSwitch( l_chip, i_sc, l_pciOscData ); - - if( SUCCESS != o_rc ) - { - PRDF_ERR(PRDF_FUNC " PCI CLK Switch over analysis failed" ); - break; - } - - addHwCalloutAndSignature( i_sc, l_pciOscData ); - - // Set dump flag - i_sc.service_data->SetDump( CONTENT_HW, - l_chip->GetChipHandle() ); - break; - } - }//end of for loop - - #undef PRDF_FUNC - return o_rc; -} - -//------------------------------------------------------------------------------ - -int32_t PciOscSwitchDomain::analyzePciOscSwitch( - ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & i_sc, - PciOscConnList & o_pciOscSwitchData ) -{ - #define PRDF_FUNC "PciOscSwitchDomain::analyzePciOscSwitch " - int32_t o_rc = SUCCESS; - - do - { - - TargetHandle_t l_chipTgt = i_chip->GetChipHandle(); - ExtensibleChipFunction * l_anlzPci = - i_chip->getExtensibleFunction( "analyzePciClkFailover" ); - - if( NULL == l_anlzPci ) - { - o_rc = FAIL; - break; - } - - TargetHandle_t nodeTgt = getConnectedParent( l_chipTgt, TYPE_NODE ); - - if( NULL == nodeTgt ) - { - PRDF_ERR( PRDF_FUNC "unable to get node HUID: 0x%08x ", - i_chip->GetId() ); - o_rc = FAIL; - break; - } - - TargetHandleList pciConProcList = getConnected( nodeTgt, TYPE_PROC ); - - for( TargetHandleList::iterator it = pciConProcList.begin(); - it != pciConProcList.end(); it++ ) - { - ExtensibleChip * l_procChip = findChip( *it ); - - if( NULL == l_procChip ) - { - PRDF_ERR( PRDF_FUNC " could not find chip 0x%08x", - getHuid(*it) ); - continue; - } - - // Capture PllFIRs group - l_procChip->CaptureErrorData( - i_sc.service_data->GetCaptureData(), - Util::hashString("PllFIRs")); - - // Call this chip's capturePllFfdc plugin if it exists. - ExtensibleChipFunction * l_captureFfdc = - l_procChip->getExtensibleFunction("capturePllFfdcIo", true); - - if ( NULL != l_captureFfdc ) - { - (*l_captureFfdc)( l_procChip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT &> - (i_sc) ); - } - - o_rc = (*l_anlzPci)( l_procChip, - PluginDef::bindParm< PciOscConnList& > - ( o_pciOscSwitchData )); - if( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "analysis failed HUID: 0x%08x", - l_procChip->GetId() ); - break; - } - } - - #ifndef __HOSTBOOT_MODULE - ServiceDataCollector & sdc = *(i_sc.service_data); - SyncAnalysis (sdc); //Add call to Sync SDC - #endif - - o_rc = clearPciSwitchError( o_pciOscSwitchData ); - - if( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC " Failed to clear PCI Osc error" ); - break; - } - - }while(0); - - #undef PRDF_FUNC - - return o_rc; -} - -//------------------------------------------------------------------------------ - -bool PciOscSwitchDomain::checkMultiOscFailure( PciOscConnList & i_pciOscData ) -{ - bool o_multipleOscFail = false; - do - { - if( 0 == i_pciOscData.size() ) - { - break; - } - - PciOscConnList::iterator it = i_pciOscData.begin(); - uint32_t firstOscPos = it->pciOscPosition; - - for( ; it != i_pciOscData.end(); it++ ) - { - if( firstOscPos != it->pciOscPosition ) - { - o_multipleOscFail = true; - break; - } - } - - }while(0); - - return o_multipleOscFail; -} - -//------------------------------------------------------------------------------ - -void PciOscSwitchDomain::addHwCalloutAndSignature( STEP_CODE_DATA_STRUCT & i_sc, - PciOscConnList & i_pciOscSwitchData ) -{ - #define PRDF_FUNC "PciOscSwitchDomain::addHwCalloutAndSignature " - ErrorSignature * esig = i_sc.service_data->GetErrorSignature(); - uint32_t signature = esig->getSigId(); - - do - { - uint32_t listSize = i_pciOscSwitchData.size(); - - if( 0 == listSize ) - { - PRDF_ERR( PRDF_FUNC "PCI Osc Switch Over: Analysis failed"); - i_sc.service_data->SetCallout( NextLevelSupport_ENUM, - MRU_MED, NO_GARD ); - signature = PRDFSIG_PCI_OSC_ANL_FAILED; - break; - } - - PciOscConnList::iterator it = i_pciOscSwitchData.begin(); - TargetHandle_t procTgt = it->pciParentProc->GetChipHandle(); - TargetHandle_t l_nodeTgt = - getConnectedParent( procTgt, TYPE_NODE ); - - if( 1 < listSize ) - { - if( 0 == it->pciOscPosition ) - { - signature = PRDFSIG_MULTI_PROC_PCI_OSC0_FAILOVER; - } - else - { - signature = PRDFSIG_MULTI_PROC_PCI_OSC1_FAILOVER; - } - - if( checkMultiOscFailure( i_pciOscSwitchData ) ) - { - PRDF_ERR( PRDF_FUNC "Multiple pci Osc failures detected"); - signature = PRDFSIG_PCI_MULTIPLE_OSC_FO; - i_sc.service_data->SetCallout( NextLevelSupport_ENUM, - MRU_MED, NO_GARD ); - } - - i_sc.service_data->SetCallout( it->pciOscCard, MRU_HIGH ); - i_sc.service_data->SetCallout( l_nodeTgt, MRU_LOW, NO_GARD ); - } - else - { - // Pci Osc endpoints are not supported as gardable - // so instead, we'll need to callout/gard the source PCI OSC - i_sc.service_data->SetCallout( procTgt, MRU_MED, NO_GARD); - i_sc.service_data->SetCallout( l_nodeTgt, MRU_LOW , NO_GARD ); - i_sc.service_data->SetCallout( it->pciOscCard, MRU_HIGH ); - //i_sc.service_data->SetCallout( it->procPciEndPoint, MRU_MEDA ); - //i_sc.service_data->SetCallout( it->oscPciEndPoint, MRU_MEDA ); - - if( 0 == it->pciOscPosition ) - { - signature = PRDFSIG_PCI_OSC0_FAILOVER; - } - else - { - signature = PRDFSIG_PCI_OSC1_FAILOVER; - } - } - }while(0); - - i_sc.service_data->SetErrorSig( signature ); - i_sc.service_data->setServiceCall(); - #undef PRDF_FUNC -} - -//------------------------------------------------------------------------------ - -int32_t PciOscSwitchDomain::clearPciSwitchError( - PciOscConnList & io_oscSwitchData ) -{ - #define PRDF_FUNC "PciOscSwitchDomain::clearPciSwitchError " - uint32_t o_rc = SUCCESS; - - for( PciOscConnList::iterator it = io_oscSwitchData.begin(); - it != io_oscSwitchData.end(); it++ ) - { - ExtensibleChipFunction * l_clrPci = - it->pciParentProc->getExtensibleFunction("clearPciOscFailOver"); - - o_rc = (* l_clrPci )( it->pciParentProc, - PluginDef::bindParm< uint32_t &> ( it->pciOscPosition )); - - if( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC " Failed to clear PCI clk error bits" - "HUID: 0x%08x", it->pciParentProc->GetId() ); - break; - } - - } - - #undef PRDF_FUNC - return o_rc; -} - -void PciOscSwitchDomain::Order( ATTENTION_TYPE i_attentionType ) -{ - //Order is not relevant. -} - -ExtensibleChip * PciOscSwitchDomain::findChip( TargetHandle_t i_chipTgt ) -{ - ExtensibleChip * l_procChip = NULL; - for( uint32_t i = 0; i < GetSize(); i++ ) - { - l_procChip = LookUp( i ); - if( i_chipTgt == l_procChip->GetChipHandle() ) - { - break; - } - - l_procChip = NULL; - } - - return l_procChip; -} - -} // end namespace PRDF - diff --git a/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.H b/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.H deleted file mode 100644 index 5d3b77f95..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.H +++ /dev/null @@ -1,150 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfPciOscSwitchDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef prdfPciOscDomain_H -#define prdfPciOscDomain_H - -#include <iipDomain.h> -#include <prdfExtensibleDomain.H> -#include <prdfParentDomain.H> -#include <prdfRuleChipDomain.H> - - -namespace PRDF -{ -struct PciOscSwitchDetails -{ - ExtensibleChip * pciParentProc; - TARGETING::TargetHandle_t pciOscCard; - uint32_t pciOscPosition; - TARGETING::TargetHandle_t procPciEndPoint; - TARGETING::TargetHandle_t oscPciEndPoint; - bool pciOscSwitchDone; -}; - -typedef std::vector <PciOscSwitchDetails> PciOscConnList; - -//------------------------------------------------------------------------------ - -class PciOscSwitchDomain : public RuleChipDomain, public ExtensibleDomain, - public ParentDomain<ExtensibleDomain> -{ - public: - - /** - * @brief Constructor - * @param DOMAIN_ID the domain ID - */ - PciOscSwitchDomain( DOMAIN_ID domain_id ); - - /** - * @brief Perform any initialization required by the hardware - * @returns error code - */ - virtual int32_t Initialize(void); - - /** - * @brief Query if anything in this domain is reporting given attention. - * @param Attention type to query for. (@see iipsdbug.h) - * @returns [true|false] - * @pre Initialize() - */ - virtual bool Query(ATTENTION_TYPE attentionType); - - /** - * @brief Analyze errors within the domain - * @param service data collector - * @param attentiont type (@see iipsdbug.h) - * @return return code - * @pre Initialize(); Query() == true - * @post domain element order may be modified. - */ - virtual int32_t Analyze( STEP_CODE_DATA_STRUCT & i_sc, - ATTENTION_TYPE attentionType ); -protected: - - /** - * @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 i_attentionType ); - - private: // function - - /** - * @brief analyzes all the procs reporting switchover from a given pci osc. - * @param i_chip A P8 chip. - * @param i_sc The step code data struct. - * @param o_pciOscSwitchData contains pci osc switch over data. - * @note this is called by Analyze() - */ - int32_t analyzePciOscSwitch( ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & i_sc, - PciOscConnList & o_pciOscSwitchData ); - /** - * @brief clears few bits to reset PCI Osc switch over bit. - * @param io_oscSwitchData list of procs connected to faulty PCI OSC. - * @return SUCCESS if clearing of bit is success, FAIL otherwise. - */ - int32_t clearPciSwitchError( PciOscConnList & io_oscSwitchData ); - - /** - * @brief callout hardware parts and add signature based analysis data. - * @param i_sc The step code data struct. - * @param i_pciOscSwitchData contains PCI osc failover data. - */ - void addHwCalloutAndSignature( STEP_CODE_DATA_STRUCT & i_sc, - PciOscConnList & i_pciOscSwitchData ); - /** - * @brief checks if there is multiple PCI Osc failure. - * @param pciOscSwitchData PCI Osc fault data. - * @return True if there is multiple PCI Osc failure, false otherwise. - */ - bool checkMultiOscFailure( PciOscConnList & i_pciOscSwitchData ); - - /** - * @brief finds Rulechip associated with proc target. - * @param i_chipTgt target associated with proc Rulechip. - * @return Rulechip associated with proc target - */ - ExtensibleChip * findChip( TARGETING::TargetHandle_t i_chipTgt ); - - private: // Data - enum { CONTAINER_SIZE = 16 }; - - -}; - -inline PciOscSwitchDomain::PciOscSwitchDomain( DOMAIN_ID i_domainId ) : - RuleChipDomain( i_domainId, PciOscSwitchDomain::CONTAINER_SIZE ), - ExtensibleDomain( "PciOscSwitchDomain") -{} - -} // end namespace PRDF - -#endif /* prdfPciOscDomain_H */ - diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C deleted file mode 100755 index f9b79ae71..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C +++ /dev/null @@ -1,470 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfPllDomain.C $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -/** @file prdfPllDomain.C - * @brief Definition of PllDomain class - */ - -#include <CcAutoDeletePointer.h> -#include <iipscr.h> -#include <iipsdbug.h> -#include <iipServiceDataCollector.h> -#include <prdfErrorSignature.H> -#include <prdfPllDomain.H> -#include <iipResolution.h> -#include <prdfPlatServices.H> -#include <prdfPluginDef.H> -#include <prdfGlobal.H> -#include <iipSystem.h> -#include <UtilHash.H> -#include <prdfP8PllPcie.H> -#include <prdfP8ProcMbCommonExtraSig.H> - -using namespace TARGETING; - -namespace PRDF -{ - -using namespace PLL; -using namespace PlatServices; - -//------------------------------------------------------------------------------ - -void PllDomain::InitChipPluginFuncs() -{ - if ( CLOCK_DOMAIN_IO == GetId() ) - { - QueryPllFunc = "QueryPllIo"; - CapturePllFunc = "capturePllFfdcIo"; - CalloutPllFunc = "CalloutPllIo"; - MaskPllFunc = "MaskPllIo"; - ClearPllFunc = "ClearPllIo"; - PostAnalysisPllFunc = "PllPostAnalysisIo"; - } - else - { - QueryPllFunc = "QueryPll"; - CapturePllFunc = "capturePllFfdc"; - CalloutPllFunc = "CalloutPll"; - MaskPllFunc = "MaskPll"; - ClearPllFunc = "ClearPll"; - PostAnalysisPllFunc = "PllPostAnalysis"; - } -} - -//------------------------------------------------------------------------------ - -int32_t PllDomain::Initialize(void) -{ - - int32_t rc = SUCCESS; - return(rc); -} - -//------------------------------------------------------------------------------ - -bool PllDomain::Query(ATTENTION_TYPE attentionType) -{ - bool atAttn = false; - // System always checks for RE's first, even if there is an XSTOP - // So we only need to check for PLL errors on RECOVERABLE type - if(attentionType == RECOVERABLE) - { - // check sysdbug for attention first - SYSTEM_DEBUG_CLASS sysdbug; - for(unsigned int index = 0; (index < GetSize()) && (atAttn == false); - ++index) - { - ExtensibleChip * l_chip = LookUp( index ); - TARGETING::TargetHandle_t l_chipTgt = l_chip->GetChipHandle(); - bool l_analysisPending = - sysdbug.isActiveAttentionPending( l_chipTgt, RECOVERABLE ); - - if( l_analysisPending ) - { - ExtensibleChipFunction * l_query = - l_chip->getExtensibleFunction(QueryPllFunc); - int32_t rc = (*l_query)(l_chip,PluginDef::bindParm<bool &>(atAttn)); - // if rc then scom read failed - Error log has already been generated - if( PRD_POWER_FAULT == rc ) - { - PRDF_ERR( "prdfPllDomain::Query() Power Fault detected!" ); - break; - } - else if(SUCCESS != rc) - { - PRDF_ERR( "prdfPllDomain::Query() SCOM fail. RC=%x", rc ); - } - } - } - } - - return(atAttn); -} - -//------------------------------------------------------------------------------ - -int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData, - ATTENTION_TYPE attentionType) -{ - #define PRDF_FUNC "[PllDomain::Analyze] " - typedef ExtensibleChip * ChipPtr; - CcAutoDeletePointerVector<ChipPtr> chip(new ChipPtr[GetSize()]()); - int count = 0; - bool oscSource[2] = { false, false }; - int32_t rc = SUCCESS; - - // 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 - // domains. - typedef std::vector<ExtensibleChip *> NonFuncChips; - NonFuncChips nfchips; - - // Count # of chips that had PLL error - for(unsigned int index = 0; index < GetSize(); ++index) - { - ExtensibleChip * l_chip = LookUp(index); - bool atAttn = false; - - ExtensibleChipFunction * l_query = - l_chip->getExtensibleFunction(QueryPllFunc); - rc |= (*l_query)(l_chip,PluginDef::bindParm<bool &>(atAttn)); - - if ( atAttn ) - { - chip()[count] = LookUp(index); - ++count; - l_chip->CaptureErrorData( - serviceData.service_data->GetCaptureData()); - // Capture PllFIRs group - l_chip->CaptureErrorData( - serviceData.service_data->GetCaptureData(), - Util::hashString("PllFIRs")); - - // Call this chip's capturePllFfdc plugin if it exists. - ExtensibleChipFunction * l_captureFfdc = - l_chip->getExtensibleFunction(CapturePllFunc, true); - if ( NULL != l_captureFfdc ) - { - (*l_captureFfdc)( l_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT &>(serviceData) ); - } - - // If error is not from PCIE OSC, there is no need to go further - // than this. We shall analyze errors from other chips in the - // domain. - - if ( CLOCK_DOMAIN_IO != GetId() ) - { - continue; - } - -/* TODO: RTC 136052 - // Figure out which pcie osc is active for this proc - uint32_t oscPos = getIoOscPos(l_chip, serviceData); - - if ( oscPos < MAX_PCIE_OSC_PER_NODE ) - { - oscSource[oscPos] = true; - } - else - { - PRDF_ERR(PRDF_FUNC "getOscPos returned error for chip: " - "0x%08x", l_chip->GetId()); - } -*/ - } - else if ( !PlatServices::isFunctional(l_chip->GetChipHandle()) ) - { - // The chip is now non-functional. - nfchips.push_back( l_chip ); - } - } - - // Remove all non-functional chips. - for ( NonFuncChips::iterator i = nfchips.begin(); i != nfchips.end(); i++ ) - { - systemPtr->RemoveStoppedChips( (*i)->GetChipHandle() ); - } - - // always suspect the clock source - closeClockSource.Resolve(serviceData); - if(&closeClockSource != &farClockSource) - { - farClockSource.Resolve(serviceData); - } - - const uint32_t tmpCount = serviceData.service_data->getMruListSize(); - - // If only one detected the error, add it to the callout list. - // Or if multiple chips report errors but no callout for PCIe case. - // This could happen for PCIe PLL since pcie clock resolution defer - // the osc callout to PllPcie chip plugin. - if (( 1 == count ) || - (( 1 < count ) && - ( 0 == tmpCount ) && - ( CLOCK_DOMAIN_IO == GetId() ))) - { - // Call this chip's CalloutPll plugin if it exists. - ExtensibleChipFunction * l_callout = - chip()[0]->getExtensibleFunction( CalloutPllFunc, true ); - if ( NULL != l_callout ) - { - (*l_callout)( chip()[0], - PluginDef::bindParm<STEP_CODE_DATA_STRUCT &>(serviceData) ); - } - - // If CalloutPll plugin does not add anything new to the callout - // or for pcie io domain and only 1 proc reports error, then - // call it out in addition to the pcie osc already called out in - // CalloutPllFunc plugin - if (( tmpCount == serviceData.service_data->getMruListSize() ) || - (( CLOCK_DOMAIN_IO == GetId() ) && ( 1 == count ))) - { - // No additional callouts were made so add this chip to the list. - serviceData.service_data->SetCallout( chip()[0]->GetChipHandle()); - } - } - - // PCIe domains uses two threshold resolutions one per osc - if ( CLOCK_DOMAIN_IO == GetId() ) - { - if ( true == oscSource[0] ) - { - iv_threshold.Resolve(serviceData); - } - - if ( true == oscSource[1] ) - { - iv_threshold2.Resolve(serviceData); - } - - if (( false == oscSource[0] ) && ( false == oscSource[1] )) - { - PRDF_ERR(PRDF_FUNC "can't threshold IO domain due to no available " - "pcie osc source - count:%d, chip 0x%08x", - count, chip()[0]->GetId()); - } - } - // Proc and mem domains only use one threshold resolution - else - { - iv_threshold.Resolve(serviceData); - } - - // Test for threshold - if(serviceData.service_data->IsAtThreshold()) - { - // Only mask chips connected to fault pcie osc - if ( CLOCK_DOMAIN_IO == GetId() ) - { - uint32_t oscPos = MAX_PCIE_OSC_PER_NODE; - if ( true == oscSource[0] ) - { - // Mask pcie pll error in chips connected to pcie osc-0 - oscPos = 0; - ExtensibleDomainFunction * l_mask = - getExtensibleFunction("MaskPllIo"); - (*l_mask)(this, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&, uint32_t> - (serviceData, oscPos)); - } - - if ( true == oscSource[1] ) - { - // Mask pcie pll error in chips connected to pcie osc-1 - oscPos = 1; - ExtensibleDomainFunction * l_mask = - getExtensibleFunction("MaskPllIo"); - (*l_mask)(this, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&, uint32_t> - (serviceData, oscPos)); - } - - if (( false == oscSource[0] ) && ( false == oscSource[1] )) - { - PRDF_ERR(PRDF_FUNC "can't mask pcie pll error due to no " - "available pcie osc source - count:%d, chip 0x%08x", - count, chip()[0]->GetId()); - } - } - else - { - // Mask in all chips in domain - ExtensibleDomainFunction * l_mask = - getExtensibleFunction("MaskPll"); - (*l_mask)(this, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(serviceData)); - } - } - // Set Signature - serviceData.service_data->GetErrorSignature()->setChipId(chip()[0]->GetId()); - serviceData.service_data->SetErrorSig( PRDFSIG_PLL_ERROR ); - -#ifndef __HOSTBOOT_MODULE - // Set dump flag dg09a - serviceData.service_data->SetDump(iv_dumpContent,chip()[0]->GetChipHandle()); -#endif - - // Clear PLLs from this domain. - ExtensibleDomainFunction * l_clear = getExtensibleFunction("ClearPll"); - (*l_clear)(this, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(serviceData)); - - // Run any PLL Post Analysis functions from this domain. - for(int i = 0; i < count; i++) - { - ExtensibleChip * l_chip = chip()[i]; - // Send any special messages indicating there was a PLL error. - ExtensibleChipFunction * l_pllPostAnalysis = - l_chip->getExtensibleFunction(PostAnalysisPllFunc, true); - (*l_pllPostAnalysis)(l_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(serviceData)); - } - - return rc; - - #undef PRDF_FUNC -} - -//------------------------------------------------------------------------------ - -void PllDomain::Order(ATTENTION_TYPE attentionType) -{ - // Order is not important for PLL errors -} - -//------------------------------------------------------------------------------ - -int32_t PllDomain::ClearPll( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc ) -{ - PllDomain * l_domain = (PllDomain *) i_domain; - - const char * clearPllFuncName = "ClearPll"; - if ( CLOCK_DOMAIN_IO == l_domain->GetId() ) - { - clearPllFuncName = "ClearPllIo"; - } - - // Clear children chips. - for ( uint32_t i = 0; i < l_domain->GetSize(); i++ ) - { - ExtensibleChip * l_chip = l_domain->LookUp(i); - ExtensibleChipFunction * l_clear = - l_chip->getExtensibleFunction(clearPllFuncName); - (*l_clear)( l_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_sc) ); - } - - // Clear children domains. - // This looks like a recursive call. It calls other domains of Clear. - ParentDomain<ExtensibleDomain>::iterator i; - for (i = l_domain->getBeginIterator(); i != l_domain->getEndIterator(); i++) - { - // Clear PLLs from this domain. - ExtensibleDomainFunction * l_clear = - (i->second)->getExtensibleFunction("ClearPll"); - (*l_clear)( i->second, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_sc) ); - } - - return SUCCESS; -} -PRDF_PLUGIN_DEFINE( PllDomain, ClearPll ); - -//------------------------------------------------------------------------------ - -int32_t PllDomain::MaskPll( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc ) -{ - PllDomain * l_domain = (PllDomain *) i_domain; - - // Mask children chips. - for ( uint32_t i = 0; i < l_domain->GetSize(); i++ ) - { - ExtensibleChip * l_chip = l_domain->LookUp(i); - ExtensibleChipFunction * l_mask = - l_chip->getExtensibleFunction("MaskPll"); - (*l_mask)( l_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_sc) ); - } - - // Mask children domains. - // This looks like a recursive call. It calls other domains of Mask. - ParentDomain<ExtensibleDomain>::iterator i; - for (i = l_domain->getBeginIterator(); i != l_domain->getEndIterator(); i++) - { - ExtensibleDomainFunction * l_mask = - (i->second)->getExtensibleFunction("MaskPll"); - (*l_mask)( i->second, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_sc) ); - } - - return SUCCESS; -} -PRDF_PLUGIN_DEFINE( PllDomain, MaskPll ); - -//------------------------------------------------------------------------------ - -int32_t PllDomain::MaskPllIo( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc, - uint32_t i_oscPos ) -{ - PllDomain * l_domain = (PllDomain *) i_domain; - - // Mask children chips. - for ( uint32_t i = 0; i < l_domain->GetSize(); i++ ) - { - ExtensibleChip * l_chip = l_domain->LookUp(i); - ExtensibleChipFunction * l_mask = - l_chip->getExtensibleFunction("MaskPllIo"); - - // io pcie domain needs osc pos info - (*l_mask)( l_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&, uint32_t> - (i_sc, i_oscPos) ); - } - - // Mask children domains - not used in PCIe but leave it here for now - // This looks like a recursive call. It calls other domains of Mask. - ParentDomain<ExtensibleDomain>::iterator i; - for (i = l_domain->getBeginIterator(); i != l_domain->getEndIterator(); i++) - { - ExtensibleDomainFunction * l_mask = - (i->second)->getExtensibleFunction("MaskPll"); - (*l_mask)( i->second, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_sc) ); - } - - return SUCCESS; -} -PRDF_PLUGIN_DEFINE( PllDomain, MaskPllIo ); - - -//------------------------------------------------------------------------------ - -} // end namespace PRDF - diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H deleted file mode 100755 index 11fea8d71..000000000 --- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.H +++ /dev/null @@ -1,291 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/common/framework/config/prdfPllDomain.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef prdfPllDomain_H -#define prdfPllDomain_H - -#include <iipDomain.h> -#include <iipResolutionFactory.h> -#include <prdfExtensibleDomain.H> -#include <prdfParentDomain.H> -#include <prdfRuleChipDomain.H> -#include <prdfThresholdResolutions.H> - -#ifndef __HOSTBOOT_MODULE - #include <hdctContent.H> // for hwTableContent -#endif - -namespace PRDF -{ - -//------------------------------------------------------------------------------ - -class PllDomain : public RuleChipDomain, public ExtensibleDomain, - public ParentDomain<ExtensibleDomain> -{ - public: - -#ifdef __HOSTBOOT_MODULE - - /** - * @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 - - /** - * @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 - - /** - * @brief Perform any initialization required by the hardware - * @returns error code - * @post PLL errors cleared in hardware. - */ - virtual int32_t Initialize(void); - - /** - * @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); - - /** - * @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 ); - - /** - * @brief Domain level plugin function used to clear PLL attentions in a - * domain and its subdomains. - * @param i_domain The target PLL domain. - * @param i_sc The step code data struct. - * @return SUCCESS - */ - static int32_t ClearPll( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc ); - - /** - * @brief Domain level plugin function used to mask PLL attentions in a - * domain and its subdomains. - * @param i_domain The target PLL domain. - * @param i_sc The step code data struct. - * @return SUCCESS - */ - static int32_t MaskPll( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc ); - - /** - * @brief Domain level plugin function used to mask PLL attentions in a - * domain and its subdomains. - * @param i_domain The target PLL domain. - * @param i_sc The step code data struct. - * @param i_oscPos osc position (only used by IO pcie domain) - * @return SUCCESS - */ - static int32_t MaskPllIo( ExtensibleDomain * i_domain, - STEP_CODE_DATA_STRUCT & i_sc, - uint32_t i_oscPos ); - -protected: - - /** - * @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); - -private: // functions - - /** - * @brief initialize pll chip plugin function names - */ - virtual void InitChipPluginFuncs(); - -private: // Data - - enum { CONTAINER_SIZE = 8 }; - - Resolution & closeClockSource; - Resolution & farClockSource; - - Resolution & iv_threshold; - - // This resolution is used for the 2nd pcie osc only - // since the redundant pcie oscs are at the node - // level and can dynamically switch or config - // during the IPL - Resolution & iv_threshold2; - -#ifndef __HOSTBOOT_MODULE - hwTableContent iv_dumpContent; -#endif - - const char * QueryPllFunc; - const char * CapturePllFunc; - const char * CalloutPllFunc; - const char * MaskPllFunc; - const char * ClearPllFunc; - const char * PostAnalysisPllFunc; - -}; - -//------------------------------------------------------------------------------ - -#ifdef __HOSTBOOT_MODULE - -inline -PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource, - const ThresholdResolution::ThresholdPolicy& i_mfgThresh) : - RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ), - ExtensibleDomain("PllDomain"), - closeClockSource(clockSource), - farClockSource(clockSource), - iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ), - iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ) -{ - InitChipPluginFuncs(); -} - -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 ) ), - iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ) -{ - InitChipPluginFuncs(); -} - -#else // not __HOSTBOOT_MODULE - -inline -PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource, - hwTableContent i_hwdc, - const ThresholdResolution::ThresholdPolicy& i_mfgThresh) : - RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ), - ExtensibleDomain("PllDomain"), - closeClockSource(clockSource), - farClockSource(clockSource), - iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ), - iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ), - iv_dumpContent(i_hwdc) -{ - InitChipPluginFuncs(); -} - -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_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1, - ThresholdResolution::cv_pllDefault, - i_mfgThresh ) ), - iv_dumpContent(i_hwdc) -{ - InitChipPluginFuncs(); -} - -#endif // not __HOSTBOOT_MODULE - -//------------------------------------------------------------------------------ - -} // end namespace PRDF - -#endif /* prdfPllDomain_H */ - |

