summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2019-09-10 16:23:58 -0500
committerChristopher J Cain <cjcain@us.ibm.com>2019-10-23 08:09:43 -0500
commit3ab29212518e6574019fd569588a58cba9ba9823 (patch)
treea45ff50ba0672252ae88a7d6d0af0822336a8828
parente4597ab273f7b0c2b79789c2193b3407a76a2be0 (diff)
downloadtalos-occ-3ab29212518e6574019fd569588a58cba9ba9823.tar.gz
talos-occ-3ab29212518e6574019fd569588a58cba9ba9823.zip
FIR data collection updates
- Update read buffer size - Flush buffer on SBE scom failures - Additional debug data on IPMI failures Change-Id: Ia14551925f491352d0d3b7af566c384bca51bfd0 CQ: SW477678 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83561 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C Shelley <zshelle@us.ibm.com> Reviewed-by: Douglas R Gilbert <dgilbert@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J Cain <cjcain@us.ibm.com>
-rwxr-xr-xsrc/occ_405/occbuildname.c2
-rw-r--r--src/occ_gpe0/firdata/ast_mboxdd.c4
-rw-r--r--src/occ_gpe0/firdata/mboxOverIpmi.C5
-rw-r--r--src/occ_gpe0/firdata/pnor_mboxdd.c2
-rw-r--r--src/occ_gpe0/firdata/pnor_util.c9
-rw-r--r--src/occ_gpe0/firdata/sbe_fifo.c37
-rw-r--r--src/occ_gpe0/firdata/sbe_fifo.h6
7 files changed, 54 insertions, 11 deletions
diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c
index 2d923d8..ef4de9c 100755
--- a/src/occ_405/occbuildname.c
+++ b/src/occ_405/occbuildname.c
@@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) =
#else
-volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_190910a\0" /*</BuildName>*/ ;
+volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_191023a\0" /*</BuildName>*/ ;
#endif
diff --git a/src/occ_gpe0/firdata/ast_mboxdd.c b/src/occ_gpe0/firdata/ast_mboxdd.c
index a9d2c24..2de26fc 100644
--- a/src/occ_gpe0/firdata/ast_mboxdd.c
+++ b/src/occ_gpe0/firdata/ast_mboxdd.c
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/ast_mboxdd.c $ */
+/* $Source: src/occ_gpe0/firdata/ast_mboxdd.c $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
diff --git a/src/occ_gpe0/firdata/mboxOverIpmi.C b/src/occ_gpe0/firdata/mboxOverIpmi.C
index d3bc313..61ab87a 100644
--- a/src/occ_gpe0/firdata/mboxOverIpmi.C
+++ b/src/occ_gpe0/firdata/mboxOverIpmi.C
@@ -86,13 +86,14 @@ int ipmi_sendCommand(mboxMessage_t *io_msg, int i_arg_size)
// It's not clear if the PK trace can be extracted w/o Cronus.
if(i == IPMI_MAX_TRIES)
{
- PK_TRACE("ipmi_sendCommand: cmd 0x%x TIMEOUT waiting to send",
- io_msg->iv_cmd);
rc = RC_IPMIDD_TIMEOUT;
}
if( rc )
{
+ PK_TRACE("ipmi_sendCommand: send of PNOR_CMD failed (cmd 0x%02X, seq=0x%02X, "
+ "data_size=%d, rc=0x%08X)",
+ io_msg->iv_cmd, io_msg->iv_seq, l_data_size, rc);
break;
}
diff --git a/src/occ_gpe0/firdata/pnor_mboxdd.c b/src/occ_gpe0/firdata/pnor_mboxdd.c
index 3961f7c..735d150 100644
--- a/src/occ_gpe0/firdata/pnor_mboxdd.c
+++ b/src/occ_gpe0/firdata/pnor_mboxdd.c
@@ -67,6 +67,7 @@ errorHndl_t hwInit(pnorMbox_t* i_pnorMbox)
l_getInfoMsg.iv_cmd = MBOX_C_GET_MBOX_INFO;
put8(&l_getInfoMsg, 0, 2);
l_arg_size = 1;
+ TRAC_IMP("hwInit: sending GET_MBOX_INFO");
l_err = doMessage(&i_pnorMbox->iv_mbox, &l_getInfoMsg, l_arg_size);
if (l_err)
{
@@ -92,6 +93,7 @@ errorHndl_t hwInit(pnorMbox_t* i_pnorMbox)
mboxMessage_t l_getSizeMsg;
l_getSizeMsg.iv_cmd = MBOX_C_GET_FLASH_INFO;
l_arg_size = 0;
+ TRAC_IMP("hwInit: sending GET_FLASH_INFO");
l_err = doMessage(&i_pnorMbox->iv_mbox, &l_getSizeMsg, l_arg_size);
if (l_err)
{
diff --git a/src/occ_gpe0/firdata/pnor_util.c b/src/occ_gpe0/firdata/pnor_util.c
index d5b86f0..eef69b6 100644
--- a/src/occ_gpe0/firdata/pnor_util.c
+++ b/src/occ_gpe0/firdata/pnor_util.c
@@ -54,7 +54,7 @@ int32_t pnor_write_8B( uint64_t i_data )
// ensure current index is within range
if (g_write_cache_index > PAGE_PROGRAM_BYTES)
{
- TRAC_ERR("pnor_write_8B: ERROR - g_write_cache_index > PAGE_PROGRAM_BYTES!");
+ TRAC_ERR("pnor_write_8B: ERROR - g_write_cache_index (0x%08X) > PAGE_PROGRAM_BYTES!", g_write_cache_index);
g_write_cache_index = 0;
g_next_byte = 0xFFFFFFFF;
}
@@ -62,8 +62,8 @@ int32_t pnor_write_8B( uint64_t i_data )
if ( (g_next_byte == 0xFFFFFFFF) || /* initialized data */
((g_next_byte + g_pnor_size) < (g_next_byte + 9)) ) /* make sure there is room */
{
- PK_TRACE("FAILURE: pnor_write_8B> g_next_byte=%.8X, g_pnor_size=%.8X",
- g_next_byte,g_pnor_size);
+ PK_TRACE("pnor_write_8B: Invalid data - g_next_byte=0x%08X, g_pnor_size=0x%08X",
+ g_next_byte, g_pnor_size);
/* must have been some error in the prep */
return FAIL;
}
@@ -189,7 +189,8 @@ int32_t PNOR_writeFirData( HOMER_PnorInfo_t i_pnorInfo,
rc = pnor_write_8B( dataChunk );
if ( SUCCESS != rc )
{
- TRAC_ERR( "pnor_write_8B() failed during FIR write" );
+ TRAC_ERR("pnor_write_8B() failed during FIR write (rc=0x%08X, idx=%d of %d)",
+ rc, idx, i_bufSize);
break;
}
}
diff --git a/src/occ_gpe0/firdata/sbe_fifo.c b/src/occ_gpe0/firdata/sbe_fifo.c
index f3eb0bf..087dd0f 100644
--- a/src/occ_gpe0/firdata/sbe_fifo.c
+++ b/src/occ_gpe0/firdata/sbe_fifo.c
@@ -37,6 +37,7 @@ enum
RC_RESP_MAGIC_WORD_INVALID = 1004,
RC_RESP_UNEXPECTED_CMD = 1005,
RC_RESP_UNEXPECTED_DATA_SIZE = 1006,
+ RC_RESP_DN_FIFO_READY_TIMEDOUT = 1007,
RC_RESP_SCOM_ERROR = 1010,
@@ -313,6 +314,42 @@ uint32_t readResponse( SCOM_Trgt_t* i_target, FifoCmd_t* i_fifoReqCmd,
uint32_t readBuffer[READ_BUFFER_SIZE];
uint32_t wordsReceived = 0;
+ uint32_t delayTicks = 0;
+ uint32_t fifoNotReady = 1;
+
+ do
+ {
+ // Wait to read data or EOT from the FIFO.
+ uint32_t l_status = 0;
+ l_rc = waitDnFifoReady( i_target, &l_status );
+ if ( SUCCESS != l_rc )
+ {
+ TRAC_ERR("readResponse: waitDnFifoReady failed, rc=%d, status=%d", l_rc, l_status);
+ return l_rc;
+ }
+
+ // Check if DN Stram Fifo is Ready to be read
+ if( l_status & DNFIFO_STATUS_FIFO_EMPTY )
+ {
+ // This means that Down stream buffer is not ready yet..wait for
+ // some more time
+ delayTicks++;
+ if(delayTicks < TimeoutForStartOfTrx)
+ {
+ continue;
+ }
+ else
+ {
+ TRAC_ERR("readResponse: Down Stream Fifo Not Ready yet to "
+ "receive Data, Status Reg [0x%08X]", l_status);
+ return RC_RESP_DN_FIFO_READY_TIMEDOUT;
+ }
+ }
+ else
+ {
+ fifoNotReady = 0; // This will break out of the waiting loop
+ }
+ }while(fifoNotReady); // Waiting loop for start of the transfer
do
{
diff --git a/src/occ_gpe0/firdata/sbe_fifo.h b/src/occ_gpe0/firdata/sbe_fifo.h
index 1464700..de7bd98 100644
--- a/src/occ_gpe0/firdata/sbe_fifo.h
+++ b/src/occ_gpe0/firdata/sbe_fifo.h
@@ -52,12 +52,14 @@
#define NS_PER_MSEC (1000000ull)
#define MAX_UP_FIFO_TIMEOUT_NS 10*NS_PER_MSEC
// READ_BUFFER_SIZE is number of words when reading scom via SBE
-// (2 words of scom data + 3 words of header)
-#define READ_BUFFER_SIZE 5
+// (minimum 6: 2 words of scom data + 3 words of header + 1 EOT)
+#define READ_BUFFER_SIZE 8
#define FIFO_STATUS_MAGIC 0xC0DE
#define SBE_PRI_OPERATION_SUCCESSFUL 0x00
#define SBE_SEC_OPERATION_SUCCESSFUL 0x00
+#define TimeoutForStartOfTrx 0x1000
+
typedef union
{
struct
OpenPOWER on IntegriCloud