summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Weisenbeck <bweisenb@us.ibm.com>2018-06-07 09:43:44 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-06-14 10:25:53 -0400
commit9e5283c651ba6fe16de6f418db4cdf80f285a551 (patch)
tree20aa15e61e812d4e90750f4b051393572155e208
parentfc766f78534efd3dcbf676f79fefdea75c7fb794 (diff)
downloadtalos-hostboot-9e5283c651ba6fe16de6f418db4cdf80f285a551.tar.gz
talos-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>
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C85
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfRasServices_common.C32
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfCalloutsData.H4
-rw-r--r--src/usr/diag/prdf/prdfErrlUtil.H5
4 files changed, 102 insertions, 24 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
diff --git a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C
index 174fd7794..f5afd1113 100755
--- a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C
@@ -468,12 +468,38 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
errlSev,
l_diagUpdate);
}
- else if(PRDcalloutData::TYPE_PROCCLK == thiscallout.getType() ||
- PRDcalloutData::TYPE_PCICLK == thiscallout.getType())
+ else if(PRDcalloutData::TYPE_PROCCLK == thiscallout.getType())
{
PRDF_ADD_CLOCK_CALLOUT(iv_errl,
thiscallout.getTarget(),
- thiscallout.getType(),
+ HWAS::OSCREFCLK_TYPE,
+ thispriority,
+ thisDeconfig,
+ thisGard);
+ }
+ else if(PRDcalloutData::TYPE_PCICLK == thiscallout.getType())
+ {
+ PRDF_ADD_CLOCK_CALLOUT(iv_errl,
+ thiscallout.getTarget(),
+ HWAS::OSCPCICLK_TYPE,
+ thispriority,
+ thisDeconfig,
+ thisGard);
+ }
+ else if(PRDcalloutData::TYPE_PCICLK0 == thiscallout.getType())
+ {
+ PRDF_ADD_CLOCK_CALLOUT(iv_errl,
+ thiscallout.getTarget(),
+ HWAS::OSCPCICLK0_TYPE,
+ thispriority,
+ thisDeconfig,
+ thisGard);
+ }
+ else if(PRDcalloutData::TYPE_PCICLK1 == thiscallout.getType())
+ {
+ PRDF_ADD_CLOCK_CALLOUT(iv_errl,
+ thiscallout.getTarget(),
+ HWAS::OSCPCICLK1_TYPE,
thispriority,
thisDeconfig,
thisGard);
diff --git a/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H b/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H
index c741af721..e2eca0234 100644
--- a/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H
+++ b/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -53,6 +53,8 @@ enum MruType
TYPE_SYMFRU,
TYPE_PROCCLK,
TYPE_PCICLK,
+ TYPE_PCICLK0,
+ TYPE_PCICLK1,
};
} // end namespace PRDcalloutData
diff --git a/src/usr/diag/prdf/prdfErrlUtil.H b/src/usr/diag/prdf/prdfErrlUtil.H
index e666b5838..ed90a0553 100644
--- a/src/usr/diag/prdf/prdfErrlUtil.H
+++ b/src/usr/diag/prdf/prdfErrlUtil.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -181,8 +181,7 @@
#define PRDF_ADD_CLOCK_CALLOUT(io_errl, i_target, i_clockType, i_priority, \
i_deconfigState, i_gardErrType) \
io_errl->addClockCallout(i_target, \
- (PRDcalloutData::TYPE_PROCCLK == i_clockType) ? \
- HWAS::OSCREFCLK_TYPE : HWAS::OSCPCICLK_TYPE, \
+ i_clockType, \
(const HWAS::callOutPriority)i_priority, \
(i_deconfigState == HWAS::DECONFIG ? \
HWAS::DELAYED_DECONFIG : i_deconfigState), \
OpenPOWER on IntegriCloud