summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/attribute_service.C
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2016-05-20 08:38:32 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-06-30 15:18:50 -0400
commit2dbc23b7ed689e4273ff057776b3dcff9bf3a43b (patch)
tree5b18d3925102b82f1515c05ecc52a1d85ae2caaa /src/usr/fapi2/attribute_service.C
parentb40578a75485d9b1a3819abec529ab8bbb70ba0e (diff)
downloadtalos-hostboot-2dbc23b7ed689e4273ff057776b3dcff9bf3a43b.tar.gz
talos-hostboot-2dbc23b7ed689e4273ff057776b3dcff9bf3a43b.zip
Generate error log when FAPI get or set attribute fails
Change-Id: I77b193010c6038cfab9a2dfd98f3a39a8270506f RTC: 154397 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24863 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/attribute_service.C')
-rw-r--r--src/usr/fapi2/attribute_service.C42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C
index 5df1eafe9..995ed9b02 100644
--- a/src/usr/fapi2/attribute_service.C
+++ b/src/usr/fapi2/attribute_service.C
@@ -200,6 +200,27 @@ ReturnCode getTargetingAttr(
FAPI_ERR("getTargetingAttr: Error from getTargetingAttrHelper "
"for target 0x%.8X and attribute 0x%x",
TARGETING::get_huid(l_pTargTarget), i_targAttrId);
+
+ /*@
+ * @errortype
+ * @moduleid fapi2::MOD_FAPI2_GET_TARGETING_ATTR
+ * @reasoncode RC_INVALID_ATTRIBUTE
+ * @userdata1[0:31] FAPI2 Target Type
+ * @userdata1[32:63] HB Target HUID
+ * @userdata2 Requested attribute ID
+ * @devdesc Invalid attribute read request
+ * @custdesc Firmware Error
+ */
+ l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ MOD_FAPI2_GET_TARGETING_ATTR,
+ RC_INVALID_ATTRIBUTE,
+ TWO_UINT32_TO_UINT64(
+ i_pFapiTarget.getType(),
+ TARGETING::get_huid(l_pTargTarget)
+ ),
+ i_targAttrId);
+
+ l_rc.setPlatDataPtr(reinterpret_cast<void *> (l_errl));
}
}
return l_rc;
@@ -252,6 +273,27 @@ ReturnCode setTargetingAttr(
FAPI_ERR("setTargetingAttr: Error from setTargetingAttrHelper "
"for target 0x%.8X and attribute 0x%x",
TARGETING::get_huid(l_pTargTarget), i_targAttrId);
+
+ /*@
+ * @errortype
+ * @moduleid fapi2::MOD_FAPI2_SET_TARGETING_ATTR
+ * @reasoncode RC_INVALID_ATTRIBUTE
+ * @userdata1[0:31] FAPI2 Target Type
+ * @userdata1[32:63] HB Target HUID
+ * @userdata2 Requested attribute ID
+ * @devdesc Invalid attribute write request
+ * @custdesc Firmware Error
+ */
+ l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ MOD_FAPI2_SET_TARGETING_ATTR,
+ RC_INVALID_ATTRIBUTE,
+ TWO_UINT32_TO_UINT64(
+ i_pFapiTarget.getType(),
+ TARGETING::get_huid(l_pTargTarget)
+ ),
+ i_targAttrId);
+
+ l_rc.setPlatDataPtr(reinterpret_cast<void *> (l_errl));
}
}
return l_rc;
OpenPOWER on IntegriCloud