summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2019-08-14 09:00:32 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-10-07 12:53:18 -0500
commit63989a514eddd456eae76de07bc80f36a85d25ee (patch)
tree4281bdaee23698934fe5a9fc8bdcc43a7cb34516 /src
parente017df4c986601fab97f6c5a5c488a0ffeef12e1 (diff)
downloadtalos-hostboot-63989a514eddd456eae76de07bc80f36a85d25ee.tar.gz
talos-hostboot-63989a514eddd456eae76de07bc80f36a85d25ee.zip
Create error for unsuspected target in configureHbrtHypIds
Specifically check for all expected types. Create an error if an unsuspected type is encountered. Also use the const for error logs which just add software callout. Change-Id: Ie1b35945ee7c580dd70d3c97c68184a22fb6ced5 RTC:210321 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82225 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R Geddes <crgeddes@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: Corey V Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/runtime/runtime_reasoncodes.H3
-rw-r--r--src/usr/runtime/customize_attrs_for_payload.C54
2 files changed, 49 insertions, 8 deletions
diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H
index b54f29751..8bc4c858d 100644
--- a/src/include/usr/runtime/runtime_reasoncodes.H
+++ b/src/include/usr/runtime/runtime_reasoncodes.H
@@ -68,7 +68,8 @@ namespace RUNTIME
MOD_OPEN_UNTRUSTED_SP_AREAS = 0x28, /**< populate_hbruntime.C */
MOD_SEND_ATTRIBUTES_TO_FSP = 0x29, /**< hbrt_utilities.H */
MOD_RT_DO_NVDIMM_OP = 0x2A, /**< rt_fwnotify.C */
- SET_ATTR_NVDIMM_ENCRYPTION_ENABLE = 0x2B, /**< rt_fwnotify.C */
+ SET_ATTR_NVDIMM_ENCRYPTION_ENABLE = 0x2B, /**< rt_fwnotify.C */
+ MOD_CONFIGURE_HBRT_HYP_IDS = 0x2C,
};
enum RuntimeReasonCode
diff --git a/src/usr/runtime/customize_attrs_for_payload.C b/src/usr/runtime/customize_attrs_for_payload.C
index 980037980..69dfc3dfb 100644
--- a/src/usr/runtime/customize_attrs_for_payload.C
+++ b/src/usr/runtime/customize_attrs_for_payload.C
@@ -78,7 +78,8 @@ errlHndl_t createProcNotFoundError(
* @reasoncode RUNTIME::RT_NO_PROC_TARGET
* @userdata1 Input targeting target's HUID
* @devdesc No processor targeting target was found for the given
- * targeting target
+ * targeting target
+ * @custdesc Unexpected internal firmware error
*/
pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
@@ -86,7 +87,7 @@ errlHndl_t createProcNotFoundError(
RUNTIME::RT_NO_PROC_TARGET,
huid,
0,
- true);
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting target").
addToLog(pError);
@@ -165,6 +166,7 @@ errlHndl_t computeNonPhypRtTarget(
* @userdata1 MEMBUF targeting target's HUID
* @devdesc No associated DMI targeting target(s) found for
* given MEMBUF targeting target
+ * @custdesc Unexpected internal firmware error
*/
pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
@@ -172,7 +174,7 @@ errlHndl_t computeNonPhypRtTarget(
RUNTIME::RT_UNIT_TARGET_NOT_FOUND,
huid,
0,
- true);
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
addToLog(pError);
@@ -257,6 +259,7 @@ errlHndl_t computeNonPhypRtTarget(
* @userdata1 OCMB targeting target's HUID
* @devdesc No associated OMI targeting target(s) found for
* given OCMB targeting target
+ * @custdesc Unexpected internal firmware error
*/
pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
@@ -264,7 +267,7 @@ errlHndl_t computeNonPhypRtTarget(
RUNTIME::RT_NO_OMI_TARGET_FOUND,
huid,
0,
- true);
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
addToLog(pError);
@@ -319,6 +322,7 @@ errlHndl_t computeNonPhypRtTarget(
* @userdata2 Targeting target's type
* @devdesc The targeting type of the input targeting target is
* not supported by runtime code
+ * @custdesc Unexpected internal firmware error
*/
pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
@@ -326,7 +330,7 @@ errlHndl_t computeNonPhypRtTarget(
RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
huid,
targetingTargetType,
- true);
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
addToLog(pError);
@@ -402,6 +406,7 @@ errlHndl_t getRtTypeForTarget(
* @userdata1 Target's HUID
* @userdata2 Target's targeting type
* @devdesc Targeting target's type not supported by runtime code
+ * @custdesc Unexpected internal firmware error
*/
pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
@@ -409,7 +414,7 @@ errlHndl_t getRtTypeForTarget(
RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
huid,
targetingTargetType,
- true);
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
addToLog(pError);
@@ -543,9 +548,38 @@ errlHndl_t configureHbrtHypIds(const bool i_configForPhyp)
hbrtHypId += pos; // Add OMI chip unit to end
break;
}
- default: // just PROC
+ case TARGETING::TYPE_PROC:
{
hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>();
+ break;
+ }
+ default:
+ {
+ auto huid = get_huid(*pIt);
+ auto targetType = (*pIt)->getAttr<TARGETING::ATTR_TYPE>();
+ TRACFCOMP(g_trac_runtime, ERR_MRK
+ "configureHbrtHypIds> 0x%08X is not a supported type. "
+ "HUID: 0x%08X", targetType, huid);
+ /*@
+ * @errortype
+ * @moduleid RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS
+ * @reasoncode RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED
+ * @userdata1 Target's HUID
+ * @userdata2 Target's targeting type
+ * @devdesc Targeting target's type not supported by runtime code
+ * @custdesc Unexpected internal firmware error
+ */
+ pError = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS,
+ RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
+ huid,
+ targetType,
+ ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
+
+ ERRORLOG::ErrlUserDetailsTarget(*pIt,"Targeting Target").
+ addToLog(pError);
+ break;
}
} // end of ATTR_TYPE switch
hbrtHypId |= rtType;
@@ -559,6 +593,12 @@ errlHndl_t configureHbrtHypIds(const bool i_configForPhyp)
}
}
+ // Only set HBRT_HYP_ID attribute if no error found
+ if (pError)
+ {
+ break;
+ }
+
(*pIt)->setAttr<TARGETING::ATTR_HBRT_HYP_ID>(hbrtHypId);
TRACDCOMP( g_trac_runtime, "configureHbrtHypIds> "
"Set ATTR_HBRT_HYP_ID attribute to 0x%016llX on targeting target "
OpenPOWER on IntegriCloud