summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H19
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C20
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.C70
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfTargetServices.H22
-rw-r--r--src/usr/diag/prdf/framework/service/prdfPlatServices.C16
-rw-r--r--src/usr/diag/prdf/framework/service/prdfPlatServices.H11
6 files changed, 125 insertions, 33 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H
index 0df1c8f07..41b0c6460 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H
@@ -105,21 +105,20 @@ bool atRuntime();
bool isSmpCoherent();
/**
- * @brief Checks if system is running in a Sapphire mode.
- * @return True if Sapphire is in running state false otherwise.
+ * @brief Initiate hwudump.
+ * @param i_target target handle.
+ * @param i_errl error handle
+ * @param i_errlActions error action flags
*/
- bool isSapphireRunning( );
-
-/**
- * @brief Initiate hwudump.
- * @param i_target target handle.
- * @param i_errl error handle
- * @param i_errlActions error action flags
- */
void initiateUnitDump( TARGETING::TargetHandle_t i_target,
errlHndl_t i_errl,
uint32_t i_errlActions);
+/**
+ * @return True, if this system is using an FSP. False, otherwise (i.e. BMC
+ * based system or SP-less machine).
+ */
+bool isSpConfigFsp();
//##############################################################################
//## Processor specific functions
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 dc85f7f22..d4a3b5cae 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -472,19 +472,13 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
PRDF_RECONFIG_LOOP(deconfigState);
}
- //**********************************************************
- // Systems where Hypervisor is not PHYP, we should not gard
- // a hardware resource until we are very sure that it is a
- // hardware issue. Idea is to prevent a loss of hardware
- // resource in cases where software could have been
- // a cause as well.
- //**********************************************************
-
- if( isSapphireRunning() && sappSwNoGardReq && sappHwNoGardReq )
+ // OPAL has requested that we not gard any hardware if it is possible that
+ // software generated the attention. This will be determined if there is a
+ // software callout with higher priority than a hardware callout.
+ if ( sappSwNoGardReq && sappHwNoGardReq && // Gard requirements met
+ isHyprConfigOpal() && isHyprRunning() && // OPAL is running
+ !isMfgAvpEnabled() && !isMfgHdatAvpEnabled() ) // No AVPs running
{
- // It is a Sapphire based system.
- // Hardware callout is of low priority but SW callout priority
- // is High/Medium.
gardErrType = HWAS::GARD_NULL;
prdGardErrType = GardAction::NoGard;
}
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
index ca9cb88b7..0c3b4e49a 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.C
@@ -57,6 +57,70 @@ namespace PlatServices
//##############################################################################
//##
+//## System Level Utility Functions
+//##
+//##############################################################################
+
+// local utility function.
+ATTR_PAYLOAD_KIND_type getPayloadType()
+{
+ ATTR_PAYLOAD_KIND_type payload = PAYLOAD_KIND_UNKNOWN;
+
+ TargetHandle_t sysTrgt = getSystemTarget();
+ if ( NULL != sysTrgt )
+ {
+ payload = sysTrgt->getAttr<ATTR_PAYLOAD_KIND>();
+ }
+
+ return payload;
+}
+
+//------------------------------------------------------------------------------
+
+bool isHyprConfigPhyp()
+{
+ return PAYLOAD_KIND_PHYP == getPayloadType();
+}
+
+//------------------------------------------------------------------------------
+
+bool isHyprConfigOpal()
+{
+ return PAYLOAD_KIND_SAPPHIRE == getPayloadType();
+}
+
+//------------------------------------------------------------------------------
+
+bool isHyprRunning()
+{
+ bool rc = false;
+
+ #ifdef __HOSTBOOT_MODULE
+
+ // ATTR_PAYLOAD_STATE is not defined in Hostboot. We can assume that if
+ // __HOSTBOOT_RUNTIME is defined then the hypervisor is running.
+
+ #ifdef __HOSTBOOT_RUNTIME
+ rc = true;
+ #else
+ rc = false;
+ #endif
+
+ #else
+
+ TargetHandle_t sysTrgt = getSystemTarget();
+ if ( NULL != sysTrgt )
+ {
+ rc = (PAYLOAD_STATE_RUNNING == sysTrgt->getAttr<ATTR_PAYLOAD_STATE>());
+ }
+
+ #endif
+
+ return rc;
+}
+
+//##############################################################################
+//##
//## Target Manipulation Utility Functions
//##
//##############################################################################
@@ -1404,6 +1468,12 @@ bool mnfgSpareDramDeploy()
bool isMfgCeCheckingEnabled()
{ return isMnfgFlagSet( MNFG_FLAG_IPL_MEMORY_CE_CHECKING ); }
+bool isMfgAvpEnabled()
+{ return isMnfgFlagSet( MNFG_FLAG_AVP_ENABLE ); }
+
+bool isMfgHdatAvpEnabled()
+{ return isMnfgFlagSet( MNFG_FLAG_HDAT_AVP_ENABLE ); }
+
} // end namespace PlatServices
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
index 6fcce1377..e945f0a21 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfTargetServices.H
@@ -54,6 +54,21 @@ namespace PlatServices
//##############################################################################
//##
+//## System Level Utility Functions
+//##
+//##############################################################################
+
+/** @return TRUE if this system is, or will be, using PHYP. FALSE otherwise. */
+bool isHyprConfigPhyp();
+
+/** @return TRUE if this system is, or will be, using OPAL. FALSE otherwise. */
+bool isHyprConfigOpal();
+
+/** @return TRUE if the hypervisor is running. FALSE otherwise. */
+bool isHyprRunning();
+
+//##############################################################################
+//##
//## Target Manipulation Utility Functions
//##
//##############################################################################
@@ -421,6 +436,13 @@ bool mnfgSpareDramDeploy();
*/
bool isMfgCeCheckingEnabled();
+/** @return TRUE if MNFG_FLAG_AVP_ENABLE is set, FALSE otherwise.
+ */
+bool isMfgAvpEnabled();
+
+/** @return TRUE if MNFG_FLAG_HDAT_AVP_ENABLE is set, FALSE otherwise. */
+bool isMfgHdatAvpEnabled();
+
} // end namespace PlatServices
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/framework/service/prdfPlatServices.C b/src/usr/diag/prdf/framework/service/prdfPlatServices.C
index a645bd6b2..85458615a 100644
--- a/src/usr/diag/prdf/framework/service/prdfPlatServices.C
+++ b/src/usr/diag/prdf/framework/service/prdfPlatServices.C
@@ -49,6 +49,7 @@
#include <sys/time.h>
#include <time.h>
#include <targeting/common/targetservice.H>
+#include <initservice/initserviceif.H>
using namespace TARGETING;
@@ -95,6 +96,21 @@ void initiateUnitDump( TargetHandle_t i_target,
}
}
+//------------------------------------------------------------------------------
+
+bool isSpConfigFsp()
+{
+ #ifdef __HOSTBOOT_RUNTIME
+
+ return false; // Should never have an FSP when using HBRT.
+
+ #else
+
+ return INITSERVICE::spBaseServicesEnabled();
+
+ #endif
+}
+
//##############################################################################
//## Processor specific functions
//##############################################################################
diff --git a/src/usr/diag/prdf/framework/service/prdfPlatServices.H b/src/usr/diag/prdf/framework/service/prdfPlatServices.H
index d7dae75ce..55efa3742 100644
--- a/src/usr/diag/prdf/framework/service/prdfPlatServices.H
+++ b/src/usr/diag/prdf/framework/service/prdfPlatServices.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -72,15 +72,6 @@ inline bool atRuntime()
#endif
}
-inline bool isSapphireRunning()
-{
- #ifdef __HOSTBOOT_RUNTIME
- return true;
- #else
- return false;
- #endif
-}
-
inline bool isSmpCoherent() { return false; }
} // end namespace PlatServices
OpenPOWER on IntegriCloud