summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Stegmiller <bjs@us.ibm.com>2015-08-17 13:50:00 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-09-18 20:25:07 -0500
commitef63b1a277b8ad231b308c0c197d663bd4b0eb13 (patch)
tree7f8384c3d95d4b41e9273911941648ef0700a3e9 /src
parentf945eb6a6bec1076f1b3db00939e6b083d61dcab (diff)
downloadblackbird-hostboot-ef63b1a277b8ad231b308c0c197d663bd4b0eb13.tar.gz
blackbird-hostboot-ef63b1a277b8ad231b308c0c197d663bd4b0eb13.zip
PRDF: Write IPL or RUNTIME flag to PNOR for chkstop handling
Change-Id: I4407c7e58756f51f8be1045e50b885d2b0285752 RTC: 132419 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19858 Tested-by: Jenkins Server Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20541 Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/diag/prdf/prdfPnorFirDataReader.H8
-rw-r--r--src/include/usr/diag/prdf/prdfReadPnorFirData.H5
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C23
-rw-r--r--src/usr/diag/prdf/occ_firdata/firDataConst_common.h7
-rw-r--r--src/usr/diag/prdf/occ_firdata/homerData_common.h3
-rw-r--r--src/usr/diag/prdf/occ_firdata/pnorData_common.h3
-rw-r--r--src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.C6
-rw-r--r--src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C2
-rw-r--r--src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C4
9 files changed, 48 insertions, 13 deletions
diff --git a/src/include/usr/diag/prdf/prdfPnorFirDataReader.H b/src/include/usr/diag/prdf/prdfPnorFirDataReader.H
index 1dc112682..a2b3f46cd 100644
--- a/src/include/usr/diag/prdf/prdfPnorFirDataReader.H
+++ b/src/include/usr/diag/prdf/prdfPnorFirDataReader.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.H $ */
+/* $Source: src/include/usr/diag/prdf/prdfPnorFirDataReader.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
@@ -87,6 +87,12 @@ class PnorFirDataReader
*/
void addFfdc( errlHndl_t io_errl ) const;
+ /**
+ * @brief Get IPL/Runtime state indicator
+ * @return True if we were in IPL state, False if we were in runtime state
+ */
+ bool isIplState() const;
+
private:
PnorTrgtMap iv_trgtRegMap; ///< Register data for each target/address.
diff --git a/src/include/usr/diag/prdf/prdfReadPnorFirData.H b/src/include/usr/diag/prdf/prdfReadPnorFirData.H
index 00e1e9ff0..46a38e01b 100644
--- a/src/include/usr/diag/prdf/prdfReadPnorFirData.H
+++ b/src/include/usr/diag/prdf/prdfReadPnorFirData.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.H $ */
+/* $Source: src/include/usr/diag/prdf/prdfReadPnorFirData.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
@@ -42,8 +42,9 @@ struct PnorFfdc
{
uint8_t trgts; ///< Total number of target in the PNOR data.
bool full; ///< True if the PNOR data was unable to capture all regs.
+ bool iplStateActive; // True if IPL state, false if runtime state
- PnorFfdc() : trgts(0), full(false) {}
+ PnorFfdc() : trgts(0), full(false), iplStateActive(false) {}
PnorFfdc( uint8_t t, bool f ) : trgts(t), full(f) {}
};
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 181a05e73..6471b4955 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -54,6 +54,10 @@
#ifdef __HOSTBOOT_RUNTIME
#include <prdfCenMbaDynMemDealloc_rt.H>
+ #else // Hostboot only
+ #ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS
+ #include <prdfPnorFirDataReader.H>
+ #endif
#endif
#else
@@ -509,15 +513,18 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
#elif !defined(__HOSTBOOT_RUNTIME) // Hostboot only
- // Checkstop analysis is only done at the beginning of the IPL,
- // regardless if the checkstop actually occurred during the IPL or
- // at runtime. We will need to check the IPL state in FIR data to
- // determine when the checkstop occurred.
+ #ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS
- // TODO RTC 119791: With the current implementation we know the
- // checkstop occured at runtime because we currently do not have
- // IPL checkstop analysis support.
- gardPolicy = HWAS::GARD_NULL;
+ // Checkstop analysis is only done at the beginning of the IPL,
+ // regardless if the checkstop actually occurred during the IPL
+ // or at runtime. We will need to check the IPL state in FIR
+ // data to determine when the checkstop occurred.
+
+ // Get access to IPL state info from the FIR data in the PNOR.
+ if ( !(PnorFirDataReader::getPnorFirDataReader().isIplState()) )
+ gardPolicy = HWAS::GARD_NULL;
+
+ #endif
#endif
}
diff --git a/src/usr/diag/prdf/occ_firdata/firDataConst_common.h b/src/usr/diag/prdf/occ_firdata/firDataConst_common.h
index e9c46b04e..16379d97b 100644
--- a/src/usr/diag/prdf/occ_firdata/firDataConst_common.h
+++ b/src/usr/diag/prdf/occ_firdata/firDataConst_common.h
@@ -73,4 +73,11 @@ typedef enum
} RegType_t;
+/** IPL or Runtime flag in HOMER data */
+typedef enum
+{
+ HOMER_RUNTIME_STATE = 0,
+ HOMER_IPL_STATE = 1
+} Homer_IplRuntime_t;
+
#endif // __firDataConst_common_h
diff --git a/src/usr/diag/prdf/occ_firdata/homerData_common.h b/src/usr/diag/prdf/occ_firdata/homerData_common.h
index 13ac20968..aec7dd949 100644
--- a/src/usr/diag/prdf/occ_firdata/homerData_common.h
+++ b/src/usr/diag/prdf/occ_firdata/homerData_common.h
@@ -97,7 +97,8 @@ typedef struct __attribute__((packed))
{
uint32_t header; ///< Magic number to indicate valid data and version
- uint16_t reserved;
+ uint16_t iplState : 1; // Uses enum Homer_iplRuntime_t
+ uint16_t reserved : 15;
uint8_t masterProc; ///< The position of the master PROC
diff --git a/src/usr/diag/prdf/occ_firdata/pnorData_common.h b/src/usr/diag/prdf/occ_firdata/pnorData_common.h
index ec3677a7c..6199433e5 100644
--- a/src/usr/diag/prdf/occ_firdata/pnorData_common.h
+++ b/src/usr/diag/prdf/occ_firdata/pnorData_common.h
@@ -77,7 +77,8 @@ typedef struct __attribute__((packed))
uint32_t trgts : 8; ///< Number of targets with register data
uint32_t full : 1; ///< 1 if PNOR data is full and data may be missing
- uint32_t reserved : 23;
+ uint32_t iplState : 1; ///< Uses enum Homer_iplRuntime_t
+ uint32_t reserved : 22;
} PNOR_Data_t;
diff --git a/src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.C b/src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.C
index 38dfca60d..15c5782af 100644
--- a/src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.C
+++ b/src/usr/diag/prdf/occ_firdata/prdfPnorFirDataReader.C
@@ -137,6 +137,12 @@ void PnorFirDataReader::addFfdc( errlHndl_t io_errl ) const
}
//------------------------------------------------------------------------------
+bool PnorFirDataReader::isIplState() const
+{ // indicates if IPL state or Runtime state when system checkstop'd
+ return( iv_ffdc.iplStateActive );
+}
+
+//------------------------------------------------------------------------------
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C b/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C
index b0edf2a82..d8041f331 100644
--- a/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C
+++ b/src/usr/diag/prdf/occ_firdata/prdfReadPnorFirData.C
@@ -203,6 +203,8 @@ errlHndl_t readPnorFirData( bool & o_validData, PnorTrgtMap & o_trgtMap,
// Gather FFDC from header data.
o_ffdc.trgts = data->trgts;
o_ffdc.full = (0 == data->full) ? false : true;
+ o_ffdc.iplStateActive = (HOMER_IPL_STATE == data->iplState)
+ ? true:false;
// Iterate each target and get the register data.
for ( uint32_t t = 0; t < data->trgts; t++ )
diff --git a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C
index 808c11589..5d6d04ff1 100644
--- a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C
+++ b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C
@@ -739,6 +739,10 @@ errlHndl_t writeHomerFirData( uint8_t * i_hBuf, size_t i_hBufSize,
{
HOMER_Data_t data = HOMER_getData(); // Initializes data
+ // Set flag indicating if IPL or runtime situation.
+ data.iplState = (ALL_HARDWARE == i_curHw)
+ ? HOMER_RUNTIME_STATE : HOMER_IPL_STATE;
+
// Get the PNOR information
errl = getPnorInfo( data );
if ( NULL != errl )
OpenPOWER on IntegriCloud