diff options
| author | Benjamin Weisenbeck <bweisenb@us.ibm.com> | 2018-06-07 09:43:44 -0500 |
|---|---|---|
| committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-06-14 10:25:53 -0400 |
| commit | 9e5283c651ba6fe16de6f418db4cdf80f285a551 (patch) | |
| tree | 20aa15e61e812d4e90750f4b051393572155e208 /src/usr/diag/prdf/common/framework | |
| parent | fc766f78534efd3dcbf676f79fefdea75c7fb794 (diff) | |
| download | blackbird-hostboot-9e5283c651ba6fe16de6f418db4cdf80f285a551.tar.gz blackbird-hostboot-9e5283c651ba6fe16de6f418db4cdf80f285a551.zip | |
PRD: Callout both PCI clocks by position for double clock failure
Change-Id: I54b596ec49039f9bfd7df0f56a6f3ef1d2aea706
RTC: 193490
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60120
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60519
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/framework')
| -rwxr-xr-x | src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C | 85 |
1 files changed, 68 insertions, 17 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C index 28933e93a..275fcce2f 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C @@ -27,6 +27,9 @@ // Includes //---------------------------------------------------------------------- #define prdfClockResolution_C +#include <iipSystem.h> +#include <prdfExtensibleChip.H> +#include <prdfGlobal.H> #include <iipServiceDataCollector.h> #include <prdfClockResolution.H> #include <prdfPlatServices.H> @@ -35,6 +38,8 @@ namespace PRDF { +using namespace PlatServices; + //------------------------------------------------------------------------------ // Member Function Specifications //------------------------------------------------------------------------------ @@ -50,7 +55,7 @@ int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData) (iv_targetType == TYPE_MEMBUF) ) { TargetHandle_t l_ptargetClock = - PlatServices::getActiveRefClk(iv_ptargetClock, TYPE_OSCREFCLK); + getActiveRefClk(iv_ptargetClock, TYPE_OSCREFCLK); // Callout this chip if nothing else. // Or in the case of hostboot, use this chip for addClockCallout @@ -73,26 +78,72 @@ int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData) } else if (iv_targetType == TYPE_PEC) { - TargetHandle_t l_ptargetClock = - PlatServices::getActiveRefClk(iv_ptargetClock, TYPE_OSCPCICLK); + // Check if both PCI clocks have failed + bool bothClocksFailed = false; + ExtensibleChip *procChip = + (ExtensibleChip *)systemPtr->GetChip(iv_ptargetClock); - // Callout this chip if nothing else. - if(NULL == l_ptargetClock) + SCAN_COMM_REGISTER_CLASS *oscSw = procChip->getRegister("OSC_SW_SENSE"); + l_rc = oscSw->Read(); + if ( SUCCESS == l_rc ) { - l_ptargetClock = iv_ptargetClock; + const uint32_t OSC_0_OK = 28; + const uint32_t OSC_1_OK = 29; + if ( !(oscSw->IsBitSet(OSC_0_OK) || oscSw->IsBitSet(OSC_1_OK) ) ) + { + bothClocksFailed = true; + + // Callout both PCI Clocks + #ifndef __HOSTBOOT_MODULE + TargetHandle_t pciOsc = + getClockId( iv_ptargetClock, TYPE_OSCPCICLK, 0 ); + if (pciOsc) + serviceData.service_data->SetCallout( pciOsc ); + + pciOsc = getClockId( iv_ptargetClock, TYPE_OSCPCICLK, 1 ); + if (pciOsc) + serviceData.service_data->SetCallout( pciOsc ); + + #else + serviceData.service_data->SetCallout( + PRDcallout(iv_ptargetClock, + PRDcalloutData::TYPE_PCICLK0)); + serviceData.service_data->SetCallout( + PRDcallout(iv_ptargetClock, + PRDcalloutData::TYPE_PCICLK1)); + #endif + } + } + else + { + PRDF_ERR( "ClockResolution::Resolve " + "Read() failed on OSC_SW_SENSE huid 0x%08X", + iv_ptargetClock ); } - // 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, - PRDcalloutData::TYPE_PCICLK)); - #endif + if ( !bothClocksFailed ) + { + TargetHandle_t l_ptargetClock = + PlatServices::getActiveRefClk(iv_ptargetClock, TYPE_OSCPCICLK); + + // Callout this chip if nothing else. + if(NULL == l_ptargetClock) + { + l_ptargetClock = iv_ptargetClock; + } + + // 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, + PRDcalloutData::TYPE_PCICLK)); + #endif + } } // Get all connected chips for non-CLOCK_CARD types. else |

