summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/sbe/sbe_update.H12
-rw-r--r--src/include/usr/sbe/sbeif.H12
-rw-r--r--src/include/usr/sbeio/sbeioreasoncodes.H6
-rw-r--r--src/usr/isteps/istep10/call_host_slave_sbe_update.C11
-rw-r--r--src/usr/sbe/sbe_update.C329
-rw-r--r--src/usr/sbeio/common/sbe_retry_handler.C44
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/attribute_types_hb.xml16
-rw-r--r--src/usr/targeting/common/xmltohb/target_types_hb.xml3
8 files changed, 311 insertions, 122 deletions
diff --git a/src/include/usr/sbe/sbe_update.H b/src/include/usr/sbe/sbe_update.H
index d907e57c9..f4dc648b7 100644
--- a/src/include/usr/sbe/sbe_update.H
+++ b/src/include/usr/sbe/sbe_update.H
@@ -541,6 +541,18 @@ namespace SBE
const uint64_t i_boundary,
uint8_t* o_dst);
+ /**
+ * @brief Read the version of code found on each of the SBE's seeproms
+ * and store values in sbeTargetState_t type
+ *
+ * @param[in] io_sbeState Struct holding SBE related information
+ * @pre it is expected that the member 'target' in the
+ * sbeTargetState_t struct is set prior to calling this function
+ *
+ * @return errlHndl_t if error, nullptr if no error
+ */
+ errlHndl_t getSeepromVersions(sbeTargetState_t& io_sbeState);
+
/**
* @brief Removes ECC from a block of code or data. Removes padding at
diff --git a/src/include/usr/sbe/sbeif.H b/src/include/usr/sbe/sbeif.H
index 0a5985253..3f69d8ff1 100644
--- a/src/include/usr/sbe/sbeif.H
+++ b/src/include/usr/sbe/sbeif.H
@@ -136,6 +136,18 @@ namespace SBE
SHA512_t o_hash,
const void * i_image_ptr = nullptr);
+ /**
+ * @brief Loop through all active processor targets and compare both sides of
+ * the processor's SBE's seeprom versions. Mark down in the attribute
+ * ATTR_HB_SBE_SEEPROM_VERSION_MATCH whether or not the versions match.
+ * This value is used later on to determine if it is safe to switch
+ * seeprom sides in the event that we attempt to recover the SBE from
+ * a failed state.
+ *
+ * @return errlHndl_t Error log handle on failure; otherwise nullptr
+ */
+ errlHndl_t querySbeSeepromVersions();
+
} //end namespace SBE
#endif /* _SBEIF_H */
diff --git a/src/include/usr/sbeio/sbeioreasoncodes.H b/src/include/usr/sbeio/sbeioreasoncodes.H
index 0a911f151..44a493d35 100644
--- a/src/include/usr/sbeio/sbeioreasoncodes.H
+++ b/src/include/usr/sbeio/sbeioreasoncodes.H
@@ -129,13 +129,11 @@ enum sbeioReasonCode
SBEIO_EXCEED_MAX_SIDE_BOOTS = SBEIO_COMP_ID | 0x5D,
SBEIO_SLAVE_FAILED_TO_BOOT = SBEIO_COMP_ID | 0x5E,
SBEIO_RECEIVED_UNEXPECTED_MSG = SBEIO_COMP_ID | 0x5F,
-
- // SBE Vital Attention error codes
+ // SBE Vital Attention error code
SBEIO_SBE_RC_VALUE_INFO = SBEIO_COMP_ID | 0x60,
-
// Init error codes
SBEIO_RC_KERNEL_REG_FAILED = SBEIO_COMP_ID | 0x61,
-
+ SBEIO_SEEPROM_VERSION_MISMATCH = SBEIO_COMP_ID | 0x62,
// Remove once we collect the FFDC ourselves - @todo-RTC:144313
//termination_rc
SBEIO_HWSV_COLLECT_SBE_RC = SBEIO_COMP_ID | 0xFF,
diff --git a/src/usr/isteps/istep10/call_host_slave_sbe_update.C b/src/usr/isteps/istep10/call_host_slave_sbe_update.C
index e8d436709..730ab9983 100644
--- a/src/usr/isteps/istep10/call_host_slave_sbe_update.C
+++ b/src/usr/isteps/istep10/call_host_slave_sbe_update.C
@@ -305,6 +305,17 @@ void* call_host_slave_sbe_update (void *io_pArgs)
}
}
+
+ // Set SEEPROM_VERSIONS_MATCH attributes for each processor
+ // this will be used later on by the sbe_retry code to determine
+ // if it is safe to switch seeprom sides during recovery attempts
+ l_errl = SBE::querySbeSeepromVersions();
+ if(l_errl)
+ {
+ l_StepError.addErrorDetails( l_errl);
+ errlCommit( l_errl, HWPF_COMP_ID);
+ }
+
} while (0);
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C
index 7fad01142..8f7ab3edb 100644
--- a/src/usr/sbe/sbe_update.C
+++ b/src/usr/sbe/sbe_update.C
@@ -1861,127 +1861,62 @@ namespace SBE
return l_errl;
}
- /////////////////////////////////////////////////////////////////////
- errlHndl_t getSbeInfoState(sbeTargetState_t& io_sbeState)
+ errlHndl_t getSeepromVersions(sbeTargetState_t& io_sbeState)
{
-
- TRACUCOMP( g_trac_sbe,
- ENTER_MRK"getSbeInfoState(): HUID=0x%.8X",
- TARGETING::get_huid(io_sbeState.target));
-
-
- errlHndl_t err = nullptr;
- void *sbeHbblImgPtr = nullptr;
- bool l_sideZeroIsActive = true;
+ errlHndl_t l_err = nullptr;
bool l_sbeSupportedSeepromReadOp = true;
bool l_errFoundDuringChipOp = false;
- // Clear build information
- io_sbeState.new_imageBuild.buildDate = 0;
- io_sbeState.new_imageBuild.buildTime = 0;
- memset(io_sbeState.new_imageBuild.buildTag,
- '\0',
- sizeof(io_sbeState.new_imageBuild.buildTag) );
-
- do{
-
- /***********************************************/
- /* Determine which SEEPROM System Booted On */
- /***********************************************/
+ //Make sure that io_sbeState had valid information
+ assert(io_sbeState.target != NULL, "target member variable not set on io_sbeState");
+ do
+ {
//Get Current (boot) Side
sbeSeepromSide_t tmp_cur_side = SBE_SEEPROM_INVALID;
- err = getSbeBootSeeprom(io_sbeState.target, tmp_cur_side);
- if(err)
+ l_err = getSbeBootSeeprom(io_sbeState.target, tmp_cur_side);
+ if(l_err)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - "
- "Error returned from getSbeBootSeeprom(), "
- "RC=0x%X, PLID=0x%lX",
- ERRL_GETRC_SAFE(err),
- ERRL_GETPLID_SAFE(err));
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
+ "determining which seeprom we booted on. Exiting function");
break;
}
-
- io_sbeState.cur_seeprom_side = tmp_cur_side;
- if (io_sbeState.cur_seeprom_side == SBE_SEEPROM0)
- {
- io_sbeState.alt_seeprom_side = SBE_SEEPROM1;
- }
- else if ( io_sbeState.cur_seeprom_side == SBE_SEEPROM1)
- {
- io_sbeState.alt_seeprom_side = SBE_SEEPROM0;
- l_sideZeroIsActive = false;
- }
- else
- {
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error: "
- "Unexpected cur_seeprom_side value = 0x%X, ",
- io_sbeState.cur_seeprom_side);
-
- /*@
- * @errortype
- * @moduleid SBE_GET_TARGET_INFO_STATE
- * @reasoncode SBE_INVALID_SEEPROM_SIDE
- * @userdata1 Temporary Current Side
- * @userdata2 SBE State Current Side
- * @devdesc Invalid Boot SEEPROM Side Found
- */
- err = new ErrlEntry(ERRL_SEV_UNRECOVERABLE,
- SBE_GET_TARGET_INFO_STATE,
- SBE_INVALID_SEEPROM_SIDE,
- tmp_cur_side,
- io_sbeState.cur_seeprom_side);
- err->collectTrace(SBE_COMP_NAME);
- err->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE,
- HWAS::SRCI_PRIORITY_HIGH );
-
- break;
- }
-
- TRACUCOMP( g_trac_sbe,"getSbeInfoState() - cur=0x%X, alt=0x%X",
- io_sbeState.cur_seeprom_side,
- io_sbeState.alt_seeprom_side);
-
- /************************************************************/
- /* Set Target Properties (target_is_master previously set) */
- /************************************************************/
- io_sbeState.ec = io_sbeState.target->getAttr<TARGETING::ATTR_EC>();
-
-
+ bool l_sideZeroActive = (tmp_cur_side == SBE_SEEPROM0);
/*******************************************/
/* Get SEEPROM 0 SBE Version Information */
/*******************************************/
// If the current seeprom is side 0 then attempt read via chipOp
// TODO RTC:186269 Remove forced I2C path when simics issue is resolved
- if (l_sideZeroIsActive && !Util::isSimicsRunning())
+ if (l_sideZeroActive &&
+ !Util::isSimicsRunning())
{
- err = getSeepromSideVersionViaChipOp(io_sbeState.target,
+ l_err = getSeepromSideVersionViaChipOp(io_sbeState.target,
io_sbeState.seeprom_0_ver,
l_sbeSupportedSeepromReadOp);
- if(err)
+ if(l_err)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 0 (Primary) via ChipOp "
"RC=0x%X, PLID=0x%lX, will attempt I2C read instead",
- ERRL_GETRC_SAFE(err),
- ERRL_GETPLID_SAFE(err));
+ ERRL_GETRC_SAFE(l_err),
+ ERRL_GETPLID_SAFE(l_err));
//Commit error as informational and attempt reading via i2c
l_errFoundDuringChipOp = true;
- err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
- err->collectTrace(SBE_COMP_NAME, 256);
- err->collectTrace(SBEIO_COMP_NAME, 256);
- errlCommit( err, SBEIO_COMP_ID );
+ l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
+ l_err->collectTrace(SBE_COMP_NAME, 256);
+ l_err->collectTrace(SBEIO_COMP_NAME, 256);
+ errlCommit( l_err, SBEIO_COMP_ID );
}
else if(!l_sbeSupportedSeepromReadOp)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 0 (Primary) via ChipOp. The "
"SBE firmware level does not support readSeeprom Op, will attempt I2C read instead");
}
else
{
- TRACDBIN(g_trac_sbe, "getSbeInfoState found via ChipOp -spA",
+ TRACDBIN(g_trac_sbe, "getSeepromVersions found via ChipOp -spA",
&(io_sbeState.seeprom_0_ver),
sizeof(sbeSeepromVersionInfo_t));
}
@@ -1990,26 +1925,26 @@ namespace SBE
//If side 0 is not active or there was an error trying to read
//the primary via chipOp, then try reading via I2C
// TODO RTC:186269 Remove forced I2C path when simics issue is resolved
- if(!l_sideZeroIsActive || !l_sbeSupportedSeepromReadOp ||
+ if(!l_sideZeroActive || !l_sbeSupportedSeepromReadOp ||
l_errFoundDuringChipOp || Util::isSimicsRunning())
{
- err = getSeepromSideVersionViaI2c(io_sbeState.target,
+ l_err = getSeepromSideVersionViaI2c(io_sbeState.target,
EEPROM::SBE_PRIMARY,
io_sbeState.seeprom_0_ver,
io_sbeState.seeprom_0_ver_ECC_fail);
- if(err)
+ if(l_err)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 0 (Primary) via I2C, "
"RC=0x%X, PLID=0x%lX",
- ERRL_GETRC_SAFE(err),
- ERRL_GETPLID_SAFE(err));
+ ERRL_GETRC_SAFE(l_err),
+ ERRL_GETPLID_SAFE(l_err));
break;
}
- TRACDBIN(g_trac_sbe, "getSbeInfoState found via I2C -spA",
+ TRACDBIN(g_trac_sbe, "getSeepromVersions found via I2C -spA",
&(io_sbeState.seeprom_0_ver),
sizeof(sbeSeepromVersionInfo_t));
}
@@ -2023,36 +1958,36 @@ namespace SBE
//Note that there is no reason to attempt chipOp on backup if it failed
//on the primary.
// TODO RTC:186269 Remove forced I2C path when simics issue is resolved
- if (!l_sideZeroIsActive && l_sbeSupportedSeepromReadOp &&
+ if (!l_sideZeroActive && l_sbeSupportedSeepromReadOp &&
!l_errFoundDuringChipOp && !Util::isSimicsRunning() )
{
- err = getSeepromSideVersionViaChipOp(io_sbeState.target,
- io_sbeState.seeprom_1_ver,
- l_sbeSupportedSeepromReadOp);
+ l_err = getSeepromSideVersionViaChipOp(io_sbeState.target,
+ io_sbeState.seeprom_1_ver,
+ l_sbeSupportedSeepromReadOp);
- if(err)
+ if(l_err)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 1 (Backup) via Chipop, "
"RC=0x%X, PLID=0x%lX, will attempt I2C read instead",
- ERRL_GETRC_SAFE(err),
- ERRL_GETPLID_SAFE(err));
+ ERRL_GETRC_SAFE(l_err),
+ ERRL_GETPLID_SAFE(l_err));
//Commit error as informational and attempt reading via i2c
l_errFoundDuringChipOp = true;
- err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
- err->collectTrace(SBE_COMP_NAME, 256);
- err->collectTrace(SBEIO_COMP_NAME, 256);
- errlCommit( err, SBEIO_COMP_ID );
+ l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
+ l_err->collectTrace(SBE_COMP_NAME, 256);
+ l_err->collectTrace(SBEIO_COMP_NAME, 256);
+ errlCommit( l_err, SBEIO_COMP_ID );
}
else if(!l_sbeSupportedSeepromReadOp)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 1 (Backup) via ChipOp. The "
"SBE firmware level does not support readSeeprom Op, will attempt I2C read instead");
}
else
{
- TRACDBIN(g_trac_sbe, "getSbeInfoState found via Chipop -spB",
+ TRACDBIN(g_trac_sbe, "getSeepromVersions found via Chipop -spB",
&(io_sbeState.seeprom_1_ver),
sizeof(sbeSeepromVersionInfo_t));
}
@@ -2061,29 +1996,128 @@ namespace SBE
//If side 1 is not active, or there was an error trying to read
//the primary via chipOp, then try reading via I2C
// TODO RTC:186269 Remove forced I2C path when simics issue is resolved
- if(l_sideZeroIsActive || !l_sbeSupportedSeepromReadOp ||
+ if(l_sideZeroActive || !l_sbeSupportedSeepromReadOp ||
l_errFoundDuringChipOp || Util::isSimicsRunning() )
{
- err = getSeepromSideVersionViaI2c(io_sbeState.target,
+ l_err = getSeepromSideVersionViaI2c(io_sbeState.target,
EEPROM::SBE_BACKUP,
io_sbeState.seeprom_1_ver,
io_sbeState.seeprom_1_ver_ECC_fail);
- if(err)
+ if(l_err)
{
- TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error "
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSeepromVersions() - Error "
"getting SBE Information from SEEPROM 1 (Backup) via I2C, "
"RC=0x%X, PLID=0x%lX",
- ERRL_GETRC_SAFE(err),
- ERRL_GETPLID_SAFE(err));
+ ERRL_GETRC_SAFE(l_err),
+ ERRL_GETPLID_SAFE(l_err));
break;
}
- TRACDBIN(g_trac_sbe, "getSbeInfoState-spB found via I2C",
+ TRACDBIN(g_trac_sbe, "getSeepromVersions-spB found via I2C",
&(io_sbeState.seeprom_1_ver),
sizeof(sbeSeepromVersionInfo_t));
}
+ }while(0);
+ return l_err;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ errlHndl_t getSbeInfoState(sbeTargetState_t& io_sbeState)
+ {
+
+ TRACUCOMP( g_trac_sbe,
+ ENTER_MRK"getSbeInfoState(): HUID=0x%.8X",
+ TARGETING::get_huid(io_sbeState.target));
+
+
+ errlHndl_t err = nullptr;
+ void *sbeHbblImgPtr = nullptr;
+
+ // Clear build information
+ io_sbeState.new_imageBuild.buildDate = 0;
+ io_sbeState.new_imageBuild.buildTime = 0;
+ memset(io_sbeState.new_imageBuild.buildTag,
+ '\0',
+ sizeof(io_sbeState.new_imageBuild.buildTag) );
+
+ do{
+
+ /***********************************************/
+ /* Determine which SEEPROM System Booted On */
+ /***********************************************/
+ //Get Current (boot) Side
+ sbeSeepromSide_t tmp_cur_side = SBE_SEEPROM_INVALID;
+ err = getSbeBootSeeprom(io_sbeState.target, tmp_cur_side);
+ if(err)
+ {
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - "
+ "Error returned from getSbeBootSeeprom(), "
+ "RC=0x%X, PLID=0x%lX",
+ ERRL_GETRC_SAFE(err),
+ ERRL_GETPLID_SAFE(err));
+ break;
+ }
+
+ io_sbeState.cur_seeprom_side = tmp_cur_side;
+ if (io_sbeState.cur_seeprom_side == SBE_SEEPROM0)
+ {
+ io_sbeState.alt_seeprom_side = SBE_SEEPROM1;
+ }
+ else if ( io_sbeState.cur_seeprom_side == SBE_SEEPROM1)
+ {
+ io_sbeState.alt_seeprom_side = SBE_SEEPROM0;
+ }
+ else
+ {
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - Error: "
+ "Unexpected cur_seeprom_side value = 0x%X, ",
+ io_sbeState.cur_seeprom_side);
+
+ /*@
+ * @errortype
+ * @moduleid SBE_GET_TARGET_INFO_STATE
+ * @reasoncode SBE_INVALID_SEEPROM_SIDE
+ * @userdata1 Temporary Current Side
+ * @userdata2 SBE State Current Side
+ * @devdesc Invalid Boot SEEPROM Side Found
+ */
+ err = new ErrlEntry(ERRL_SEV_UNRECOVERABLE,
+ SBE_GET_TARGET_INFO_STATE,
+ SBE_INVALID_SEEPROM_SIDE,
+ tmp_cur_side,
+ io_sbeState.cur_seeprom_side);
+ err->collectTrace(SBE_COMP_NAME);
+ err->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE,
+ HWAS::SRCI_PRIORITY_HIGH );
+
+ break;
+ }
+
+ TRACUCOMP( g_trac_sbe,"getSbeInfoState() - cur=0x%X, alt=0x%X",
+ io_sbeState.cur_seeprom_side,
+ io_sbeState.alt_seeprom_side);
+
+ /************************************************************/
+ /* Set Target Properties (target_is_master previously set) */
+ /************************************************************/
+ io_sbeState.ec = io_sbeState.target->getAttr<TARGETING::ATTR_EC>();
+
+ /*******************************************/
+ /* Get SBE SEEPROM Version Information */
+ /*******************************************/
+ err = getSeepromVersions(io_sbeState);
+
+ if(err)
+ {
+ TRACFCOMP( g_trac_sbe, ERR_MRK"getSbeInfoState() - "
+ "Error getting SBE Version from SEEPROMs, "
+ "RC=0x%X, PLID=0x%lX",
+ ERRL_GETRC_SAFE(err),
+ ERRL_GETPLID_SAFE(err));
+ break;
+ }
/*******************************************/
/* Get PNOR SBE Version Information */
@@ -6194,5 +6228,66 @@ errlHndl_t updateKeyTransitionState(
return pError;
}
+
+errlHndl_t querySbeSeepromVersions()
+{
+ errlHndl_t l_errl = nullptr;
+ sbeTargetState_t l_sbeState;
+ TARGETING::TargetHandleList l_procList;
+ do {
+ // Query all of the functional processor targets
+ TARGETING::getAllChips(l_procList,
+ TARGETING::TYPE_PROC,
+ true); // true: return functional targets
+ assert( l_procList.size(), "querySbeSeepromVersions: no functional procs found!")
+
+ if(!Util::isSimicsRunning())
+ {
+ for(const auto & l_procTarget : l_procList)
+ {
+ memset(&l_sbeState, 0, sizeof(l_sbeState));
+ l_sbeState.target = l_procTarget;
+ // populate the SBE SEEPROM version info
+ l_errl = getSeepromVersions(l_sbeState);
+
+ if(l_errl)
+ {
+ break;
+ }
+
+ // If the image_versions do not match then we must set the attribute to reflect that
+ if(memcmp(&l_sbeState.seeprom_0_ver.image_version,
+ &l_sbeState.seeprom_1_ver.image_version,
+ SBE_IMAGE_VERSION_SIZE) != 0)
+ {
+ // ATTR_HB_SBE_SEEPROM_VERSION_MISMATCH is defaulted to be 0, so
+ // we need to set the attribute to 1 if we find that the SEEPROM
+ // sides do not have matching versions.
+ l_procTarget->setAttr<ATTR_HB_SBE_SEEPROM_VERSION_MISMATCH>(1);
+ }
+ }
+
+ if(l_errl)
+ {
+ TRACFCOMP(g_trac_sbe,
+ ERR_MRK "querySbeSeepromVersions: "
+ "Error occured looking up seeprom versions. Returning early from function.");
+ break;
+ }
+ }
+ else
+ {
+ // If we are running simics it is safe to assume both sides of the seeprom are the same.
+ // We don't actually perform SEEPROM updates in simics do to time restrictions so the
+ // concept of updating the SBE SEEPROMs in simics is a little spoofed out so we need
+ // to do some fudging here. ATTR_HB_SBE_SEEPROM_VERSION_MATCH is defaulted to 1 so there
+ // is no need to set it.
+ }
+
+ } while(0);
+ return l_errl;
+}
+
+
} //end SBE Namespace
diff --git a/src/usr/sbeio/common/sbe_retry_handler.C b/src/usr/sbeio/common/sbe_retry_handler.C
index 5e74233a7..4410d089d 100644
--- a/src/usr/sbeio/common/sbe_retry_handler.C
+++ b/src/usr/sbeio/common/sbe_retry_handler.C
@@ -291,6 +291,7 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target )
if(this->iv_currentAction == P9_EXTRACT_SBE_RC::NO_RECOVERY_ACTION)
{
+ SBE_TRACF("main_sbe_handler(): We have concluded there are no further recovery actions to take, deconfiguring proc and exiting handler");
// There is no action possible. Gard and Callout the proc
/*@
* @errortype ERRL_SEV_UNRECOVERABLE
@@ -321,7 +322,6 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target )
errlCommit(l_errl, SBEIO_COMP_ID);
this->iv_currentSBEState = SBE_REG_RETURN::PROC_DECONFIG;
- SBE_TRACF("main_sbe_handler(): We have concluded there are no further recovery actions to take, deconfiguring proc and exiting handler");
break;
}
@@ -334,6 +334,48 @@ void SbeRetryHandler::main_sbe_handler( TARGETING::Target * i_target )
this->iv_currentAction ==
P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM))
{
+ // We cannot switch sides and perform an hreset if the seeprom's
+ // versions do not match. If this happens, log an error and stop
+ // trying to recover the SBE
+ if(this->iv_sbeRestartMethod == HRESET)
+ {
+ TARGETING::ATTR_HB_SBE_SEEPROM_VERSION_MISMATCH_type l_versionsMismatch =
+ i_target->getAttr<TARGETING::ATTR_HB_SBE_SEEPROM_VERSION_MISMATCH>();
+
+ if(l_versionsMismatch)
+ {
+ SBE_TRACF("main_sbe_handler(): We cannot switch SEEPROM sides if their versions do not match, exiting handler");
+ /*@
+ * @errortype ERRL_SEV_UNRECOVERABLE
+ * @moduleid SBEIO_EXTRACT_RC_HANDLER
+ * @reasoncode SBEIO_SEEPROM_VERSION_MISMATCH
+ * @userdata1 HUID of proc
+ * @userdata2 unused
+ * @devdesc Attempted to swap seeprom sides and
+ * boot using hreset but version mismatched
+ * @custdesc Processor Error
+ */
+ l_errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ SBEIO_EXTRACT_RC_HANDLER,
+ SBEIO_SEEPROM_VERSION_MISMATCH,
+ TARGETING::get_huid(i_target),0);
+ l_errl->collectTrace( "ISTEPS_TRACE", 256);
+ l_errl->collectTrace( SBEIO_COMP_NAME, 256);
+ l_errl->addHwCallout( i_target,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL );
+
+ // Set the PLID of the error log to master PLID
+ // if the master PLID is set
+ updatePlids(l_errl);
+
+ errlCommit(l_errl, SBEIO_COMP_ID);
+ // break out of the retry loop
+ break;
+ }
+ }
if(this->iv_switchSidesCount >= MAX_SWITCH_SIDE_COUNT)
{
/*@
diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
index 7d4b64e1c..d1877b449 100755
--- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
@@ -1181,4 +1181,20 @@
<hbOnly/>
</attribute>
+<attribute>
+ <id>HB_SBE_SEEPROM_VERSION_MISMATCH</id>
+ <description>
+ Describes if the processor's SBE's seeprom versions match or not
+ 0x0 = MATCH
+ 0x1 = MISMATCH
+ </description>
+ <simpleType>
+ <uint8_t>
+ </uint8_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+</attribute>
+
</attributes>
diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml
index 6ef511abd..01c82175b 100644
--- a/src/usr/targeting/common/xmltohb/target_types_hb.xml
+++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml
@@ -98,6 +98,9 @@
<attribute>
<id>HBRT_HYP_ID</id>
</attribute>
+ <attribute>
+ <id>HB_SBE_SEEPROM_VERSION_MISMATCH</id>
+ </attribute>
</targetTypeExtension>
<targetTypeExtension>
OpenPOWER on IntegriCloud