summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Stegmiller <bjs@us.ibm.com>2018-05-03 10:37:13 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-05-18 12:12:18 -0400
commitc0a78795a8dcf7e1baa2f70aee2d6852261b90bf (patch)
tree167b0a7bcfa98f4dd4151fb15b66ac061c6440ef
parent5ed2437d9ecf5b33050accdd5e1708d9fc0f5084 (diff)
downloadtalos-hostboot-c0a78795a8dcf7e1baa2f70aee2d6852261b90bf.tar.gz
talos-hostboot-c0a78795a8dcf7e1baa2f70aee2d6852261b90bf.zip
PRD: Update TD_CTLR_DATA with port information
Change-Id: Ifb370072fc40ddd09037efc8bea8e50c803cc5a3 RTC: 191193 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58259 Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59017 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfMemLogParse.C47
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfParserEnums.H9
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C44
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C2
4 files changed, 88 insertions, 14 deletions
diff --git a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C
index 92eab3f01..dd3edf56b 100644
--- a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C
+++ b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C
@@ -3413,8 +3413,10 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
enum Version
{
- IPL = 1,
- RT = 2,
+ IPL = 1,
+ RT = 2,
+ IPL_PORTS = 3,
+ RT_PORTS = 4
};
do
@@ -3434,7 +3436,7 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
}
uint32_t curPos = 0;
-
+ uint8_t port = 0x0F; // not valid
//######################################################################
// Header data (18 bits)
@@ -3446,11 +3448,24 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
uint8_t phase = bs.getFieldJustify( curPos, 4 ); curPos+=4;
uint8_t type = bs.getFieldJustify( curPos, 4 ); curPos+=4;
+ // Verify if we have new format with port information
+ bool versWithPorts = ( (IPL_PORTS == version) ||
+ (RT_PORTS == version) ) ? true : false;
+ if ( versWithPorts )
+ {
+ // 0:3 is valid MCA, xF is for MBA case
+ port = bs.getFieldJustify( curPos, 4 ); curPos+=4;
+ } // end if new format with ports
+
const char * version_str = " ";
switch ( version )
{
- case IPL: version_str = "IPL"; break;
- case RT : version_str = "RT "; break;
+ case IPL:
+ case IPL_PORTS:
+ version_str = "IPL"; break;
+ case RT :
+ case RT_PORTS:
+ version_str = "RT "; break;
}
const char * type_str = " ";
@@ -3485,6 +3500,12 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
i_parser.PrintString( " TD Phase", phase_str );
i_parser.PrintString( " Target Rank", rank_str );
+ // Do we actually have MCA port number ?
+ if ( versWithPorts )
+ {
+ i_parser.PrintNumber( " Port Num ", "%d", port );
+ } // end if MCA (not MBA)
+
//######################################################################
// TD Request Queue (min 4 bits, max 164 bits)
@@ -3504,6 +3525,12 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
uint8_t queueSrnk = bs.getFieldJustify( curPos, 3 ); curPos+=3;
uint8_t queueType = bs.getFieldJustify( curPos, 4 ); curPos+=4;
+ // Verify if we have new format with port information
+ if ( versWithPorts )
+ {
+ port = bs.getFieldJustify( curPos, 4 ); curPos+=4;
+ } // end if new format with ports
+
const char * type_str = " ";
switch ( queueType )
{
@@ -3524,7 +3551,17 @@ bool parseTdCtlrStateData( uint8_t * i_buffer, uint32_t i_buflen,
}
char data[DATA_SIZE] = "";
+
+ // Verify if we have valid port information
+ if ( versWithPorts )
+ {
+ snprintf( data, DATA_SIZE, "%s on %s Port:%d",
+ type_str, rank_str, port );
+ } // end if MCA (not MBA)
+ else
+ {
snprintf( data, DATA_SIZE, "%s on %s", type_str, rank_str );
+ } // end if MCA (not MBA)
i_parser.PrintString( " TD Request", data );
}
diff --git a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H
index a9ff6591a..b0f44b557 100644
--- a/src/usr/diag/prdf/common/plugins/prdfParserEnums.H
+++ b/src/usr/diag/prdf/common/plugins/prdfParserEnums.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -341,8 +341,11 @@ namespace TD_CTLR_DATA
// is non-zero when we add the tdCtlr state to the capture data
enum Version
{
- IPL = 1,
- RT = 2,
+ IPL = 1,
+ RT = 2,
+ // These 2 versions include the MCA port number
+ IPL_PORTS = 3,
+ RT_PORTS = 4
};
} // namespace TD_CTLR_DATA
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
index cad88c66c..410ef7ac8 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
@@ -394,27 +394,37 @@ void MemTdCtlr<T>::collectStateCaptureData( STEP_CODE_DATA_STRUCT & io_sc,
{
#define PRDF_FUNC "[MemTdCtlr<T>::collectStateCaptureData] "
+ ExtensibleChip *l_memChip = nullptr;
+
// Get the number of entries in the TD queue (limit 15)
TdQueue::Queue queue = iv_queue.getQueue();
uint8_t queueCount = queue.size();
if ( 15 < queueCount ) queueCount = 15;
// Get the buffer
- uint32_t bitLen = 22 + queueCount*10; // Header + TD queue
+ uint32_t bitLen = 32 + queueCount*14; // Header + TD queue
BitStringBuffer bsb( bitLen );
uint32_t curPos = 0;
+ uint8_t filler = 0x00;
//######################################################################
- // Header data (18 bits)
+ // Header data (28 bits) - 6 bits currently unused (filler)
//######################################################################
- // Specifies running at IPL. Also ensures our data is non-zero. 4-bit
- bsb.setFieldJustify( curPos, 4, TD_CTLR_DATA::Version::IPL ); curPos+=4;
+ // Specifies when running. Also ensures our data is non-zero. 4-bit
+ #ifndef __HOSTBOOT_RUNTIME
+ bsb.setFieldJustify( curPos, 4, TD_CTLR_DATA::Version::IPL_PORTS );
+ curPos+=4;
+ #else
+ bsb.setFieldJustify( curPos, 4, TD_CTLR_DATA::Version::RT_PORTS );
+ curPos+=4;
+ #endif
uint8_t mrnk = 0;
uint8_t srnk = 0;
uint8_t phase = TdEntry::Phase::TD_PHASE_0;
uint8_t type = TdEntry::TdType::INVALID_EVENT;
+ uint8_t port = 0;
if ( nullptr != iv_curProcedure )
{
@@ -422,15 +432,26 @@ void MemTdCtlr<T>::collectStateCaptureData( STEP_CODE_DATA_STRUCT & io_sc,
srnk = iv_curProcedure->getRank().getSlave(); // 3-bit
phase = iv_curProcedure->getPhase(); // 4-bit
type = iv_curProcedure->getType(); // 4-bit
- }
+
+ // Want MCA port number (if any)
+ l_memChip = iv_curProcedure->getChip();
+ if ( TYPE_MCA == l_memChip->getType() )
+ {
+ port = l_memChip->getPos() % MAX_MCA_PER_MCBIST; // 2-bit
+ } // if MCBIST
+
+ } // if Non-Null iv_curProcedure
bsb.setFieldJustify( curPos, 3, mrnk ); curPos+=3;
bsb.setFieldJustify( curPos, 3, srnk ); curPos+=3;
bsb.setFieldJustify( curPos, 4, phase ); curPos+=4;
bsb.setFieldJustify( curPos, 4, type ); curPos+=4;
+ bsb.setFieldJustify( curPos, 4, port ); curPos+=4;
+ bsb.setFieldJustify( curPos, 6, filler); curPos+=6;
+
//######################################################################
- // TD Request Queue (min 4 bits, max 164 bits)
+ // TD Request Queue (min 4 bits, max 228 bits)
//######################################################################
bsb.setFieldJustify( curPos, 4, queueCount ); curPos+=4; // 4-bit
@@ -441,9 +462,20 @@ void MemTdCtlr<T>::collectStateCaptureData( STEP_CODE_DATA_STRUCT & io_sc,
uint8_t itSrnk = queue[n]->getRank().getSlave(); // 3-bit
uint8_t itType = queue[n]->getType(); // 4-bit
+ l_memChip = queue[n]->getChip();
+ if ( TYPE_MCA == l_memChip->getType() )
+ {
+ port = l_memChip->getPos() % MAX_MCA_PER_MCBIST; // 2-bit
+ }
+ else
+ {
+ port = 0xFF;
+ }
+
bsb.setFieldJustify( curPos, 3, itMrnk ); curPos+=3;
bsb.setFieldJustify( curPos, 3, itSrnk ); curPos+=3;
bsb.setFieldJustify( curPos, 4, itType ); curPos+=4;
+ bsb.setFieldJustify( curPos, 4, port ); curPos+=4;
}
//######################################################################
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index a1300496c..0c329f89b 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -214,6 +214,8 @@ uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc )
// relevant registers that may have changed since the initial capture.
__recaptureRegs<T>( io_sc, iv_chip );
+ collectStateCaptureData( io_sc, TD_CTLR_DATA::START );
+
// It is possible that background scrub could have found an ECC error
// before we had a chance to stop the command. Therefore, we need to
// call analyzeCmdComplete() first so that any ECC errors found can be
OpenPOWER on IntegriCloud