diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c
index dd3747c1..2d923d8f 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"))) = /**/ "op_occ_190822a\0" /**/ ;
+volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /**/ "op_occ_190910a\0" /**/ ;
#endif
diff --git a/src/occ_gpe0/firdata/firData.c b/src/occ_gpe0/firdata/firData.c
index fc827b0a..84e59d2f 100644
--- a/src/occ_gpe0/firdata/firData.c
+++ b/src/occ_gpe0/firdata/firData.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -823,6 +823,7 @@ void FirData_addTrgtsToPnor( FirData_t * io_fd )
uint32_t i = 0;
for ( i = 0; i < io_fd->hData->chipCount; i++ )
{
+ TRAC_IMP("FirData_addTrgtsToPnor: chip %d", i);
// Keep a pointer of the current chip header.
HOMER_Chip_t * chipHdr = (HOMER_Chip_t *) byteIdx;
byteIdx += sizeof(HOMER_Chip_t);
diff --git a/src/occ_gpe0/firdata/fsi.c b/src/occ_gpe0/firdata/fsi.c
index 767bcf4d..95021d68 100644
--- a/src/occ_gpe0/firdata/fsi.c
+++ b/src/occ_gpe0/firdata/fsi.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -37,6 +37,7 @@
void fsi_recovery()
{
+ TRAC_IMP(">>fsi_recovery");
int32_t rc = SUCCESS;
/* Clear out OPB error */
@@ -48,8 +49,8 @@ void fsi_recovery()
/* Check if we have any errors left */
rc |= xscom_read( OPB_REG_STAT, &scom_data );
- TRACFCOMP( "PIB2OPB Status after cleanup = %08X%08X (rc=%d)",
- (uint32_t)(scom_data >> 32), (uint32_t)scom_data, rc );
+ TRAC_IMP( "<> 32), (uint32_t)scom_data, rc );
}
/**
diff --git a/src/occ_gpe0/firdata/ipmidd.C b/src/occ_gpe0/firdata/ipmidd.C
index 69bf4292..1b2130ab 100644
--- a/src/occ_gpe0/firdata/ipmidd.C
+++ b/src/occ_gpe0/firdata/ipmidd.C
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/ipmidd.C $ */
+/* $Source: src/occ_gpe0/firdata/ipmidd.C $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -107,7 +107,7 @@ int IpmiDD::writeLPC(const uint32_t i_addr,
*/
int IpmiDD::pollCtrl(void)
{
- IPMI_TRAC(">>pollCtrl" );
+ //IPMI_TRAC(">>pollCtrl" );
int rc = 0;
uint8_t ctrl = 0;
@@ -237,9 +237,11 @@ int IpmiDD::send(void)
break;
}
+#if 0
IPMI_TRAC("I> write %x:%x seq %x len %x",
iv_netfun, iv_cmd, iv_seq,
iv_data_len);
+#endif
// If all is well, alert the host we sent bits.
err = writeLPC(REG_CONTROL, CTRL_H2B_ATN);
@@ -374,11 +376,13 @@ int IpmiDD::receive(void)
}
+#if 0
IPMI_TRAC("I> read b2h %x:%x seq %x cc %x",
iv_netfun,
iv_cmd,
iv_seq,
iv_cc);
+#endif
return err;
}
diff --git a/src/occ_gpe0/firdata/ipmidd.H b/src/occ_gpe0/firdata/ipmidd.H
index 18eebbfa..bff9ec59 100644
--- a/src/occ_gpe0/firdata/ipmidd.H
+++ b/src/occ_gpe0/firdata/ipmidd.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/ipmidd.H $ */
+/* $Source: src/occ_gpe0/firdata/ipmidd.H $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -91,8 +91,8 @@ enum {
CTRL_CLR_RD_PTR = (1 << 1),
CTRL_CLR_WR_PTR = (1 << 0),
- IDLE_STATE = (CTRL_B_BUSY | CTRL_B2H_ATN |
- CTRL_SMS_ATN | CTRL_H2B_ATN),
+ // Ignore CTRL_SMS_ATN
+ IDLE_STATE = (CTRL_B_BUSY | CTRL_B2H_ATN | CTRL_H2B_ATN),
// Bit in the INMASK register which signals to the BMC
// to reset it's end of things.
diff --git a/src/occ_gpe0/firdata/lpc.c b/src/occ_gpe0/firdata/lpc.c
index 3f9f1138..c19c7e42 100644
--- a/src/occ_gpe0/firdata/lpc.c
+++ b/src/occ_gpe0/firdata/lpc.c
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/lpc.c $ */
+/* $Source: src/occ_gpe0/firdata/lpc.c $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -241,7 +241,11 @@ errorHndl_t lpc_read( LpcTransType i_type,
/* Poll for completion */
StatusReg_t lpc_status;
l_err = pollComplete( &lpc_cmd, &lpc_status );
- if( l_err ) { break; }
+ if( l_err )
+ {
+ TRAC_ERR("lpc_read: pollComplete failed rc=0x%08x", (uint32_t)l_err);
+ break;
+ }
// Read data from the LPC_DATA_REG
l_err = SCOM_getScom(l_target, LPC_DATA_REG, &l_ret);
diff --git a/src/occ_gpe0/firdata/mboxOverIpmi.C b/src/occ_gpe0/firdata/mboxOverIpmi.C
index c0ee2430..d3bc3130 100644
--- a/src/occ_gpe0/firdata/mboxOverIpmi.C
+++ b/src/occ_gpe0/firdata/mboxOverIpmi.C
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/mboxOverIpmi.C $ */
+/* $Source: src/occ_gpe0/firdata/mboxOverIpmi.C $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -62,11 +62,17 @@ int ipmi_sendCommand(mboxMessage_t *io_msg, int i_arg_size)
do
{
+#if 0
+ rc = l_ipmidd.pollCtrl();
+ TRAC_ERR("ipmi_sendCommand: DUMMY RECEIVE returned rc=%d", rc);
+#endif
+
for(i = 0; i < IPMI_MAX_TRIES; ++i)
{
rc = l_ipmidd.send();
if(rc != RC_IPMIDD_NOT_IDLE)
{
+ // command was sent
break;
}
busy_wait(100); // 100 us
diff --git a/src/occ_gpe0/firdata/pnor_mboxdd.c b/src/occ_gpe0/firdata/pnor_mboxdd.c
index 4251eda9..3961f7ce 100644
--- a/src/occ_gpe0/firdata/pnor_mboxdd.c
+++ b/src/occ_gpe0/firdata/pnor_mboxdd.c
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/pnor_mboxdd.c $ */
+/* $Source: src/occ_gpe0/firdata/pnor_mboxdd.c $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -223,7 +223,7 @@ errorHndl_t writeFlash(pnorMbox_t* i_pnorMbox,
break;
}
- //LPC writes are done via LPC scom interface and can only handle 4
+ //LPC writes are done via LPC scom interface and can only handle 4
//bytes at a time. We write 256 bytes from the previous functions,
// so break up the large write into 4 byte writes
uint32_t l_size_written = 0;
diff --git a/src/occ_gpe0/firdata/pnor_util.c b/src/occ_gpe0/firdata/pnor_util.c
index fb579e21..d5b86f0e 100644
--- a/src/occ_gpe0/firdata/pnor_util.c
+++ b/src/occ_gpe0/firdata/pnor_util.c
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/pnor_util.c $ */
+/* $Source: src/occ_gpe0/firdata/pnor_util.c $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -51,6 +51,14 @@ int32_t pnor_write_8B( uint64_t i_data )
{
int32_t rc = SUCCESS;
+ // 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!");
+ g_write_cache_index = 0;
+ g_next_byte = 0xFFFFFFFF;
+ }
+
if ( (g_next_byte == 0xFFFFFFFF) || /* initialized data */
((g_next_byte + g_pnor_size) < (g_next_byte + 9)) ) /* make sure there is room */
{
@@ -92,7 +100,7 @@ int32_t pnor_write_8B( uint64_t i_data )
g_write_cache );
if ( NO_ERROR != tmp )
{
- TRACFCOMP("pnor_write_8B> writeFlash failed");
+ TRAC_IMP("pnor_write_8B> writeFlash failed");
/* hit an error, stop any more writes from happening */
g_next_byte = 0xFFFFFFFF;
g_pnor_size = 0;
@@ -171,6 +179,7 @@ int32_t PNOR_writeFirData( HOMER_PnorInfo_t i_pnorInfo,
uint64_t dataChunk = 0;
uint32_t sz_dataChunk = sizeof(uint64_t);
+ TRAC_IMP("PNOR_writeFirData: writing %d bytes (%d byte chunks)", i_bufSize, sz_dataChunk);
/* Add PNOR data 8 bytes at a time. */
for ( idx = 0; idx < i_bufSize; idx += sz_dataChunk )
{
@@ -180,7 +189,7 @@ int32_t PNOR_writeFirData( HOMER_PnorInfo_t i_pnorInfo,
rc = pnor_write_8B( dataChunk );
if ( SUCCESS != rc )
{
- TRACFCOMP( "pnor_write_8B() failed during FIR write" );
+ TRAC_ERR( "pnor_write_8B() failed during FIR write" );
break;
}
}
@@ -201,7 +210,7 @@ int32_t PNOR_writeFirData( HOMER_PnorInfo_t i_pnorInfo,
rc = pnor_write_8B( dataChunk );
if ( SUCCESS != rc )
{
- TRACFCOMP( "pnor_write_8B() failed during blank fill" );
+ TRAC_ERR( "pnor_write_8B() failed during blank fill" );
break;
}
}
@@ -215,14 +224,14 @@ int32_t PNOR_writeFirData( HOMER_PnorInfo_t i_pnorInfo,
rc = pnor_write_8B( dataChunk );
if ( SUCCESS != rc )
{
- TRACFCOMP( "pnor_write_8B() failed during ECC fill" );
+ TRAC_ERR( "pnor_write_8B() failed during ECC fill" );
break;
}
}
} while (0);
- TRACFCOMP("<magic );
- printBuffer( readBuffer, wordsReceived );
+ //printBuffer( readBuffer, wordsReceived );
return RC_RESP_MAGIC_WORD_INVALID;
}
@@ -386,7 +405,7 @@ uint32_t readResponse( SCOM_Trgt_t* i_target, FifoCmd_t* i_fifoReqCmd,
{
TRAC_ERR( "readResponse: unexpected response command. cmd=0x%08x",
status->command.u );
- printBuffer( readBuffer, wordsReceived );
+ //printBuffer( readBuffer, wordsReceived );
return RC_RESP_UNEXPECTED_CMD;
}
@@ -414,7 +433,7 @@ uint32_t readResponse( SCOM_Trgt_t* i_target, FifoCmd_t* i_fifoReqCmd,
"primaryStatus=0x%08x secondaryStatus=0x%08x",
i_fifoReqCmd->u, status->primaryStatus,
status->secondaryStatus );
- printBuffer( readBuffer, wordsReceived );
+ //printBuffer( readBuffer, wordsReceived );
return RC_RESP_SCOM_ERROR;
}
@@ -425,7 +444,7 @@ uint32_t readResponse( SCOM_Trgt_t* i_target, FifoCmd_t* i_fifoReqCmd,
TRAC_ERR( "readResponse: unexpected response data size. cmd=0x%08x "
"wordsReceived=%u distance=%u", i_fifoReqCmd->u,
wordsReceived, distance );
- printBuffer( readBuffer, wordsReceived );
+ //printBuffer( readBuffer, wordsReceived );
return RC_RESP_UNEXPECTED_DATA_SIZE;
}
@@ -475,6 +494,7 @@ int32_t putFifoScom(SCOM_Trgt_t* i_target, uint64_t i_addr, uint64_t i_data)
int32_t getFifoScom(SCOM_Trgt_t* i_target, uint64_t i_addr, uint64_t* o_data)
{
uint32_t l_rc = SUCCESS;
+ unsigned int l_cmd_attempts = 0;
struct fifoGetScomRequest l_fifoRequest;
l_fifoRequest.wordCnt = GET_SCOM_REQUEST_WORD_CNT;
@@ -482,6 +502,7 @@ int32_t getFifoScom(SCOM_Trgt_t* i_target, uint64_t i_addr, uint64_t* o_data)
l_fifoRequest.command.s.class = SBE_FIFO_CLASS_SCOM_ACCESS;
l_fifoRequest.command.s.type = SBE_FIFO_CMD_GET_SCOM;
l_fifoRequest.address = i_addr;
+ static unsigned int L_throttle_trace = 0;
do
{
@@ -506,8 +527,15 @@ int32_t getFifoScom(SCOM_Trgt_t* i_target, uint64_t i_addr, uint64_t* o_data)
break;
}
+ ++l_cmd_attempts;
if ( l_rc != SUCCESS )
{
+ if (L_throttle_trace < 5)
+ {
+ TRAC_ERR("getFifoScom: readResponse(0x%08X) try #%d failed with %d... Calling upFifoReset() #%d",
+ i_addr, l_cmd_attempts, l_rc, L_throttle_trace);
+ }
+
// Reset the FIFO for subsequent SCOMs
uint32_t resetRc = upFifoReset(i_target);
if(resetRc == RC_FIFO_TIMEOUT_RESET)
@@ -515,6 +543,17 @@ int32_t getFifoScom(SCOM_Trgt_t* i_target, uint64_t i_addr, uint64_t* o_data)
// timeout msg already traced, Return original fail rc.
break;
}
+
+ if (l_cmd_attempts >= 2)
+ {
+ if (L_throttle_trace < 5)
+ {
+ ++L_throttle_trace;
+ TRAC_ERR("getFifoScom: returning FIFO_TIMEOUT_DN (skipping additional retries)");
+ }
+ l_rc = RC_FIFO_TIMEOUT_DN;
+ break;
+ }
}
} while ( TRUE );
diff --git a/src/occ_gpe0/firdata/sbe_fifo.h b/src/occ_gpe0/firdata/sbe_fifo.h
index 7b6df51c..1464700e 100644
--- a/src/occ_gpe0/firdata/sbe_fifo.h
+++ b/src/occ_gpe0/firdata/sbe_fifo.h
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/firdata/sbe_fifo.h $ */
+/* $Source: src/occ_gpe0/firdata/sbe_fifo.h $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -51,7 +51,9 @@
#define SBE_FIFO_DNFIFO_DATA_OUT 0x00002440
#define NS_PER_MSEC (1000000ull)
#define MAX_UP_FIFO_TIMEOUT_NS 10*NS_PER_MSEC
-#define READ_BUFFER_SIZE 2048
+// 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
#define FIFO_STATUS_MAGIC 0xC0DE
#define SBE_PRI_OPERATION_SUCCESSFUL 0x00
#define SBE_SEC_OPERATION_SUCCESSFUL 0x00
diff --git a/src/occ_gpe0/firdata/scom_trgt.c b/src/occ_gpe0/firdata/scom_trgt.c
index 9eae5a71..46715817 100644
--- a/src/occ_gpe0/firdata/scom_trgt.c
+++ b/src/occ_gpe0/firdata/scom_trgt.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
diff --git a/src/occ_gpe0/firdata/scom_util.c b/src/occ_gpe0/firdata/scom_util.c
index 01024774..3fdc9de1 100644
--- a/src/occ_gpe0/firdata/scom_util.c
+++ b/src/occ_gpe0/firdata/scom_util.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -396,6 +396,11 @@ int32_t SCOM_getScom( SCOM_Trgt_t i_trgt, uint32_t i_addr, uint64_t * o_val )
}
}
+ if (rc != SUCCESS)
+ {
+ TRAC_ERR("SCOM_getScom(0x%08X): returning %d", i_addr, rc);
+ }
+
return rc;
}
@@ -466,7 +471,11 @@ int32_t SCOM_getIdScom( SCOM_Trgt_t i_trgt, uint64_t i_addr, uint32_t * o_val )
{
rc = getscom_abs(trans_addr, &(scomout.data64));
}
- if ( SUCCESS != rc ) return rc;
+ if ( SUCCESS != rc )
+ {
+ TRAC_ERR("SCOM_getIdScom(0x%08X): returning %d", i_addr, rc);
+ return rc;
+ }
/* Check for PIB error. */
if ( scomout.piberr )