summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Phan <cphan@us.ibm.com>2012-11-05 16:06:17 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-11-30 10:55:21 -0600
commitc9b54a8f0440d9d3cace48f5ca6a4c3ab732306b (patch)
treed7eef58d37d862052a9e1943ea9b6a2a1cbb00dd /src
parentadfc8978b0e4e6312d5263ca324ffea341e647a5 (diff)
downloadtalos-hostboot-c9b54a8f0440d9d3cace48f5ca6a4c3ab732306b.tar.gz
talos-hostboot-c9b54a8f0440d9d3cace48f5ca6a4c3ab732306b.zip
PRD: Add Memory Preserving IPL Support
- When one of P8 special checkstop FIR bits are asserted, PRD has to call HWP proc_mpipl_check_eligibility to determine mpipl eligibility. - When it's mpipl eligible, PRD will set dump type to SW_DUMP in the error log. Change-Id: Id86862b73b54e0613de6586898574f738a1b0528 RTC: 51989 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2355 Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Bradley W. Bishop <bradleyb@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2461
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfPlatServices.C31
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfPlatServices.H13
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdf_ras_services.C1
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Proc_acts_PB.rule13
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C51
5 files changed, 98 insertions, 11 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices.C b/src/usr/diag/prdf/common/framework/service/prdfPlatServices.C
index 11785dbfe..b28f1fe22 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices.C
@@ -38,6 +38,8 @@
#include <prdfTrace.H>
#include <fapi.H>
+#include <fapiTarget.H>
+#include <fapiPlatHwpInvoker.H>
#ifdef __HOSTBOOT_MODULE
#include <time.h>
@@ -45,7 +47,6 @@
#include <sys/time.h>
#include <diag/mdia/mdia.H>
#include <diag/mdia/mdiamevent.H>
- #include <fapiPlatHwpInvoker.H>
#include <dimmBadDqBitmapFuncs.H>
#else
#include <iplp_registry.H>
@@ -61,6 +62,7 @@
#include <utillib.H>
#include <rmgrBaseClientLib.H>
#include <services/hwas/hwsvHwAvailSvc.H> // For deconfigureTargetAtRuntime()
+ #include <proc_mpipl_check_eligibility.H>
#endif
//------------------------------------------------------------------------------
@@ -519,6 +521,33 @@ errlHndl_t runtimeDeconfig( TARGETING::TargetHandle_t i_target )
return deconfigureTargetAtRuntime( i_target, DECONFIG_FOR_DUMP );
}
+//------------------------------------------------------------------------------
+
+int32_t checkMpiplEligibility(TARGETING::TargetHandle_t i_procTarget,
+ bool & o_mpiplEligible)
+{
+ int32_t o_rc = SUCCESS;
+ errlHndl_t l_err = NULL;
+ o_mpiplEligible = false;
+
+ FAPI_INVOKE_HWP(
+ l_err,
+ proc_mpipl_check_eligibility,
+ fapi::Target(fapi::TARGET_TYPE_PROC_CHIP, i_procTarget),
+ o_mpiplEligible);
+
+ if(NULL != l_err)
+ {
+ PRDF_ERR( "[PlatServices::checkMpiplEligibility] error [0x%X]"
+ "returned from proc_mpipl_check_eligibility for "
+ "Proc: 0x%08x", l_err->getRC(), getHuid(i_procTarget) );
+ PRDF_COMMIT_ERRL( l_err, ERRL_ACTION_REPORT );
+ o_rc = FAIL;
+ }
+
+ return o_rc;
+}
+
#endif // not __HOSTBOOT_MODULE
} // end namespace PlatServices
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices.H b/src/usr/diag/prdf/common/framework/service/prdfPlatServices.H
index d63700ab2..7147fea79 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices.H
@@ -280,6 +280,19 @@ int32_t getBadDqBitmap( TARGETING::TargetHandle_t i_mbaTarget,
*/
errlHndl_t runtimeDeconfig( TARGETING::TargetHandle_t i_target );
+/**
+ * @brief determine whether a checkstop is eligible for
+ * Memory Preserving IPL
+ *
+ * @param i_procTarget A PROC target
+ * @param o_mpiplMode true for MPIPL and false for no MPIPL
+ *
+ * @return non-SUCCESS for failure, SUCCESS otherwise
+*/
+
+int32_t checkMpiplEligibility(TARGETING::TargetHandle_t i_procTarget,
+ bool & o_mpiplEligible);
+
#endif // not __HOSTBOOT_MODULE
} // end namespace PlatServices
diff --git a/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C b/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
index 7d9707fa2..8f616f68f 100755
--- a/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
+++ b/src/usr/diag/prdf/common/framework/service/prdf_ras_services.C
@@ -906,6 +906,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa(ATTENTION_TYPE attn_type,
#else
hwTableContent l_dumpRequestContent; //not used but needed to call GetDumpRequest
sdc.GetDumpRequest( l_dumpRequestContent, l_dumpHandle );
+ pfaData.MsDumpInfo.DumpContent = l_dumpRequestContent;
#endif
pfaData.MsDumpInfo.DumpId = PlatServices::getHuid(l_dumpHandle);
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Proc_acts_PB.rule b/src/usr/diag/prdf/common/plat/pegasus/Proc_acts_PB.rule
index cdcb22d1e..6c46c0e98 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/Proc_acts_PB.rule
+++ b/src/usr/diag/prdf/common/plat/pegasus/Proc_acts_PB.rule
@@ -1103,7 +1103,7 @@ group gPbCentFir filter singlebit
/** PBCENTFIR[5]
* PB_CENT_CRESP_ADDR_ERROR
*/
- (PbCentFir, bit(5)) ? TBDDefaultCallout;
+ (PbCentFir, bit(5)) ? analyzeMpIPL;
/** PBCENTFIR[6]
* PB_CENT_CRESP_ERROR
@@ -1128,7 +1128,7 @@ group gPbCentFir filter singlebit
/** PBCENTFIR[10]
* PB_CENT_FORCE_MP_IPL
*/
- (PbCentFir, bit(10)) ? TBDDefaultCallout;
+ (PbCentFir, bit(10)) ? analyzeMpIPL;
/** PBCENTFIR[11]
* PB_CENT_FIR_SPARE_0
@@ -2451,4 +2451,11 @@ group gIomcFir_1 filter singlebit
# Actions specific to PB chiplet
################################################################################
-
+/**
+ * Check for Memory Preserving IPL Eligibility
+ * and force a SW_DUMP content for checkstop
+ */
+actionclass analyzeMpIPL
+{
+ funccall("analyzeMpIPL");
+};
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C
index e4fbc0c32..d80db6bdd 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C
@@ -30,6 +30,8 @@
#include <prdfPlatServices.H>
#include <prdfPluginMap.H>
+using namespace TARGETING;
+
namespace PRDF
{
namespace Proc
@@ -257,12 +259,12 @@ int32_t CheckForRecoveredSev(ExtensibleChip * i_chip,
* @param o_externalChips - List of external fabrics driving checkstop.
* @param o_wofValue - Current WOF value (unused for now).
*/
-int32_t GetCheckstopInfo(ExtensibleChip * i_chip,
- bool & o_wasInternal,
- TARGETING::TargetHandleList & o_externalChips,
- uint64_t & o_wofValue)
+int32_t GetCheckstopInfo( ExtensibleChip * i_chip,
+ bool & o_wasInternal,
+ TargetHandleList & o_externalChips,
+ uint64_t & o_wofValue )
{
- using namespace TARGETING; using namespace PlatServices;
+ using namespace PlatServices;
// Clear parameters.
o_wasInternal = false;
@@ -345,8 +347,6 @@ int32_t GetCheckstopInfo(ExtensibleChip * i_chip,
int32_t CoreConfigured(ExtensibleChip * i_chip,
bool & o_isCoreConfigured)
{
- using namespace TARGETING;
-
o_isCoreConfigured = false;
TargetHandleList l_coreList =
@@ -358,5 +358,42 @@ int32_t CoreConfigured(ExtensibleChip * i_chip,
return SUCCESS;
} PRDF_PLUGIN_DEFINE(Proc, CoreConfigured);
+/**
+ * @brief Call HWP and set the right dump type
+ * @param i_chip P8 chip
+ * @param i_sc The step code data struct
+ * @returns Failure or Success
+ * @note
+ */
+int32_t analyzeMpIPL( ExtensibleChip * i_chip,
+ STEP_CODE_DATA_STRUCT & i_sc )
+{
+ int32_t l_rc = SUCCESS;
+
+#ifndef __HOSTBOOT_MODULE
+
+ if (CHECK_STOP == i_sc.service_data->GetAttentionType())
+ {
+ TargetHandle_t l_procTarget = i_chip->GetChipHandle();
+ bool l_mpiplMode = false;
+ l_rc = PlatServices::checkMpiplEligibility(l_procTarget,
+ l_mpiplMode);
+
+ PRDF_TRAC("[analyzeMpIPL] Proc: 0x%08x, l_mpiplMode: %d, "
+ "l_rc: %d", i_chip->GetId(), l_mpiplMode, l_rc);
+
+ if((SUCCESS == l_rc) && (true == l_mpiplMode))
+ {
+ i_sc.service_data->SetDump(CONTENT_SW,
+ l_procTarget);
+ }
+ }
+
+#endif
+
+ return l_rc;
+}
+PRDF_PLUGIN_DEFINE( Proc, analyzeMpIPL );
+
} // end namespace Proc
} // end namespace PRDF
OpenPOWER on IntegriCloud