Skip to content

Commit

Permalink
Create error log and fail if Proc's EC is found to be 0x0
Browse files Browse the repository at this point in the history
While looking up the SBE version we will look at the processor's
EC level to determine how to lookup the version. If we find that
the EC level is 0 then something went wrong. In HW the register
describing the procs EC will always be fused to some non-zero
so we shouldnt see this in HW , in simics if this happens it is
likely because simics has not implemented this register yet.

Change-Id: I24bc0caaf3d2c9a574943ca07069bd6fb99cf1a6
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68804
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
crgeddes authored and dcrowell77 committed Nov 27, 2018
1 parent 2ce1bf1 commit b08d614
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/include/usr/sbe/sbereasoncodes.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -106,6 +106,7 @@ enum sbeReasonCode
SBE_MISMATCHED_HW_KEY_HASH = SBE_COMP_ID | 0x1A,
SBE_UPDATE_DURING_MPIPL = SBE_COMP_ID | 0x1B,
SBE_BOOT_SIDE_DIRTY_BAD_PATH = SBE_COMP_ID | 0x1C,
SBE_UNSUPPORTED_EC = SBE_COMP_ID | 0x1D,
};

}; // end SBE
Expand Down
29 changes: 28 additions & 1 deletion src/usr/sbe/sbe_update.C
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,33 @@ namespace SBE

//Walk the TOC and find our current EC
ec = i_target->getAttr<TARGETING::ATTR_EC>();

// If ec == 0 then this indicates simics is not correctly
// writing EC to the FSI register we get the EC level from
if(ec == 0)
{
TRACFCOMP( g_trac_sbe, ERR_MRK"findSBEInPnor: invalid EC found, EC cannot be 0, check simics model" );

/*@
* @errortype
* @moduleid SBE_FIND_IN_PNOR
* @reasoncode SBE_UNSUPPORTED_EC
* @userdata1 Target Huid
* @userdata2 unused
* @devdesc EC level says 0, which is invalid
* @custdesc Chip level is invalid
*/
err = new ErrlEntry(ERRL_SEV_UNRECOVERABLE,
SBE_FIND_IN_PNOR,
SBE_UNSUPPORTED_EC,
TARGETING::get_huid(i_target),
0,
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
err->collectTrace(SBE_COMP_NAME);

break;
}

for(uint32_t i=0; i<MAX_SBE_ENTRIES; i++)
{
if(static_cast<uint32_t>(ec) == sbeToc->entries[i].ec)
Expand All @@ -767,7 +794,7 @@ namespace SBE
}
}
}

// IF we failed to find hdr_Ptr then no matching EC found
if(NULL == hdr_Ptr)
{
//if we get here, it's an error
Expand Down

0 comments on commit b08d614

Please sign in to comment.