Skip to content

Commit

Permalink
remove unnecessary checks in checkMinimumHardware
Browse files Browse the repository at this point in the history
There were a series of checks that were performed after we had
determined the DIMMs were functional that would be implicitly true since
the DIMMs are functional. Those were removed.

Change-Id: I14feae0129ac96c2f701000b0f265bff36250371
RTC:196804
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70560
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
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>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Matt Raybuck authored and dcrowell77 committed Jan 25, 2019
1 parent 89a8815 commit c2f2f50
Showing 1 changed file with 0 additions and 267 deletions.
267 changes: 0 additions & 267 deletions src/usr/hwas/common/hwas.C
Original file line number Diff line number Diff line change
Expand Up @@ -2020,273 +2020,6 @@ errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_nodeOrSys
// errl is now NULL
} // if no dimms

// There needs to be either functional MCS/MCAs (NIMBUS) or MCS/MBAs
// (CUMULUS). Check for MCAs first.
PredicateCTM l_mca(CLASS_UNIT, TYPE_MCA);

TargetHandleList l_presMcaTargetList;
PredicatePostfixExpr l_checkExprPresMca;
l_checkExprPresMca.push(&l_mca).push(&l_present).And();
targetService().getAssociated( l_presMcaTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresMca);

PredicateCTM l_membuf(CLASS_CHIP, TYPE_MEMBUF);

TargetHandleList l_presMembufTargetList;
PredicatePostfixExpr l_checkExprPresMembufs;
l_checkExprPresMembufs.push(&l_membuf).push(&l_present).And();
targetService().getAssociated( l_presMembufTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresMembufs);


PredicateCTM l_ocmb(CLASS_CHIP, TYPE_OCMB_CHIP);

TargetHandleList l_presOcmbTargetList;
PredicatePostfixExpr l_checkExprPresOcmbs;
l_checkExprPresOcmbs.push(&l_ocmb).push(&l_present).And();
targetService().getAssociated( l_presOcmbTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresOcmbs);

// If any MCAs are present, then some must be functional
if (!l_presMcaTargetList.empty())
{
TargetHandleList l_funcMcaTargetList;
PredicatePostfixExpr l_checkExprPresMca;
l_checkExprPresMca.push(&l_mca).push(&l_functional).And();
targetService().getAssociated( l_funcMcaTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresMca);

HWAS_DBG( "checkMinimumHardware: %d functional MCAs",
l_funcMcaTargetList.size());

if (l_funcMcaTargetList.empty())
{
HWAS_ERR( "Insufficient hardware to continue IPL"
" (func membufs)");
if(o_bootable)
{
*o_bootable = false;
break;
}
uint32_t mca_present = l_presMcaTargetList.size();

/*@
* @errortype
* @severity ERRL_SEV_UNRECOVERABLE
* @moduleid MOD_CHECK_MIN_HW
* @reasoncode RC_SYSAVAIL_NO_MCAS_FUNC
* @devdesc checkMinimumHardware found no
* functional membufs
* @custdesc A problem occurred during the IPL of the
* system: Found no functional dimm cards.
* @userdata1[00:31] HUID of node
* @userdata2[00:31] number of present nonfunctional membufs
*/
const uint64_t userdata1 =
(static_cast<uint64_t>(get_huid(pTop)) << 32);
const uint64_t userdata2 =
(static_cast<uint64_t>(mca_present) << 32);
l_errl = hwasError(ERRL_SEV_UNRECOVERABLE,
MOD_CHECK_MIN_HW,
RC_SYSAVAIL_NO_MCAS_FUNC,
userdata1, userdata2);

// call out the procedure to find the deconfigured part.
hwasErrorAddProcedureCallout( l_errl,
EPUB_PRC_FIND_DECONFIGURED_PART,
SRCI_PRIORITY_HIGH );

// if we already have an error, link this one to the earlier;
// if not, set the common plid
hwasErrorUpdatePlid( l_errl, l_commonPlid );
errlCommit(l_errl, HWAS_COMP_ID);
// errl is now NULL
}
}
// there were no MCAs. If there are present membufs then
// there must be some functional membufs
else if (!l_presMembufTargetList.empty())
{
TargetHandleList l_funcMembufTargetList;
PredicatePostfixExpr l_checkExprFunctionalMembufs;
l_checkExprFunctionalMembufs.push(&l_membuf).
push(&l_functional).And();
targetService().getAssociated( l_funcMembufTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprFunctionalMembufs);

HWAS_DBG( "checkMinimumHardware: %d functional membufs",
l_funcMembufTargetList.size());

if (l_funcMembufTargetList.empty())
{
HWAS_ERR( "Insufficient hardware to continue IPL"
" (func membufs)");
if(o_bootable)
{
*o_bootable = false;
break;
}
TargetHandleList l_presentMembufTargetList;
PredicatePostfixExpr l_checkExprPresentMembufs;
l_checkExprPresentMembufs.push(&l_membuf).
push(&l_present).And();
targetService().getAssociated( l_presentMembufTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresentMembufs);
uint32_t membufs_present = l_presentMembufTargetList.size();

/*@
* @errortype
* @severity ERRL_SEV_UNRECOVERABLE
* @moduleid MOD_CHECK_MIN_HW
* @reasoncode RC_SYSAVAIL_NO_MEMBUFS_FUNC
* @devdesc checkMinimumHardware found no
* functional membufs
* @custdesc A problem occurred during the IPL of the
* system: Found no functional dimm cards.
* @userdata1[00:31] HUID of node
* @userdata2[00:31] number of present nonfunctional membufs
*/
const uint64_t userdata1 =
(static_cast<uint64_t>(get_huid(pTop)) << 32);
const uint64_t userdata2 =
(static_cast<uint64_t>(membufs_present) << 32);
l_errl = hwasError(ERRL_SEV_UNRECOVERABLE,
MOD_CHECK_MIN_HW,
RC_SYSAVAIL_NO_MEMBUFS_FUNC,
userdata1, userdata2);

// call out the procedure to find the deconfigured part.
hwasErrorAddProcedureCallout( l_errl,
EPUB_PRC_FIND_DECONFIGURED_PART,
SRCI_PRIORITY_HIGH );

// if we already have an error, link this one to the earlier;
// if not, set the common plid
hwasErrorUpdatePlid( l_errl, l_commonPlid );
errlCommit(l_errl, HWAS_COMP_ID);
// errl is now NULL
}
}
// No MCAs or membufs. If OMCBs are present, there must be some
// functional OCMBs
else if (!l_presOcmbTargetList.empty())
{

TargetHandleList l_funcOcmbTargetList;
PredicatePostfixExpr l_checkExprFuncOcmbs;
l_checkExprFuncOcmbs.push(&l_ocmb).push(&l_functional).And();
targetService().getAssociated( l_funcOcmbTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprFuncOcmbs);

HWAS_DBG( "checkMinimumHardware: %d functional OCMBs",
l_funcOcmbTargetList.size());

if (l_funcOcmbTargetList.empty())
{
HWAS_ERR( "Insufficient hardware to continue IPL"
" (func OCMBs)");
if(o_bootable)
{
*o_bootable = false;
break;
}
TargetHandleList l_presentOcmbTargetList;

PredicatePostfixExpr l_checkExprPresentOcmbs;
l_checkExprPresentOcmbs.push(&l_ocmb).push(&l_present).And();

targetService().getAssociated( l_presentOcmbTargetList, pTop,
TargetService::CHILD, TargetService::ALL,
&l_checkExprPresentOcmbs);

uint32_t ocmbs_present = l_presentOcmbTargetList.size();

/*@
* @errortype
* @severity ERRL_SEV_UNRECOVERABLE
* @moduleid MOD_CHECK_MIN_HW
* @reasoncode RC_SYSAVAIL_NO_OCMBS_FUNC
* @devdesc checkMinimumHardware found no
* functional ocmbs
* @custdesc A problem occurred during the IPL of the
* system: Found no functional dimm cards.
* @userdata1[00:31] HUID of node
* @userdata2[00:31] number of present nonfunctional ocmbs
*/
const uint64_t userdata1 =
(static_cast<uint64_t>(get_huid(pTop)) << 32);
const uint64_t userdata2 =
(static_cast<uint64_t>(ocmbs_present) << 32);

l_errl = hwasError(ERRL_SEV_UNRECOVERABLE,
MOD_CHECK_MIN_HW,
RC_SYSAVAIL_NO_OCMBS_FUNC,
userdata1, userdata2);

// call out the procedure to find the deconfigured part.
hwasErrorAddProcedureCallout( l_errl,
EPUB_PRC_FIND_DECONFIGURED_PART,
SRCI_PRIORITY_HIGH );

// if we already have an error, link this one to the earlier;
// if not, set the common plid
hwasErrorUpdatePlid( l_errl, l_commonPlid );
errlCommit(l_errl, HWAS_COMP_ID);
// errl is now NULL
}
}
else // No MCAs, membufs, or OCMB chips present. Cannot continue IPL.
{
HWAS_DBG("checkMinimumHardware: No present MCAs, membufs, "
"or OCMBs.");

HWAS_ERR( "Insufficient hardware to continue IPL"
" (0 present MCAs, Membufs, OCMBs)");

if(o_bootable)
{
*o_bootable = false;
break;
}

/*@
* @errortype
* @severity ERRL_SEV_UNRECOVERABLE
* @moduleid MOD_CHECK_MIN_HW
* @reasoncode RC_SYSAVAIL_NO_MEMORY_PRESENT
* @devdesc checkMinimumHardware found no present MCAs,
* Membufs, or OCMB chips.
* @custdesc A problem occurred during the IPL of the
* system: Found no functional dimm cards.
* @userdata1[00:31] HUID of node
*/
const uint64_t userdata1 =
(static_cast<uint64_t>(get_huid(pTop)) << 32);

l_errl = hwasError(ERRL_SEV_UNRECOVERABLE,
MOD_CHECK_MIN_HW,
RC_SYSAVAIL_NO_MEMORY_PRESENT,
userdata1);

// call out the procedure to find the deconfigured part.
hwasErrorAddProcedureCallout( l_errl,
EPUB_PRC_FIND_DECONFIGURED_PART,
SRCI_PRIORITY_HIGH );

// if we already have an error, link this one to the earlier;
// if not, set the common plid
hwasErrorUpdatePlid( l_errl, l_commonPlid );
errlCommit(l_errl, HWAS_COMP_ID);
// errl is now NULL
}

// check for functional NX chiplets
// Take specdeconfig into account here
TargetHandleList l_functionalNXChiplets;
Expand Down

0 comments on commit c2f2f50

Please sign in to comment.