summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/src
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2016-04-07 14:14:26 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-06-14 15:13:10 -0400
commit5006f0f763b4e3ec65443859f7e8f6ffcaa5cfd8 (patch)
treec9c3e72d13651d2b250ed218430a7aa4e0cc0429 /src/import/hwpf/fapi2/src
parentd6673ab6f0f6e6166d1916261fa08ec6e1c8a1bd (diff)
downloadtalos-hostboot-5006f0f763b4e3ec65443859f7e8f6ffcaa5cfd8.tar.gz
talos-hostboot-5006f0f763b4e3ec65443859f7e8f6ffcaa5cfd8.zip
Procedure crashes when trying to query an EC feature
-Updated queryEcFeature to have two parts, base attribute reading is now in a library, while feature checking logic is now in small individual inline functions. Change-Id: I318258a73874e55fadc59ed48fac72cf2bad00d8 Original-Change-Id: I4c3685d6a85946297af31f7f3da4d918bca88039 RTC:151184 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23025 Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25728 Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/hwpf/fapi2/src')
-rw-r--r--src/import/hwpf/fapi2/src/fapi2_utils.C56
-rw-r--r--src/import/hwpf/fapi2/src/fapi2_utils.mk22
2 files changed, 78 insertions, 0 deletions
diff --git a/src/import/hwpf/fapi2/src/fapi2_utils.C b/src/import/hwpf/fapi2/src/fapi2_utils.C
new file mode 100644
index 000000000..f6708fbca
--- /dev/null
+++ b/src/import/hwpf/fapi2/src/fapi2_utils.C
@@ -0,0 +1,56 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: hwpf/fapi2/src/fapi2_utils.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file utils.C
+ * @brief Implements fapi2 utilities
+ */
+#include <fapi2_attribute_service.H>
+#include <attribute_ids.H>
+#include <return_code.H>
+#include <plat_trace.H>
+#include <target.H>
+
+namespace fapi2
+{
+
+ReturnCode queryChipEcAndName(
+ const Target < fapi2::TARGET_TYPE_PROC_CHIP |
+ fapi2::TARGET_TYPE_MEMBUF_CHIP > & i_target,
+ fapi2::ATTR_NAME_Type& o_chipName, fapi2::ATTR_EC_Type& o_chipEc )
+{
+
+ ReturnCode l_rc = FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_NAME, i_target, o_chipName);
+
+ if ( l_rc != FAPI2_RC_SUCCESS )
+ {
+ FAPI_ERR("queryChipEcFeature: error getting chip name");
+ }
+ else
+ {
+ l_rc = FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_EC, i_target, o_chipEc);
+
+ if ( l_rc != FAPI2_RC_SUCCESS )
+ {
+ FAPI_ERR("queryChipEcFeature: error getting chip ec");
+ }
+ }
+
+ return l_rc;
+}
+};
diff --git a/src/import/hwpf/fapi2/src/fapi2_utils.mk b/src/import/hwpf/fapi2/src/fapi2_utils.mk
new file mode 100644
index 000000000..94ad81782
--- /dev/null
+++ b/src/import/hwpf/fapi2/src/fapi2_utils.mk
@@ -0,0 +1,22 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: hwpf/fapi2/src/fapi2_utils.mk $
+#
+# IBM CONFIDENTIAL
+#
+# EKB Project
+#
+# COPYRIGHT 2016
+# [+] International Business Machines Corp.
+#
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# IBM_PROLOG_END_TAG
+MODULE=fapi2_utils
+$(call ADD_MODULE_INCDIR,$(MODULE),$(FAPI2_PLAT_INCLUDE))
+OBJS+=fapi2_utils.o
+$(call BUILD_MODULE)
OpenPOWER on IntegriCloud