summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/fsi/fsidd.C2
-rw-r--r--src/usr/fsi/fsipres.C28
-rw-r--r--src/usr/ibscom/ibscom.C4
-rw-r--r--src/usr/pnor/pnordd.C4
-rw-r--r--src/usr/pnor/pnorrp.C22
-rw-r--r--src/usr/targeting/common/utilFilter.C43
-rw-r--r--src/usr/util/utillidmgr.C5
7 files changed, 55 insertions, 53 deletions
diff --git a/src/usr/fsi/fsidd.C b/src/usr/fsi/fsidd.C
index e3e0a5614..c718f1ab9 100644
--- a/src/usr/fsi/fsidd.C
+++ b/src/usr/fsi/fsidd.C
@@ -1403,7 +1403,7 @@ errlHndl_t FsiDD::initMasterControl(TARGETING::Target* i_master,
bool fsp_master_init = false;
TARGETING::Target * sys = NULL;
TARGETING::targetService().getTopLevelTarget( sys );
- TARGETING::SpFunctions spfuncs;
+ TARGETING::SpFunctions spfuncs = TARGETING::SpFunctions();
if( sys
&& sys->tryGetAttr<TARGETING::ATTR_SP_FUNCTIONS>(spfuncs)
&& spfuncs.fsiMasterInit )
diff --git a/src/usr/fsi/fsipres.C b/src/usr/fsi/fsipres.C
index a4b323c83..d1c9b076c 100644
--- a/src/usr/fsi/fsipres.C
+++ b/src/usr/fsi/fsipres.C
@@ -101,7 +101,7 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
fsi_present = isSlavePresent(i_target);
}
- // Next look for valid Module VPD
+ // Next look for valid Module VPD
bool mvpd_present = false;
size_t theSize = 0;
@@ -185,9 +185,9 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
mvpd_present));
// Callout the processor
- l_errl->addHwCallout( i_target,
- HWAS::SRCI_PRIORITY_LOW,
- HWAS::NO_DECONFIG,
+ l_errl->addHwCallout( i_target,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
// if there is a saved PLID, apply it to this error log
@@ -201,8 +201,8 @@ errlHndl_t procPresenceDetect(DeviceFW::OperationType i_opType,
FSI_COMP_ID );
}
-
- bool present = fsi_present & mvpd_present;
+
+ bool present = fsi_present && mvpd_present;
memcpy(io_buffer, &present, sizeof(present));
io_buflen = sizeof(present);
@@ -273,11 +273,11 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
if( l_errl )
{
-
+
if( fsi_present )
{
// Save this plid to use later
- l_saved_plid = l_errl->plid();
+ l_saved_plid = l_errl->plid();
// commit this log because we expected to have VPD
errlCommit( l_errl,
@@ -321,7 +321,7 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
cvpd_present = true;
}
}
-
+
// Finally compare the 2 methods
if( fsi_present != cvpd_present )
{
@@ -348,9 +348,9 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
cvpd_present));
// Callout the membuf
- l_errl->addHwCallout( i_target,
- HWAS::SRCI_PRIORITY_LOW,
- HWAS::NO_DECONFIG,
+ l_errl->addHwCallout( i_target,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
// if there is a saved PLID, apply it to this error log
@@ -363,8 +363,8 @@ errlHndl_t membPresenceDetect(DeviceFW::OperationType i_opType,
errlCommit( l_errl,
FSI_COMP_ID );
}
-
- bool present = fsi_present & cvpd_present;
+
+ bool present = fsi_present && cvpd_present;
memcpy(io_buffer, &present, sizeof(present));
io_buflen = sizeof(present);
diff --git a/src/usr/ibscom/ibscom.C b/src/usr/ibscom/ibscom.C
index a6d17a2a6..44b34a25d 100644
--- a/src/usr/ibscom/ibscom.C
+++ b/src/usr/ibscom/ibscom.C
@@ -259,7 +259,7 @@ errlHndl_t getTargetVirtualAddress(Target* i_target,
// Map target's virtual address
//NOTE: mmio_dev_map only supports 32 GB Allocation. Technically,
- //hostboot IBSCOM MMIO allocated 64GB, but the SCOM address space
+ //hostboot IBSCOM MMIO allocated 64GB, but the SCOM address space
//is small enough that 32 GB is sufficient.
o_virtAddr = static_cast<uint64_t*>
(mmio_dev_map(reinterpret_cast<void*>(l_IBScomBaseAddr),
@@ -503,7 +503,7 @@ errlHndl_t doIBScom(DeviceFW::OperationType i_opType,
}
- uint64_t pib_code = (errData && PIB_ERROR_STATUS_MASK)
+ uint64_t pib_code = (errData & PIB_ERROR_STATUS_MASK)
>> PIB_ERROR_SHIFT;
if((errData & HOST_ERROR_VALID) &&//bit 32
// technically between 0x001 && 0x7, but only 3
diff --git a/src/usr/pnor/pnordd.C b/src/usr/pnor/pnordd.C
index fb4540e34..6c65f2dd2 100644
--- a/src/usr/pnor/pnordd.C
+++ b/src/usr/pnor/pnordd.C
@@ -773,7 +773,7 @@ errlHndl_t PnorDD::micronFlagStatus(uint64_t i_pollTime)
//Check flag status bit.
- uint32_t opStatus;
+ uint32_t opStatus = 0;
uint64_t poll_time = 0;
uint64_t loop = 0;
while( poll_time < i_pollTime )
@@ -842,7 +842,7 @@ errlHndl_t PnorDD::micronFlagStatus(uint64_t i_pollTime)
//Erase & Program error bits are sticky, so they need to be cleared.
//Configure Get "Chip ID" command in SFC to clear special
- //Micron 'flag status' register. remaining bits are all zero
+ //Micron 'flag status' register. remaining bits are all zero
// since we just need to issue the SPI command.
uint32_t confData = SPI_MICRON_CLRFLAG_STAT << 24;
TRACDCOMP( g_trac_pnor, "PnorDD::micronFlagStatus> confData=0x%.8x",
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index 228771a11..af865d8d7 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -314,15 +314,19 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section,
}
} while(0);
- TRACDCOMP( g_trac_pnor, "PnorRP::getSectionInfo: i_section=%d, side=%d : id=%d", i_section, side, iv_TOC[side][i_section].id );
-
- // copy my data into the external format
- o_info.id = iv_TOC[side][id].id;
- o_info.side = iv_TOC[side][id].side;
- o_info.name = cv_EYECATCHER[id];
- o_info.vaddr = iv_TOC[side][id].virtAddr;
- o_info.size = iv_TOC[side][id].size;
- o_info.eccProtected = (bool)(iv_TOC[side][id].miscFlags & FFS_MISC_ECC_PROTECT);
+ if (PNOR::INVALID_SECTION != id)
+ {
+ TRACDCOMP( g_trac_pnor, "PnorRP::getSectionInfo: i_section=%d, side=%d : id=%d", i_section, side, iv_TOC[side][i_section].id );
+
+ // copy my data into the external format
+ o_info.id = iv_TOC[side][id].id;
+ o_info.side = iv_TOC[side][id].side;
+ o_info.name = cv_EYECATCHER[id];
+ o_info.vaddr = iv_TOC[side][id].virtAddr;
+ o_info.size = iv_TOC[side][id].size;
+ o_info.eccProtected = (bool)(iv_TOC[side][id].miscFlags &
+ FFS_MISC_ECC_PROTECT);
+ }
return l_errhdl;
}
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index d9a9212d2..544ec9b90 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -38,7 +38,7 @@
namespace TARGETING
{
-
+
#define TARG_NAMESPACE "TARGETING::"
#define TARG_CLASS ""
@@ -186,28 +186,28 @@ void getAffinityTargets ( TARGETING::TargetHandleList& o_vector,
void getChildAffinityTargets(
TARGETING::TargetHandleList& o_vector,
- const Target* i_target,
- CLASS i_class,
- TYPE i_type,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
bool i_functional)
{
getAffinityTargets (o_vector, i_target, i_class, i_type,
- TARGETING::TargetService::CHILD_BY_AFFINITY,
- i_functional);
+ TARGETING::TargetService::CHILD_BY_AFFINITY,
+ i_functional);
}
void getParentAffinityTargets(
TARGETING::TargetHandleList& o_vector,
- const Target* i_target,
- CLASS i_class,
+ const Target* i_target,
+ CLASS i_class,
TYPE i_type,
bool i_functional )
{
getAffinityTargets (o_vector, i_target, i_class, i_type,
TARGETING::TargetService::PARENT_BY_AFFINITY,
- i_functional);
+ i_functional);
}
const Target * getParentChip( const Target * i_pChiplet )
@@ -247,19 +247,16 @@ void getPeerTargets(
#define TARG_FN "getPeerTargets"
TARG_ENTER();
Target* l_pPeerTarget = NULL;
-
- if(i_pSrcTarget == NULL)
- {
- TARG_ASSERT("User tried to call getPeerTargets using NULL Target"
- " Handle");
- }
-
+
+ TARG_ASSERT(NULL != i_pSrcTarget,
+ "User tried to call getPeerTargets using NULL Target Handle");
+
// Clear the list
o_peerTargetList.clear();
do
{
// List to maintain all child targets which are found by get associated
- // from the Src target with i_pPeerFilter predicate
+ // from the Src target with i_pPeerFilter predicate
TARGETING::TargetHandleList l_pSrcTarget_list;
// Create input master predicate here by taking in the i_pPeerFilter
@@ -306,12 +303,12 @@ void getPeerTargets(
{
// Simply get the Peer Target for all Src target in the list and
// return
- for(TARGETING::TargetHandleList::const_iterator pTargetIt
- = l_pSrcTarget_list.begin();
+ for(TARGETING::TargetHandleList::const_iterator pTargetIt
+ = l_pSrcTarget_list.begin();
pTargetIt != l_pSrcTarget_list.end();
++pTargetIt)
{
- TARGETING::Target* l_pPeerTgt =
+ TARGETING::Target* l_pPeerTgt =
(*pTargetIt)->getAttr<TARGETING::ATTR_PEER_TARGET>();
o_peerTargetList.push_back(l_pPeerTgt);
}
@@ -321,13 +318,13 @@ void getPeerTargets(
// on each of the PEER Target found on the input target list
else
{
- for(TARGETING::TargetHandleList::const_iterator pTargetIt
- = l_pSrcTarget_list.begin();
+ for(TARGETING::TargetHandleList::const_iterator pTargetIt
+ = l_pSrcTarget_list.begin();
pTargetIt != l_pSrcTarget_list.end();
++pTargetIt)
{
TARGETING::TargetHandleList l_peerTarget_list;
- TARGETING::Target* l_pPeerTgt =
+ TARGETING::Target* l_pPeerTgt =
(*pTargetIt)->getAttr<TARGETING::ATTR_PEER_TARGET>();
// Check whether this target matches the filter criteria
diff --git a/src/usr/util/utillidmgr.C b/src/usr/util/utillidmgr.C
index ebff8d77c..73cac29b0 100644
--- a/src/usr/util/utillidmgr.C
+++ b/src/usr/util/utillidmgr.C
@@ -83,7 +83,7 @@ errlHndl_t UtilLidMgr::getLidSize(size_t& o_lidSize)
iv_lidSize = o_lidSize;
break;
}
-
+
//if we get here, it means we didn't find the LID in PNOR, so
//ask the FSP for it.
@@ -394,7 +394,8 @@ errlHndl_t UtilLidMgr::getLid(void* i_dest, size_t i_destSize)
Util::UTIL_LIDMGR_INVAL_DATA,
TWO_UINT32_TO_UINT64(curLid,
iv_lidId),
- TWO_UINT32_TO_UINT64(*(dataPtr),
+ TWO_UINT32_TO_UINT64(
+ NULL != dataPtr ? *(dataPtr) : 0,
0)
);
OpenPOWER on IntegriCloud