summaryrefslogtreecommitdiffstats
path: root/sbe
diff options
context:
space:
mode:
authorShakeeb <shakeebbk@in.ibm.com>2016-08-09 02:58:05 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-08-23 01:20:00 -0400
commit3b2f52f3bbefc109ddd92d9b1289aa6f7a4afe6a (patch)
tree9e68e5a2cdcd47ad05a5173cfb0433cfa9357c47 /sbe
parentbed32d51f2459bc4bfe8cfca51f25648eaa429ba (diff)
downloadtalos-sbe-3b2f52f3bbefc109ddd92d9b1289aa6f7a4afe6a.tar.gz
talos-sbe-3b2f52f3bbefc109ddd92d9b1289aa6f7a4afe6a.zip
Reducing debug logs
Change-Id: Iacdb7358d3d428dda53f26e215aa701e007bb55d RTC: 159709 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28032 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'sbe')
-rw-r--r--sbe/image/img_defs.mk9
-rw-r--r--sbe/sbefw/pool.C30
-rw-r--r--sbe/sbefw/sbeFFDC.C7
-rw-r--r--sbe/sbefw/sbeFifoMsgUtils.C2
-rw-r--r--sbe/sbefw/sbecmdcntlinst.C4
-rw-r--r--sbe/sbefw/sbecmdcntrldmt.C4
-rw-r--r--sbe/sbefw/sbecmdgeneric.C1
-rw-r--r--sbe/sbefw/sbecmdiplcontrol.C31
-rw-r--r--sbe/sbefw/sbecmdmemaccess.C21
-rw-r--r--sbe/sbefw/sbecmdparser.C12
-rw-r--r--sbe/sbefw/sbecmdprocessor.C23
-rw-r--r--sbe/sbefw/sbecmdregaccess.C3
-rw-r--r--sbe/sbefw/sbecmdringaccess.C3
-rw-r--r--sbe/sbefw/sbecmdscomaccess.C6
-rw-r--r--sbe/sbefw/sbecmdsram.C2
-rw-r--r--sbe/sbefw/sbefifo.H28
-rw-r--r--sbe/sbefw/sbemain.C3
-rw-r--r--sbe/sbefw/sberegaccess.C4
-rw-r--r--sbe/sbefw/sbetrace.H65
19 files changed, 172 insertions, 86 deletions
diff --git a/sbe/image/img_defs.mk b/sbe/image/img_defs.mk
index 42c12d82..53137b26 100644
--- a/sbe/image/img_defs.mk
+++ b/sbe/image/img_defs.mk
@@ -276,6 +276,14 @@ ifdef FAPI_TRACE_LEVEL_ENV
FAPI_TRACE_LEVEL_DEF = $(FAPI_TRACE_LEVEL_ENV)
endif
+# Levels of SBE logging
+# 0 - No tracing
+# 1 - Error
+# 2 - Error, info
+# 3 - Error, info, entry/exit
+# 4 - Error, info, entry/exit, debug
+SBE_TRACE_LEVEL_DEF = 3
+
GCC-DEFS += -DIMAGE_NAME=$(IMAGE_SEEPROM_NAME)
GCC-DEFS += -DPK_TIMER_SUPPORT=$(PK_TIMER_SUPPORT)
GCC-DEFS += -DPK_THREAD_SUPPORT=$(PK_THREAD_SUPPORT)
@@ -287,6 +295,7 @@ GCC-DEFS += -D__SBE__=1
GCC-DEFS += -D__PPE__=1
GCC-DEFS += -DMINIMUM_FFDC=1
GCC-DEFS += -DFAPI_TRACE_LEVEL=$(FAPI_TRACE_LEVEL_DEF)
+GCC-DEFS += -DSBE_TRACE_LEVEL=$(SBE_TRACE_LEVEL_DEF)
# use the default settings in the code unless a size is defined
ifdef PK_TRACE_SZ
GCC-DEFS += -DPK_TRACE_SZ=$(PK_TRACE_SZ)
diff --git a/sbe/sbefw/pool.C b/sbe/sbefw/pool.C
index 6f5acf24..314c9b72 100644
--- a/sbe/sbefw/pool.C
+++ b/sbe/sbefw/pool.C
@@ -1,3 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/sbefw/pool.C $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
#include <stdint.h>
#include <sbetrace.H>
#include <stddef.h>
@@ -21,7 +45,7 @@ vectorMemPool_t * allocMem()
break;
}
}
- SBE_TRACE(" Giving pool 0x%08X", pool);
+ SBE_DEBUG(" Giving pool 0x%08X", pool);
return pool;
}
@@ -33,9 +57,9 @@ void releaseMem( vectorMemPool_t * i_pool )
// Assert here. This pool was not supposed to be in use.
assert( 0 != i_pool->refCount )
- SBE_TRACE(" Releasing pool 0x%08X", i_pool);
+ SBE_DEBUG(" Releasing pool 0x%08X", i_pool);
i_pool->refCount--;
- SBE_TRACE(" In releaseMem() RefCount:%u", i_pool->refCount);
+ SBE_DEBUG(" In releaseMem() RefCount:%u", i_pool->refCount);
}while(0);
}
diff --git a/sbe/sbefw/sbeFFDC.C b/sbe/sbefw/sbeFFDC.C
index c43a7031..2fd738e1 100644
--- a/sbe/sbefw/sbeFFDC.C
+++ b/sbe/sbefw/sbeFFDC.C
@@ -60,7 +60,7 @@ uint32_t SbeFFDCPackage::sendOverFIFO(uint32_t i_primStatus,
//check if SBE internal FFDC should be generated
if(SbeRegAccess::theSbeRegAccess().isSendInternalFFDCSet() == false)
{
- SBE_DEBUG(SBE_FUNC" isSendInternalFFDCSet()=false, "
+ SBE_INFO(SBE_FUNC" isSendInternalFFDCSet()=false, "
"not generating SBE InternalFFDC");
rc = SBE_SEC_OPERATION_SUCCESSFUL;
break;
@@ -86,9 +86,6 @@ uint32_t SbeFFDCPackage::sendOverFIFO(uint32_t i_primStatus,
}
}
- SBE_DEBUG(SBE_FUNC "length of FFDC package in words [%d]",
- (uint32_t)(iv_sbeFFDCHeader.lenInWords));
-
//Send FFDC package header
length = sizeof(iv_sbeFFDCHeader) / sizeof(uint32_t);
rc = sbeDownFifoEnq_mult(length,
@@ -136,7 +133,7 @@ uint32_t SbeFFDCPackage::sendOverFIFO(uint32_t i_primStatus,
}
}
- SBE_DEBUG(SBE_FUNC "Number of words sent [%d]", o_bytesSent);
+ SBE_INFO(SBE_FUNC "Number of words sent [%d]", o_bytesSent);
} while(false);
SBE_EXIT(SBE_FUNC);
diff --git a/sbe/sbefw/sbeFifoMsgUtils.C b/sbe/sbefw/sbeFifoMsgUtils.C
index 1090a7ba..933e6289 100644
--- a/sbe/sbefw/sbeFifoMsgUtils.C
+++ b/sbe/sbefw/sbeFifoMsgUtils.C
@@ -147,7 +147,6 @@ uint32_t sbeUpFifoDeq_mult (uint32_t &io_len,
// if Upstream FIFO is empty,
if (l_data.statusOrReserved.fifo_empty)
{
- //SBE_DEBUG(SBE_FUNC"Downstream FIFO is empty. Sleeping for 1 ms");
pk_sleep(PK_MILLISECONDS(FIFO_WAIT_SLEEP_TIME));
continue;
}
@@ -207,7 +206,6 @@ uint32_t sbeDownFifoEnq_mult (uint32_t &io_len,
if (l_status.downfifo_status.fifo_full)
{
// Downstream FIFO is full
- //SBE_DEBUG(SBE_FUNC"Downstream FIFO is full. Sleeping for 1 ms");
pk_sleep(PK_MILLISECONDS(FIFO_WAIT_SLEEP_TIME));
continue;
}
diff --git a/sbe/sbefw/sbecmdcntlinst.C b/sbe/sbefw/sbecmdcntlinst.C
index e1d0a3bd..ab138f69 100644
--- a/sbe/sbefw/sbecmdcntlinst.C
+++ b/sbe/sbefw/sbecmdcntlinst.C
@@ -105,7 +105,7 @@ uint32_t sbeCntlInst(uint8_t *i_pArg)
break;
}
- SBE_DEBUG("mode[0x%04X] coreChipletId[0x%08X] threadNum[0x%04X] "
+ SBE_INFO("mode[0x%04X] coreChipletId[0x%08X] threadNum[0x%04X] "
"threadOps[0x%04X] ", l_req.mode, l_req.coreChipletId,
l_req.threadNum, l_req.threadOps);
@@ -159,7 +159,7 @@ uint32_t sbeCntlInst(uint8_t *i_pArg)
{
// No need to delete the l_fapiRc handle,it will get
// over-written
- SBE_DEBUG(SBE_FUNC "Continuing in case of HW Errors"
+ SBE_INFO(SBE_FUNC "Continuing in case of HW Errors"
" As user has passed to ignore errors.");
continue;
}
diff --git a/sbe/sbefw/sbecmdcntrldmt.C b/sbe/sbefw/sbecmdcntrldmt.C
index ff14c11a..2720b943 100644
--- a/sbe/sbefw/sbecmdcntrldmt.C
+++ b/sbe/sbefw/sbecmdcntrldmt.C
@@ -216,7 +216,7 @@ uint32_t sbeStopCntlDmt()
// returns error code.
if(false == g_SbeDmtTimerExpired)
{
- SBE_DEBUG(SBE_FUNC " DmTimer hasn't expired yet.. stop it");
+ SBE_INFO(SBE_FUNC " DmTimer hasn't expired yet.. stop it");
l_pkRc = pk_timer_cancel(&g_sbe_pk_dmt_timer);
if(l_pkRc)
{
@@ -292,7 +292,7 @@ uint32_t sbeControlDeadmanTimer (uint8_t *i_pArg)
}
else
{
- SBE_DEBUG(SBE_DEBUG" Not a valid command ");
+ SBE_ERROR(SBE_FUNC" Not a valid command ");
l_rc = SBE_SEC_COMMAND_NOT_SUPPORTED;
}
}while(0); // End of do-while
diff --git a/sbe/sbefw/sbecmdgeneric.C b/sbe/sbefw/sbecmdgeneric.C
index 54c1553d..97960699 100644
--- a/sbe/sbefw/sbecmdgeneric.C
+++ b/sbe/sbefw/sbecmdgeneric.C
@@ -80,7 +80,6 @@ sbeCapabilityRespMsg::sbeCapabilityRespMsg()
uint32_t sbeGetCapabilities (uint8_t *i_pArg)
{
#define SBE_FUNC "sbeGetCapabilities "
- SBE_DEBUG(SBE_FUNC);
uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL;
uint32_t len = 0;
sbeRespGenHdr_t respHdr;
diff --git a/sbe/sbefw/sbecmdiplcontrol.C b/sbe/sbefw/sbecmdiplcontrol.C
index 0b6418b4..82252d7c 100644
--- a/sbe/sbefw/sbecmdiplcontrol.C
+++ b/sbe/sbefw/sbecmdiplcontrol.C
@@ -263,7 +263,7 @@ static istepMap_t g_istep5PtrTbl[ ISTEP5_MAX_SUBSTEPS ]
uint32_t sbeHandleIstep (uint8_t *i_pArg)
{
#define SBE_FUNC "sbeHandleIstep "
- SBE_DEBUG(SBE_FUNC);
+ SBE_ENTER(SBE_FUNC);
uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL;
ReturnCode fapiRc = FAPI2_RC_SUCCESS;
uint32_t len = 0;
@@ -286,9 +286,6 @@ uint32_t sbeHandleIstep (uint8_t *i_pArg)
break;
}
- SBE_DEBUG(SBE_FUNC"Major number:0x%08x minor number:0x%08x",
- req.major, req.minor );
-
if( false == validateIstep( req.major, req.minor ) )
{
SBE_ERROR(SBE_FUNC" Invalid Istep. major:0x%08x"
@@ -329,6 +326,7 @@ uint32_t sbeHandleIstep (uint8_t *i_pArg)
{
SBE_ERROR( SBE_FUNC"Failed. rc[0x%X]", rc);
}
+ SBE_EXIT(SBE_FUNC);
return rc;
#undef SBE_FUNC
}
@@ -342,7 +340,7 @@ uint32_t sbeHandleIstep (uint8_t *i_pArg)
ReturnCode sbeExecuteIstep (const uint8_t i_major, const uint8_t i_minor)
{
#define SBE_FUNC "sbeExecuteIstep "
- SBE_DEBUG(SBE_FUNC"Major number:0x%x minor number:0x%x",
+ SBE_INFO(SBE_FUNC"Major number:0x%x minor number:0x%x",
i_major, i_minor );
ReturnCode rc = FAPI2_RC_SUCCESS;
@@ -457,7 +455,7 @@ bool validateIstep (const uint8_t i_major, const uint8_t i_minor)
ReturnCode istepAttrSetup( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepAttrSetup");
+ SBE_ENTER("istepAttrSetup");
Target<TARGET_TYPE_PROC_CHIP > proc = plat_getChipTarget();
ReturnCode rc = FAPI2_RC_SUCCESS;
do
@@ -471,6 +469,7 @@ ReturnCode istepAttrSetup( sbeIstepHwp_t i_hwp)
// Apply the gard records
rc = plat_ApplyGards();
}while(0);
+ SBE_EXIT("istepAttrSetup");
return rc;
}
@@ -478,7 +477,6 @@ ReturnCode istepAttrSetup( sbeIstepHwp_t i_hwp)
ReturnCode istepWithProc( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithProc");
Target<TARGET_TYPE_PROC_CHIP > proc = plat_getChipTarget();
assert( NULL != i_hwp.procHwp );
return i_hwp.procHwp(proc);
@@ -488,7 +486,6 @@ ReturnCode istepWithProc( sbeIstepHwp_t i_hwp)
ReturnCode istepSelectEx( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithProc");
Target<TARGET_TYPE_PROC_CHIP > proc = plat_getChipTarget();
// TODO via RTC 135345
// Once multicast targets are supported, we may need to pass
@@ -501,7 +498,6 @@ ReturnCode istepSelectEx( sbeIstepHwp_t i_hwp)
ReturnCode istepWithEq( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithEq");
// TODO via RTC 135345
// Curently we are passing Hard code eq target. Finally it is
// going to be a multicast target. Once multicast support is
@@ -524,7 +520,6 @@ ReturnCode istepWithEq( sbeIstepHwp_t i_hwp)
ReturnCode istepWithCore( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithCore");
// TODO via RTC 135345
// Curently we are passing Hard code core target. Finally it is
// going to be a multicast target. Once multicast support is
@@ -546,7 +541,7 @@ ReturnCode istepWithCore( sbeIstepHwp_t i_hwp)
ReturnCode istepWithEqConditional( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithEqCondtional");
+ SBE_ENTER("istepWithEqCondtional");
fapi2::Target<fapi2::TARGET_TYPE_SYSTEM > sysTgt;
ReturnCode rc = FAPI2_RC_SUCCESS;
do
@@ -559,6 +554,7 @@ ReturnCode istepWithEqConditional( sbeIstepHwp_t i_hwp)
}
rc = istepWithEq(i_hwp);
}while(0);
+ SBE_EXIT("istepWithEqCondtional");
return rc;
}
@@ -566,7 +562,7 @@ ReturnCode istepWithEqConditional( sbeIstepHwp_t i_hwp)
ReturnCode istepWithCoreConditional( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepWithCoreCondtional");
+ SBE_ENTER("istepWithCoreCondtional");
fapi2::Target<fapi2::TARGET_TYPE_SYSTEM > sysTgt;
ReturnCode rc = FAPI2_RC_SUCCESS;
do
@@ -579,6 +575,7 @@ ReturnCode istepWithCoreConditional( sbeIstepHwp_t i_hwp)
}
rc = istepWithCore(i_hwp);
}while(0);
+ SBE_EXIT("istepWithCoreCondtional");
return rc;
}
@@ -621,6 +618,7 @@ ReturnCode istepCheckSbeMaster( sbeIstepHwp_t i_hwp)
ReturnCode rc = FAPI2_RC_SUCCESS;
g_sbeRole = SbeRegAccess::theSbeRegAccess().isSbeSlave() ?
SBE_ROLE_SLAVE : SBE_ROLE_MASTER;
+ SBE_INFO("stepCheckSbeMaster g_sbeRole [%x]", g_sbeRole);
if(SBE_ROLE_SLAVE == g_sbeRole)
{
(void)SbeRegAccess::theSbeRegAccess().stateTransition(
@@ -632,7 +630,7 @@ ReturnCode istepCheckSbeMaster( sbeIstepHwp_t i_hwp)
//----------------------------------------------------------------------------
ReturnCode istepNoOp( sbeIstepHwp_t i_hwp)
{
- SBE_DEBUG("istepNoOp");
+ SBE_INFO("istepNoOp");
return FAPI2_RC_SUCCESS ;
}
@@ -686,7 +684,7 @@ uint32_t sbeContinueBoot (uint8_t *i_pArg)
}
else
{
- SBE_DEBUG(SBE_FUNC"Continuous IPL Mode set... IPLing");
+ SBE_INFO(SBE_FUNC"Continuous IPL Mode set... IPLing");
(void)SbeRegAccess::theSbeRegAccess().stateTransition(
SBE_CONTINUE_BOOT_PLCK_EVENT);
sbeDoContinuousIpl();
@@ -702,7 +700,7 @@ uint32_t sbeContinueBoot (uint8_t *i_pArg)
void sbeDoContinuousIpl()
{
#define SBE_FUNC "sbeDoContinuousIpl "
- SBE_DEBUG(SBE_FUNC);
+ SBE_ENTER(SBE_FUNC);
ReturnCode l_rc = FAPI2_RC_SUCCESS;
do
{
@@ -741,7 +739,7 @@ void sbeDoContinuousIpl()
l_rc = sbeExecuteIstep(l_major, l_minor);
if(l_rc != FAPI2_RC_SUCCESS)
{
- SBE_DEBUG(SBE_FUNC"Failed istep execution in plck mode: "
+ SBE_ERROR(SBE_FUNC"Failed istep execution in plck mode: "
"Major: %d, Minor: %d", l_major, l_minor);
l_done = true;
break;
@@ -759,6 +757,7 @@ void sbeDoContinuousIpl()
} while(false);
// Store l_rc in a global variable that will be a part of the SBE FFDC
g_iplFailRc = l_rc;
+ SBE_EXIT(SBE_FUNC);
#undef SBE_FUNC
}
diff --git a/sbe/sbefw/sbecmdmemaccess.C b/sbe/sbefw/sbecmdmemaccess.C
index 7aa52a8a..d23d2933 100644
--- a/sbe/sbefw/sbecmdmemaccess.C
+++ b/sbe/sbefw/sbecmdmemaccess.C
@@ -246,9 +246,9 @@ uint32_t constructAduFlag(const sbeMemAccessReqMsgHdr_t & i_hdr,
(SBE_ADU_LOCK_TRIES << ADU_LOCK_TRIES_SHIFT) );
// 4-bit Lock Tries at 19-18-17-16 bits
- SBE_DEBUG(SBE_FUNC "Cache[%d] Itag[%d] AutoIncr[%d] FastMode[%d] ",
+ SBE_INFO(SBE_FUNC "Cache[%d] Itag[%d] AutoIncr[%d] FastMode[%d] ",
l_isCacheInhibitMode,l_isItagBit,l_isAutoIncr,l_isFastMode);
- SBE_DEBUG(SBE_FUNC "EccRequiredMode[%d] EccOverrideMode[%d] EccOverrideByte"
+ SBE_INFO(SBE_FUNC "EccRequiredMode[%d] EccOverrideMode[%d] EccOverrideByte"
"[0x%02X] AduSetupFlag[0x%04X]",l_isEccRequiredMode,l_isEccOverrideMode,
i_hdr.eccByte, l_aduSetupFlag);
@@ -302,7 +302,7 @@ uint32_t processPbaRequest(const sbeMemAccessReqMsgHdr_t &i_hdr,
}
// By default, ex_chipletId printed below won't be used unless accompanied
// by LCO_mode.
- SBE_DEBUG(SBE_FUNC "FAST_Mode[%d] LCO_Mode[%d] EX_ChipletId[%d]",
+ SBE_INFO(SBE_FUNC "FAST_Mode[%d] LCO_Mode[%d] EX_ChipletId[%d]",
l_isFastMode, l_isLcoMode, (i_hdr.coreChipletId)/2);
// The max granule size for which the ADU/PBA interface if configured
@@ -340,7 +340,7 @@ uint32_t processPbaRequest(const sbeMemAccessReqMsgHdr_t &i_hdr,
// Assumption is Hwp won't return zero for Num Granules
assert(0 != l_numGranules);
- SBE_DEBUG(SBE_FUNC "Hwp returned l_numGranules=[0x%08X]",l_numGranules);
+ SBE_INFO(SBE_FUNC "Hwp returned l_numGranules=[0x%08X]",l_numGranules);
uint64_t l_numAcc = 0;
if (l_numGranules < (l_lenCacheAligned - l_granulesCompleted))
@@ -431,7 +431,7 @@ uint32_t processPbaRequest(const sbeMemAccessReqMsgHdr_t &i_hdr,
uint32_t l_len = 1;
uint32_t l_respLen = l_granulesCompleted * l_granuleSize;
- SBE_DEBUG(SBE_FUNC "Total length Pushed for ChipOp [%d]", l_respLen);
+ SBE_INFO(SBE_FUNC "Total length Pushed for ChipOp [%d]", l_respLen);
l_rc = sbeDownFifoEnq_mult ( l_len, &l_respLen );
CHECK_SBE_RC_AND_BREAK_IF_NOT_SUCCESS(l_rc);
@@ -511,7 +511,7 @@ uint32_t processAduRequest(const sbeMemAccessReqMsgHdr_t &i_hdr,
// Assumption is Hwp won't return zero for Num Granules
assert(0 != l_numGranules);
- SBE_DEBUG(SBE_FUNC "Hwp returned l_numGranules=[0x%08X]",l_numGranules);
+ SBE_INFO(SBE_FUNC "Hwp returned l_numGranules=[0x%08X]",l_numGranules);
uint64_t l_numAcc = 0;
if (l_numGranules < (l_lenCacheAligned - l_granulesCompleted))
@@ -695,7 +695,7 @@ uint32_t processAduRequest(const sbeMemAccessReqMsgHdr_t &i_hdr,
l_isItagMode,
l_isEccMode);
- SBE_DEBUG(SBE_FUNC "Total length Pushed for ChipOp [%d]", l_respLen);
+ SBE_INFO(SBE_FUNC "Total length Pushed for ChipOp [%d]", l_respLen);
l_rc = sbeDownFifoEnq_mult ( l_len, &l_respLen );
CHECK_SBE_RC_AND_BREAK_IF_NOT_SUCCESS(l_rc);
@@ -732,10 +732,9 @@ uint32_t sbeMemAccess_Wrap(const bool i_isFlagRead)
if(!l_rc)
{
// Calculate the PBA/ADU address from the given input
- uint64_t l_addr = l_req.getAddr();
- SBE_DEBUG(SBE_FUNC "Address Upper[0x%08X] Lower[0x%08X] Flags[0x%08X] "
- "Length[0x%08X]", ((l_addr >>32) & 0xFFFFFFFF),
- (l_addr & 0xFFFFFFFF), l_req.flags, l_req.len);
+ SBE_INFO(SBE_FUNC "Address Upper[0x%08X] Lower[0x%08X] Flags[0x%08X] "
+ "Length[0x%08X]", ((l_req.getAddr()>>32) & 0xFFFFFFFF),
+ (l_req.getAddr() & 0xFFFFFFFF), l_req.flags, l_req.len);
// PBA
bool l_isPBA = l_req.isPbaFlagSet();
diff --git a/sbe/sbefw/sbecmdparser.C b/sbe/sbefw/sbecmdparser.C
index 6b4ef74c..5cc8e7e5 100644
--- a/sbe/sbefw/sbecmdparser.C
+++ b/sbe/sbefw/sbecmdparser.C
@@ -243,7 +243,6 @@ uint8_t sbeGetCmdStructAttr (const uint8_t i_cmdClass,
sbeCmdStruct_t **o_ppCmd)
{
#define SBE_FUNC " sbeGetCmdStructAttr "
- SBE_DEBUG(SBE_FUNC "i_cmdClass [0x%08X]", i_cmdClass);
uint8_t l_numCmds = 0;
*o_ppCmd = NULL;
@@ -328,7 +327,7 @@ uint8_t sbeValidateCmdClass (const uint8_t i_cmdClass,
#define SBE_FUNC " sbeValidateCmdClass "
uint8_t l_rc = SBE_SEC_COMMAND_NOT_SUPPORTED;
- SBE_DEBUG(SBE_FUNC"i_cmdClass[0x%02X], "
+ SBE_INFO(SBE_FUNC"i_cmdClass[0x%02X], "
"i_cmdOpcode[0x%02X]", i_cmdClass, i_cmdOpcode);
do
@@ -376,9 +375,6 @@ bool sbeIsCmdAllowedAtState (const uint8_t i_cmdClass,
bool l_ret = false;
l_numCmds = sbeGetCmdStructAttr (i_cmdClass, &l_pCmd);
- SBE_DEBUG(SBE_FUNC"CmdClass[0x%02X], CmdOpcode[0x%02X], NumCmds[0x%02X]",
- i_cmdClass, i_cmdOpcode, l_numCmds);
-
for (uint8_t l_cnt = 0; l_cnt < l_numCmds; ++l_cnt, ++l_pCmd)
{
if (i_cmdOpcode == l_pCmd->cmd_opcode)
@@ -386,7 +382,7 @@ bool sbeIsCmdAllowedAtState (const uint8_t i_cmdClass,
// Get the Present State
uint64_t l_state =
SbeRegAccess::theSbeRegAccess().getSbeState();
- SBE_DEBUG(SBE_FUNC "SBE State [0x%08X] Fence State[0x%04X]",
+ SBE_INFO(SBE_FUNC "SBE State [0x%08X] Fence State[0x%04X]",
(uint32_t)(l_state & 0xFFFFFFFF),l_pCmd->cmd_state_fence);
switch(l_state)
@@ -475,10 +471,6 @@ sbeCmdFunc_t sbeFindCmdFunc (const uint8_t i_cmdClass,
l_numCmds = sbeGetCmdStructAttr (i_cmdClass, &l_pCmd);
- SBE_DEBUG(SBE_FUNC"i_cmdClass[0x%02X], "
- "i_cmdOpcode[0x%02X], l_numCmds[0x%02X]",
- i_cmdClass, i_cmdOpcode, l_numCmds);
-
for (uint8_t l_cnt = 0; l_cnt < l_numCmds; ++l_cnt, ++l_pCmd)
{
if (i_cmdOpcode == l_pCmd->cmd_opcode)
diff --git a/sbe/sbefw/sbecmdprocessor.C b/sbe/sbefw/sbecmdprocessor.C
index 969367c0..86295fdc 100644
--- a/sbe/sbefw/sbecmdprocessor.C
+++ b/sbe/sbefw/sbecmdprocessor.C
@@ -52,7 +52,6 @@
void sbeHandlePsuResponse (const uint32_t i_rc)
{
#define SBE_FUNC " sbeHandlePsuResponse "
- SBE_ENTER(SBE_FUNC);
uint32_t l_rc = SBE_SEC_OPERATION_SUCCESSFUL;
do
@@ -107,7 +106,6 @@ void sbeHandlePsuResponse (const uint32_t i_rc)
}
} while(false);
- SBE_DEBUG(SBE_FUNC"l_rc[0x0%08X]", l_rc);
#undef SBE_FUNC
}
@@ -229,7 +227,7 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
{
// In this state, we need not take care of FFDC State, User may
// or may not fetch FFDC and may not issue sbeContinueboot
- SBE_DEBUG(SBE_FUNC"Continuous IPL mode not set, will wait for "
+ SBE_INFO(SBE_FUNC"Continuous IPL mode not set, will wait for "
"commands...");
(void)SbeRegAccess::theSbeRegAccess().
updateSbeState(SBE_STATE_ISTEP);
@@ -238,7 +236,7 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
// in runtime.
else if(true == SbeRegAccess::theSbeRegAccess().isDestBitRuntime())
{
- SBE_DEBUG(SBE_FUNC"Destination bit tells us to go to runtime");
+ SBE_INFO(SBE_FUNC"Destination bit tells us to go to runtime");
(void)SbeRegAccess::theSbeRegAccess().
updateSbeState(SBE_STATE_RUNTIME);
}
@@ -246,13 +244,13 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
// FFDC needs to be collected before continuing with IPL
else if(true == SbeRegAccess::theSbeRegAccess().isCollectFFDCSet())
{
- SBE_DEBUG(SBE_FUNC"FFDC Collect State - Waiting for FFDC to be picked");
+ SBE_INFO(SBE_FUNC"FFDC Collect State - Waiting for FFDC to be picked");
(void)SbeRegAccess::theSbeRegAccess().
updateSbeState(SBE_STATE_FFDC_COLLECT);
}
else
{
- SBE_DEBUG(SBE_FUNC"Continuous IPL Mode set... IPLing");
+ SBE_INFO(SBE_FUNC"Continuous IPL Mode set... IPLing");
(void)SbeRegAccess::theSbeRegAccess().
updateSbeState(SBE_STATE_IPLING);
sbeDoContinuousIpl();
@@ -261,7 +259,6 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
do
{
uint32_t l_rc = SBE_SEC_OPERATION_SUCCESSFUL;
- uint16_t l_primStatus = SBE_PRI_OPERATION_SUCCESSFUL;
// Wait for new command processing
int l_rcPk = pk_semaphore_pend (
@@ -313,10 +310,6 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
break;
}
- SBE_DEBUG (SBE_FUNC"New cmd arrived, g_sbeSemCmdProcess.count=%d "
- "l_primStatus=[0x%04X], l_rc=[0x%04X]",
- g_sbeSemCmdProcess.count, l_primStatus, l_rc);
-
// PK API failure
if (l_rcPk != PK_OK)
{
@@ -344,7 +337,10 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
} while(false); // Inner do..while loop ends here
- SBE_DEBUG(SBE_FUNC"l_rc=[0x%08X]", l_rc);
+ SBE_INFO (SBE_FUNC"New cmd arrived, g_sbeSemCmdProcess.count=%d "
+ "l_rc=[0x%04X]",
+ g_sbeSemCmdProcess.count, l_rc);
+
if ( g_sbeIntrSource.isSet(SBE_PROC_ROUTINE, SBE_INTERFACE_PSU) )
{
sbeHandlePsuResponse (l_rc);
@@ -363,13 +359,14 @@ void sbeSyncCommandProcessor_routine(void *i_pArg)
pk_irq_enable(SBE_IRQ_SBEFIFO_RESET);
}
} while(true); // Thread always exists
+ SBE_EXIT(SBE_FUNC);
}
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
void sbeAsyncCommandProcessor_routine(void *arg)
{
- SBE_TRACE("sbeAsyncCommandProcessor Thread started");
+ SBE_INFO("sbeAsyncCommandProcessor Thread started");
do
{
diff --git a/sbe/sbefw/sbecmdregaccess.C b/sbe/sbefw/sbecmdregaccess.C
index bb83cab2..7feb73b4 100644
--- a/sbe/sbefw/sbecmdregaccess.C
+++ b/sbe/sbefw/sbecmdregaccess.C
@@ -131,7 +131,6 @@ uint32_t sbeGetReg(uint8_t *i_pArg)
ffdc.setRc(fapiRc);
break;
}
- SBE_DEBUG(SBE_FUNC" getting response data");
respData = data64;
// Now enqueue into the downstream FIFO
len = sizeof( respData )/sizeof(uint32_t);
@@ -163,6 +162,7 @@ uint32_t sbeGetReg(uint8_t *i_pArg)
rc = sbeDsSendRespHdr( respHdr, ffdc);
}
+ SBE_EXIT(SBE_FUNC);
return rc;
#undef SBE_FUNC
}
@@ -268,6 +268,7 @@ uint32_t sbePutReg(uint8_t *i_pArg)
rc = sbeDsSendRespHdr( respHdr, ffdc);
}
+ SBE_EXIT(SBE_FUNC);
return rc;
#undef SBE_FUNC
}
diff --git a/sbe/sbefw/sbecmdringaccess.C b/sbe/sbefw/sbecmdringaccess.C
index f2bf213e..49c8579b 100644
--- a/sbe/sbefw/sbecmdringaccess.C
+++ b/sbe/sbefw/sbecmdringaccess.C
@@ -200,7 +200,7 @@ uint32_t sbeGetRing(uint8_t *i_pArg)
// If FIFO access failure
CHECK_SBE_RC_AND_BREAK_IF_NOT_SUCCESS(l_rc);
- SBE_DEBUG(SBE_FUNC "Ring Address 0x%08X User Ring Mode 0x%04X "
+ SBE_INFO(SBE_FUNC "Ring Address 0x%08X User Ring Mode 0x%04X "
"Length in Bits 0x%08X",
l_reqMsg.ringAddr, l_reqMsg.ringMode, l_reqMsg.ringLenInBits);
@@ -299,6 +299,7 @@ uint32_t sbeGetRing(uint8_t *i_pArg)
l_rc = sbeDsSendRespHdr( respHdr, l_ffdc);
}
}
+ SBE_EXIT(SBE_FUNC);
return l_rc;
#undef SBE_FUNC
}
diff --git a/sbe/sbefw/sbecmdscomaccess.C b/sbe/sbefw/sbecmdscomaccess.C
index de9f6807..ac43e815 100644
--- a/sbe/sbefw/sbecmdscomaccess.C
+++ b/sbe/sbefw/sbecmdscomaccess.C
@@ -132,6 +132,7 @@ uint32_t sbeGetScom (uint8_t *i_pArg)
} while(false);
+ SBE_EXIT(SBE_FUNC);
return l_rc;
#undef SBE_FUNC
}
@@ -224,6 +225,7 @@ uint32_t sbePutScom (uint8_t *i_pArg)
} while(false);
+ SBE_EXIT(SBE_FUNC);
return l_rc;
#undef SBE_FUNC
}
@@ -365,6 +367,7 @@ uint32_t sbeModifyScom (uint8_t *i_pArg)
} while(false);
+ SBE_EXIT(SBE_FUNC);
return l_rc;
#undef SBE_FUNC
}
@@ -414,7 +417,7 @@ uint32_t sbePutScomUnderMask (uint8_t *i_pArg)
l_putScomUmaskMsg.lowAddr,
l_putScomUmaskMsg.hiInputData,
l_putScomUmaskMsg.lowInputData);
- SBE_DEBUG(SBE_FUNC"maskData[0x%08X%08X]",
+ SBE_INFO(SBE_FUNC"maskData[0x%08X%08X]",
l_putScomUmaskMsg.hiMaskData,
l_putScomUmaskMsg.lowMaskData);
@@ -477,6 +480,7 @@ uint32_t sbePutScomUnderMask (uint8_t *i_pArg)
}
} while(false);
+ SBE_EXIT(SBE_FUNC);
return l_rc;
#undef SBE_FUNC
}
diff --git a/sbe/sbefw/sbecmdsram.C b/sbe/sbefw/sbecmdsram.C
index d5352d23..703a26ce 100644
--- a/sbe/sbefw/sbecmdsram.C
+++ b/sbe/sbefw/sbecmdsram.C
@@ -92,7 +92,7 @@ uint32_t sbeOccSramAccess_Wrap(const bool i_isGetFlag)
break;
}
- SBE_DEBUG("mode [0x%08X] addr[0x%08X] len[0x%08X]",
+ SBE_INFO("mode [0x%08X] addr[0x%08X] len[0x%08X]",
l_req.mode, l_req.addr, l_req.len);
// Get the Proc Chip Target to be passed in to the procedure call
diff --git a/sbe/sbefw/sbefifo.H b/sbe/sbefw/sbefifo.H
index 7c53994d..fef49d45 100644
--- a/sbe/sbefw/sbefifo.H
+++ b/sbe/sbefw/sbefifo.H
@@ -1,3 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/sbefw/sbefifo.H $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
/*
* @file: ppe/sbe/sbefw/sbefifo.H
*
@@ -149,7 +173,7 @@ extern inline uint32_t sbeUpFifoDeq (uint64_t *o_data)
*/
extern inline uint32_t sbeUpFifoPerformReset (void)
{
- SBE_TRACE(">sbeUpFifoPerformReset");
+ SBE_INFO("sbeUpFifoPerformReset");
return putscom_abs(SBE_UPSTREAM_FIFO_PERFORM_RESET, ((uint64_t)0x1)<<32);
}
@@ -162,7 +186,7 @@ extern inline uint32_t sbeUpFifoPerformReset (void)
*/
extern inline uint32_t sbeUpFifoAckEot (void)
{
- SBE_DEBUG("sbeUpFifoAckEot");
+ SBE_INFO("sbeUpFifoAckEot");
return putscom_abs(SBE_UPSTREAM_FIFO_ACK_EOT, ((uint64_t)0x1)<<32);
}
diff --git a/sbe/sbefw/sbemain.C b/sbe/sbefw/sbemain.C
index 86cf2cc7..d60353f5 100644
--- a/sbe/sbefw/sbemain.C
+++ b/sbe/sbefw/sbemain.C
@@ -292,7 +292,7 @@ uint32_t main(int argc, char **argv)
break;
}
- SBE_DEBUG("Completed PK init");
+ SBE_INFO("Completed PK init");
// Initialize the semaphores
l_rc = sbeInitSems();
@@ -348,5 +348,6 @@ uint32_t main(int argc, char **argv)
} while (false);
+ SBE_EXIT(SBE_FUNC);
return l_rc;
}
diff --git a/sbe/sbefw/sberegaccess.C b/sbe/sbefw/sberegaccess.C
index f3ec5b9f..4c099428 100644
--- a/sbe/sbefw/sberegaccess.C
+++ b/sbe/sbefw/sberegaccess.C
@@ -204,14 +204,14 @@ uint32_t SbeRegAccess::init()
break;
}
iv_isSlave = l_sbeDevIdReg & SBE_DEV_ID_C4_PIN_MASK;
- SBE_DEBUG(SBE_FUNC"Overriding master/slave with data read from "
+ SBE_INFO(SBE_FUNC"Overriding master/slave with data read from "
"C4 pin: HI: 0x%08X, LO: 0x%08X",
(uint32_t)(l_sbeDevIdReg >> 32),
(uint32_t)(l_sbeDevIdReg & 0xFFFFFFFF));
}
} while(false);
- SBE_DEBUG(SBE_FUNC"Read mailbox registers: mbx8: 0x%08X, mbx3: 0x%08X, "
+ SBE_INFO(SBE_FUNC"Read mailbox registers: mbx8: 0x%08X, mbx3: 0x%08X, "
"mbx6: 0x%08X", (uint32_t)(l_mbx8 >> 32),
(uint32_t)(iv_mbx3 >> 32), (uint32_t)(iv_mbx6 >> 32));
l_initDone = true;
diff --git a/sbe/sbefw/sbetrace.H b/sbe/sbefw/sbetrace.H
index 173f2c24..e83e3afc 100644
--- a/sbe/sbefw/sbetrace.H
+++ b/sbe/sbefw/sbetrace.H
@@ -1,3 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/sbefw/sbetrace.H $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __SBEFW_SBE_TRACE_H
#define __SBEFW_SBE_TRACE_H
@@ -16,20 +40,37 @@ extern "C" {
#define SBE_EXIT_MRK "<<"
#define SBE_ERR_MRK "E>"
#define SBE_INF_MRK "I>"
+#define SBE_DEBUG_MRK "D>"
-#define SBE_TRACE(args...) PK_TRACE(args)
-#define SBE_ENTER(args...) PK_TRACE(SBE_ENTER_MRK"" args)
-#define SBE_EXIT(args...) PK_TRACE(SBE_EXIT_MRK"" args)
+#define SBE_ERROR(args...)
+#define SBE_INFO(args...)
+#define SBE_ENTER(args...)
+#define SBE_EXIT(args...)
+#define SBE_DEBUG(args...)
+
+// Levels of logging
+// 0 - No tracing
+// 1 - Error
+// 2 - Error, info
+// 3 - Error, info, entry/exit
+// 4 - Error, info, entry/exit, debug
+#if (SBE_TRACE_LEVEL >= 1)
+#undef SBE_ERROR
#define SBE_ERROR(args...) PK_TRACE(SBE_ERR_MRK"" args)
+#endif
+#if (SBE_TRACE_LEVEL >= 2)
+#undef SBE_INFO
#define SBE_INFO(args...) PK_TRACE(SBE_INF_MRK"" args)
-
-//Debug traces
-#define SBE_FW_DEBUG
-#ifdef SBE_FW_DEBUG
-#define SBE_DEBUG_MRK "D>"
+#endif
+#if (SBE_TRACE_LEVEL >= 3)
+#undef SBE_ENTER
+#undef SBE_EXIT
+#define SBE_ENTER(args...) PK_TRACE(SBE_ENTER_MRK"" args)
+#define SBE_EXIT(args...) PK_TRACE(SBE_EXIT_MRK"" args)
+#endif
+#if (SBE_TRACE_LEVEL >= 4)
+#undef SBE_DEBUG
#define SBE_DEBUG(args...) PK_TRACE(SBE_DEBUG_MRK"" args)
-#else
-#define SBE_DEBUG(args...)
-#endif //SBE_FW_DEBUG
-
+#endif
+#define SBE_TRACE(args...) PK_TRACE(args)
#endif // __SBEFW_SBE_TRACE_H
OpenPOWER on IntegriCloud