summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C28
-rw-r--r--src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule2
-rw-r--r--src/usr/diag/prdf/common/plat/nimbus/nimbus_mcbist_actions.rule2
-rw-r--r--src/usr/diag/prdf/common/plat/nimbus/nimbus_mcs_actions.rule2
-rw-r--r--src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C42
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C6
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfP9Mca.C13
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfRestoreDramRepairs.C13
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices.C26
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices.H15
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices_rt.C24
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices_rt.H10
-rw-r--r--src/usr/diag/prdf/prdf_hb_only.mk4
13 files changed, 113 insertions, 74 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
index 8ba990077..49ba0bf7e 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
@@ -181,6 +181,8 @@ void ServiceDataCollector::clearNvdimmMruListGard()
{
#define PRDF_FUNC "[ServiceDataCollector::clearNvdimmMruListGard] "
+ #ifdef CONFIG_NVDIMM
+ #ifdef __HOSTBOOT_MODULE
// Loop through the MRU list.
for ( auto & mru : xMruList )
{
@@ -188,33 +190,29 @@ void ServiceDataCollector::clearNvdimmMruListGard()
TargetHandle_t trgt = callout.getTarget();
if ( TYPE_DIMM == PlatServices::getTargetType(trgt) )
{
- // If the callout target is an NVDIMM, do not gard it and send a
- // message to PHYP/Hostboot that a save/restore may work.
+ // If the callout target is an NVDIMM send a message to
+ // PHYP/Hostboot that a save/restore may work, and if we are at
+ // IPL, clear Gard on the NVDIMM.
if ( isNVDIMM(trgt) )
{
- mru.gardState = NO_GARD;
-
- #ifdef __HOSTBOOT_MODULE
-
- #ifdef __HOSTBOOT_RUNTIME
- // Hostboot runtime, send the message to PHYP
- uint32_t l_rc = PlatServices::nvdimmNotifyPhypProtChange( trgt,
+ // Send the message to PHYP/Hostboot
+ uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( trgt,
NVDIMM::NVDIMM_RISKY_HW_ERROR );
if ( SUCCESS != l_rc )
{
- PRDF_TRAC( PRDF_FUNC "nvdimmNotifyPhypProtChange(0x%08x) "
+ PRDF_TRAC( PRDF_FUNC "nvdimmNotifyProtChange(0x%08x) "
"failed.", PlatServices::getHuid(trgt) );
continue;
}
- #else
- // IPL, set the appropriate internal attribute in Hostboot
- trgt->setAttr<ATTR_NV_STATUS_FLAG>(0x40);
+ #ifndef __HOSTBOOT_RUNTIME
+ // IPL, clear Gard
+ mru.gardState = NO_GARD;
#endif
-
- #endif // __HOSTBOOT_MODULE
}
}
}
+ #endif // __HOSTBOOT_MODULE
+ #endif // CONFIG_NVDIMM
#undef PRDF_FUNC
}
diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule
index e0529afd5..6d5ab9018 100644
--- a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule
+++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule
@@ -143,7 +143,7 @@ actionclass mca_ue_algorithm_th_1
# NVDIMM callouts #
################################################################################
-# Simple callouts that will avoid gard for NVDIMMs
+# Simple callouts that will avoid gard for NVDIMMs at IPL
actionclass nvdimm_self_th_1
{
try( funccall("CheckForNvdimms"), calloutSelfMed );
diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcbist_actions.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcbist_actions.rule
index b71610835..11d499e30 100644
--- a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcbist_actions.rule
+++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcbist_actions.rule
@@ -40,7 +40,7 @@ actionclass command_addr_timeout
# NVDIMM callouts #
################################################################################
-# Simple callouts that will avoid gard for NVDIMMs
+# Simple callouts that will avoid gard for NVDIMMs at IPL
actionclass nvdimm_self_th_1
{
try( funccall("CheckForNvdimms"), calloutSelfMed );
diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcs_actions.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcs_actions.rule
index 839a9dc44..35339ccc6 100644
--- a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcs_actions.rule
+++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mcs_actions.rule
@@ -27,7 +27,7 @@
# NVDIMM callouts #
################################################################################
-# Simple callouts that will avoid gard for NVDIMMs
+# Simple callouts that will avoid gard for NVDIMMs at IPL
actionclass nvdimm_self_th_1
{
try( funccall("CheckForNvdimms"), calloutSelfMed );
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C b/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C
index 77cecfb9f..730f99f09 100644
--- a/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C
+++ b/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C
@@ -146,40 +146,62 @@ int32_t ClearNvdimmGardState( ExtensibleChip * i_chip,
return SUCCESS;
}
-PRDF_PLUGIN_DEFINE_NS(nimbus_mcs, CommonPlugins, ClearNvdimmGardState);
PRDF_PLUGIN_DEFINE_NS(nimbus_mca, CommonPlugins, ClearNvdimmGardState);
-PRDF_PLUGIN_DEFINE_NS(nimbus_mcbist, CommonPlugins, ClearNvdimmGardState);
/**
* @brief Will check if any of the DIMMs connected to this chip are NVDIMMs
- * and callout self, no gard if there are.
+ * and send a message to PHYP/Hostboot that save/restore may work. If
+ * we are at IPL, we will callout self no gard instead of garding.
* @param i_chip The chip of the DIMM parent.
* @param io_sc The step code data struct.
- * @returns SUCCESS if NVDIMMs found, PRD_SCAN_COMM_REGISTER_ZERO if not.
+ * @returns SUCCESS if NVDIMMs found at IPL, PRD_SCAN_COMM_REGISTER_ZERO if not.
*/
int32_t CheckForNvdimms( ExtensibleChip * i_chip,
STEP_CODE_DATA_STRUCT & io_sc )
{
int32_t rc = PRD_SCAN_COMM_REGISTER_ZERO;
+ #ifdef CONFIG_NVDIMM
#ifdef __HOSTBOOT_MODULE
TargetHandleList dimmList = getConnected( i_chip->getTrgt(), TYPE_DIMM );
+ // Always loop through all the dimms so we send the
+ // nvdimmNotifyProtChange message for all the NVDIMMs on the target.
for ( auto & dimm : dimmList )
{
+ // If the callout target is an NVDIMM send a message to
+ // PHYP/Hostboot that a save/restore may work, and if we are at
+ // IPL, do not gard the target.
if ( isNVDIMM(dimm) )
{
- // Callout self, no gard
- io_sc.service_data->SetCallout(i_chip->getTrgt(), MRU_MED, NO_GARD);
-
- // No need for other actions, so return SUCCESS
+ // Send the message to PHYP/Hostboot
+ uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( dimm,
+ NVDIMM::NVDIMM_RISKY_HW_ERROR );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_TRAC( "CheckForNvdimms: nvdimmNotifyProtChange(0x%08x)"
+ " failed.", PlatServices::getHuid(dimm) );
+ continue;
+ }
+
+ #ifndef __HOSTBOOT_RUNTIME
+ // IPL
+ // We will callout self, no gard. No need for another self callout
+ // from the rule code, so return SUCCESS.
rc = SUCCESS;
- break;
+ #endif
}
}
- #endif
+ if ( SUCCESS == rc )
+ {
+ // Callout self, no gard
+ io_sc.service_data->SetCallout( i_chip->getTrgt(), MRU_MED, NO_GARD );
+ }
+
+ #endif // __HOSTBOOT_MODULE
+ #endif // CONFIG_NVDIMM
return rc;
}
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C b/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
index 054a35a27..0ac004642 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
@@ -1354,19 +1354,21 @@ int32_t dimmList( TargetHandleList & i_dimmList )
PRDF_TRAC( PRDF_FUNC "Predictive dealloc for start addr: 0x%016llx "
"end addr: 0x%016llx", ssAddr, seAddr );
+ #ifdef CONFIG_NVDIMM
// If the DIMM is an NVDIMM, send a message to PHYP that a save/restore
// may work.
if ( isNVDIMM(*it) )
{
- uint32_t l_rc = PlatServices::nvdimmNotifyPhypProtChange( *it,
+ uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( *it,
NVDIMM::NVDIMM_RISKY_HW_ERROR );
if ( SUCCESS != l_rc )
{
- PRDF_TRAC( PRDF_FUNC "nvdimmNotifyPhypProtChange(0x%08x) "
+ PRDF_TRAC( PRDF_FUNC "nvdimmNotifyProtChange(0x%08x) "
"failed.", getHuid(*it) );
continue;
}
}
+ #endif
}
return o_rc;
diff --git a/src/usr/diag/prdf/plat/mem/prdfP9Mca.C b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
index 1bd8e2256..d415047ff 100644
--- a/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
+++ b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
@@ -27,7 +27,6 @@
#include <iipServiceDataCollector.h>
#include <prdfExtensibleChip.H>
#include <prdfPluginMap.H>
-#include <isteps/nvdimm/nvdimm.H>
// Platform includes
#include <prdfMemDbUtils.H>
@@ -747,6 +746,7 @@ int32_t AnalyzeNvdimmHealthStatRegs( ExtensibleChip * i_chip,
{
#define PRDF_FUNC "[nimbus_mca::AnalyzeNvdimmHealthStatRegs] "
+ #ifdef CONFIG_NVDIMM
#ifdef __HOSTBOOT_RUNTIME
uint32_t l_rc = SUCCESS;
@@ -786,7 +786,7 @@ int32_t AnalyzeNvdimmHealthStatRegs( ExtensibleChip * i_chip,
io_sc.service_data->SetThresholdMaskId(0);
// Send message to PHYP that save/restore may work
- l_rc = PlatServices::nvdimmNotifyPhypProtChange( dimm,
+ l_rc = PlatServices::nvdimmNotifyProtChange( dimm,
NVDIMM::NVDIMM_RISKY_HW_ERROR );
if ( SUCCESS != l_rc ) continue;
@@ -829,7 +829,14 @@ int32_t AnalyzeNvdimmHealthStatRegs( ExtensibleChip * i_chip,
PRDF_ERR( PRDF_FUNC "Unexpected call to analyze NVDIMMs at IPL." );
io_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_HIGH, NO_GARD );
- #endif
+ #endif // end runtime vs IPL check
+
+ #else // CONFIG_NVDIMM not defined
+
+ PRDF_ERR( PRDF_FUNC "CONFIG_NVDIMM not defined." );
+ io_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_HIGH, NO_GARD );
+
+ #endif // end CONFIG_NVDIMM check
return SUCCESS; // nothing to return to rule code
diff --git a/src/usr/diag/prdf/plat/mem/prdfRestoreDramRepairs.C b/src/usr/diag/prdf/plat/mem/prdfRestoreDramRepairs.C
index 3acf7bcb1..5afc48016 100644
--- a/src/usr/diag/prdf/plat/mem/prdfRestoreDramRepairs.C
+++ b/src/usr/diag/prdf/plat/mem/prdfRestoreDramRepairs.C
@@ -112,17 +112,24 @@ void __calloutDimm( errlHndl_t & io_errl, TargetHandle_t i_portTrgt,
HWAS::DeconfigEnum deconfigPolicy = HWAS::DELAYED_DECONFIG;
HWAS::GARD_ErrorType gardPolicy = HWAS::GARD_Predictive;
+ #ifdef CONFIG_NVDIMM
// If the DIMM is an NVDIMM, change the gard and deconfig options to no
- // gard/deconfig and set the appropriate attribute to indicate a
+ // gard/deconfig and call nvdimmNotifyProtChange to indicate a
// save/restore may work
if ( isNVDIMM(i_dimmTrgt) )
{
deconfigPolicy = HWAS::NO_DECONFIG;
gardPolicy = HWAS::GARD_NULL;
- i_dimmTrgt->setAttr<ATTR_NV_STATUS_FLAG>(0x40);
+ uint32_t l_rc = PlatServices::nvdimmNotifyProtChange( i_dimmTrgt,
+ NVDIMM::NVDIMM_RISKY_HW_ERROR );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_TRAC( PRDF_FUNC "nvdimmNotifyProtChange(0x%08x) "
+ "failed.", PlatServices::getHuid(i_dimmTrgt) );
+ }
}
-
+ #endif
io_errl->addHwCallout( i_dimmTrgt, HWAS::SRCI_PRIORITY_HIGH,
deconfigPolicy, gardPolicy );
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.C b/src/usr/diag/prdf/plat/prdfPlatServices.C
index 1a79ffc5e..a4044e596 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices.C
+++ b/src/usr/diag/prdf/plat/prdfPlatServices.C
@@ -739,6 +739,32 @@ bool isRowRepairEnabled<TYPE_OCMB_CHIP>( ExtensibleChip * i_chip,
#undef PRDF_FUNC
}
+//------------------------------------------------------------------------------
+
+#ifdef CONFIG_NVDIMM
+uint32_t nvdimmNotifyProtChange( TARGETING::TargetHandle_t i_target,
+ const NVDIMM::nvdimm_protection_t i_state )
+{
+ #define PRDF_FUNC "[PlatServices::nvdimmNotifyProtChange] "
+
+ uint32_t o_rc = SUCCESS;
+
+ errlHndl_t errl = NVDIMM::notifyNvdimmProtectionChange( i_target, i_state );
+ if ( nullptr != errl )
+ {
+ PRDF_ERR( PRDF_FUNC "NVDIMM::notifyNvdimmProtectionChange(0x%08x) "
+ "failed.", getHuid(i_target) );
+ PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
+ o_rc = FAIL;
+ }
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+
+}
+#endif
+
//##############################################################################
//## Nimbus Maintenance Command wrappers
//##############################################################################
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.H b/src/usr/diag/prdf/plat/prdfPlatServices.H
index e1710119c..78b57e688 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices.H
+++ b/src/usr/diag/prdf/plat/prdfPlatServices.H
@@ -53,6 +53,10 @@
#include <prdfBitString.H>
#include <mem/prdfMemRank.H>
+#ifdef CONFIG_NVDIMM
+#include <isteps/nvdimm/nvdimm.H>
+#endif
+
//------------------------------------------------------------------------------
namespace PRDF
@@ -169,6 +173,17 @@ uint32_t getMemAddrRange( ExtensibleChip * i_chip,
template<TARGETING::TYPE T>
bool isRowRepairEnabled( ExtensibleChip * i_chip, const MemRank & i_rank );
+#ifdef CONFIG_NVDIMM
+/**
+ * @brief Notify PHYP/Hostboot of NVDIMM protection status
+ *
+ * @param i_target Processor with NVDIMM
+ * @param i_state Protection state of NVDIMM
+ */
+uint32_t nvdimmNotifyProtChange( TARGETING::Target * i_target,
+ const NVDIMM::nvdimm_protection_t i_state );
+#endif
+
//##############################################################################
//## Nimbus/Centaur Maintenance Command wrappers
//##############################################################################
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C
index 0751fb693..ba979a608 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C
+++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C
@@ -105,30 +105,6 @@ void sendPredDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr )
__dyndealloc( i_saddr, i_eaddr, MEMORY_ERROR_PREDICTIVE );
}
-uint32_t nvdimmNotifyPhypProtChange( TARGETING::TargetHandle_t i_target,
- const NVDIMM::nvdimm_protection_t i_state )
-{
- #define PRDF_FUNC "[PlatServices::nvdimmNotifyPhypProtChange] "
-
- uint32_t o_rc = SUCCESS;
-
-#ifdef CONFIG_NVDIMM
- errlHndl_t errl = NVDIMM::notifyNvdimmProtectionChange( i_target, i_state );
- if ( nullptr != errl )
- {
- PRDF_ERR( PRDF_FUNC "NVDIMM::notifyNvdimmProtectionChange(0x%08x) "
- "failed.", getHuid(i_target) );
- PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- o_rc = FAIL;
- }
-#endif
-
- return o_rc;
-
- #undef PRDF_FUNC
-
-}
-
//##############################################################################
//## Nimbus Maintenance Command wrappers
//##############################################################################
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.H b/src/usr/diag/prdf/plat/prdfPlatServices_rt.H
index 5407c94ad..10f2bc4a2 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.H
+++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.H
@@ -30,7 +30,6 @@
#include <p9_l2err_extract.H>
#include <p9_pm_callout.H>
#include <prdfMemAddress.H>
-#include <isteps/nvdimm/nvdimm.H>
namespace PRDF
{
@@ -65,15 +64,6 @@ void sendDynMemDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr );
*/
void sendPredDeallocRequest( uint64_t i_saddr, uint64_t i_eaddr );
-/**
- * @brief Notify PHYP of NVDIMM protection status
- *
- * @param i_target Processor with NVDIMM
- * @param i_state Protection state of NVDIMM
- */
-uint32_t nvdimmNotifyPhypProtChange( TARGETING::Target * i_target,
- const NVDIMM::nvdimm_protection_t i_state );
-
//##############################################################################
//## Nimbus/Centaur Maintenance Command wrappers
//##############################################################################
diff --git a/src/usr/diag/prdf/prdf_hb_only.mk b/src/usr/diag/prdf/prdf_hb_only.mk
index 666171efa..470349619 100644
--- a/src/usr/diag/prdf/prdf_hb_only.mk
+++ b/src/usr/diag/prdf/prdf_hb_only.mk
@@ -131,10 +131,6 @@ ifeq (${HOSTBOOT_RUNTIME},1)
# plat/
prd_obj += prdfPlatServices_rt.o
-# nvdimm
-prd_vpath += ${ROOTPATH}/src/usr/isteps/nvdimm/
-prd_vpath += ${ROOTPATH}/src/usr/isteps/nvdimm/runtime
-
endif
################################################################################
OpenPOWER on IntegriCloud