Skip to content

Commit

Permalink
Add check for minimum hardware in proc_exit_cache_contained
Browse files Browse the repository at this point in the history
RTC:123500
Change-Id: Iae026349cff1842c37e568059c2565cf98e14aff
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41400
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
velozr authored and dcrowell77 committed Jun 9, 2017
1 parent 6988e53 commit 4c2f106
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/include/usr/isteps/istep_reasoncodes.H
Expand Up @@ -55,6 +55,7 @@ namespace ISTEP
MOD_VOLTAGE_CONFIG = 0x13,
MOD_PM_VERIFY_OCC_CHKPT = 0x14,
MOD_UPDATE_REDUNDANT_TPM = 0x15,
MOD_PROC_EXIT_CACHE_CONTAINED = 0x16,
};

/**
Expand Down Expand Up @@ -103,6 +104,7 @@ namespace ISTEP
RC_SLAVE_PROC_BACKUP_HASH_READ_FAIL = ISTEP_COMP_ID | 0x26,
RC_SLAVE_PROC_CBS_CONTROL_READ_FAIL = ISTEP_COMP_ID | 0x27,
RC_PROC_SECURITY_STATE_MISMATCH = ISTEP_COMP_ID | 0x28,
RC_MIN_HW_CHECK_FAILED = ISTEP_COMP_ID | 0x29,
};

};
Expand Down
36 changes: 31 additions & 5 deletions src/usr/isteps/istep14/call_proc_exit_cache_contained.C
Expand Up @@ -49,6 +49,7 @@
#include <devicefw/userif.H>
#include <config.h>
#include <util/misc.H>
#include <hwas/common/hwas.H>

using namespace ISTEP;
using namespace ISTEP_ERROR;
Expand Down Expand Up @@ -83,14 +84,39 @@ void* call_proc_exit_cache_contained (void *io_pArgs)
targetService().getTopLevelTarget(l_sys);
assert( l_sys != NULL );

errlHndl_t l_errl = NULL;
uint8_t l_mpipl = l_sys->getAttr<ATTR_IS_MPIPL_HB>();
ATTR_PAYLOAD_BASE_type payloadBase = 0;
//Check that minimum hardware requirement is meet.
//If not, log error and do not proceed
bool l_bootable;
errlHndl_t l_errl = nullptr;
l_errl = HWAS::checkMinimumHardware(l_sys, &l_bootable);
if (!l_bootable && !l_errl)
{
/*@
* @errortype ERRL_SEV_UNRECOVERABLE
* @moduleid ISTEP::MOD_PROC_EXIT_CACHE_CONTAINED
* @reasoncode ISTEP::RC_MIN_HW_CHECK_FAILED
* @devdesc call_proc_exit_cache_contained: did not
* find minimum hardware to continue
* @custdesc Host firmware did not find enough
* hardware to continue the boot
*/
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
ISTEP::MOD_PROC_EXIT_CACHE_CONTAINED,
ISTEP::RC_MIN_HW_CHECK_FAILED);
}

uint8_t l_mpipl = 0;
TARGETING::TargetHandleList l_procList;
getAllChips(l_procList, TYPE_PROC);
if (!l_errl)
{
l_mpipl = l_sys->getAttr<ATTR_IS_MPIPL_HB>();
getAllChips(l_procList, TYPE_PROC);
}

ATTR_PAYLOAD_BASE_type payloadBase = 0;

if(!l_mpipl)
if(!l_mpipl && !l_errl)
{
ATTR_PAYLOAD_IN_MIRROR_MEM_type l_mirrored = false;

Expand Down

0 comments on commit 4c2f106

Please sign in to comment.