summaryrefslogtreecommitdiffstats
path: root/src/usr/devicefw
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2012-05-09 12:07:17 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-26 14:46:40 -0500
commit200cabc160d825b9097f234f25270b398c5339b6 (patch)
tree1594a5d53ccc08f21a753c72f0bf2c0d049a6e97 /src/usr/devicefw
parent49b5391b8c1e20623ffde799bc17a75efb20e187 (diff)
downloadtalos-hostboot-200cabc160d825b9097f234f25270b398c5339b6.tar.gz
talos-hostboot-200cabc160d825b9097f234f25270b398c5339b6.zip
Errlog User Details : Hardware Register
Add support for new User Details error log class that will log a hardware register. Developer can read the data and then call the errlog function to have it dumped, or can just call the errlog function to do the deviceRead go get the data. Also, fix bugs in a couple of device read functions that were too strict in their size check - input buffer size just needs to be >= size required, not ==. Change-Id: I05ba42ecd13b3fc963c56bb706d855c9c89412a3 RTC: 38497 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/devicefw')
-rw-r--r--src/usr/devicefw/driverif.C85
-rw-r--r--src/usr/devicefw/userif.C45
2 files changed, 86 insertions, 44 deletions
diff --git a/src/usr/devicefw/driverif.C b/src/usr/devicefw/driverif.C
index 2536bddf0..9cfb79251 100644
--- a/src/usr/devicefw/driverif.C
+++ b/src/usr/devicefw/driverif.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/devicefw/driverif.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/devicefw/driverif.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/** @file driverif.C
* Implement the template specializations of functions from driverif.H.
*/
@@ -159,4 +160,44 @@ namespace DeviceFW
AccessType_DriverOnly i_accessType, ...)
__attribute__((alias("DeviceFW_deviceOp")));
+ /** @brief Wrapper function to call singleton instance for performOp.
+ *
+ * This is defined as an extern "C" function so that it can be aliased
+ * by the template type-safe implementations of deviceOpValist().
+ * This causes the compiler to generate just a single copy of the code.
+ */
+ extern "C"
+ errlHndl_t DeviceFW_deviceOpValist(OperationType i_opType,
+ TARGETING::Target* i_target,
+ void* io_buffer, size_t& io_buflen,
+ int64_t i_accessType, va_list i_args)
+ {
+ errlHndl_t errl;
+
+ errl = Singleton<Associator>::instance().performOp(
+ i_opType, i_target, io_buffer, io_buflen,
+ i_accessType, i_args);
+
+ return errl;
+ }
+
+ // deviceOpValist:
+ // OpType - OperationType only.
+ // TargType - TargetType only.
+ // AccType - AccessType, AccessType_DriverOnly (no WILDCARD).
+ // args - va_list of parameters
+ template <>
+ errlHndl_t deviceOpValist<>(OperationType i_opType,
+ TARGETING::Target* i_target,
+ void* io_buffer, size_t& io_buflen,
+ AccessType i_accessType, va_list i_args)
+ __attribute__((alias("DeviceFW_deviceOpValist")));
+
+ template <>
+ errlHndl_t deviceOpValist<>(OperationType i_opType,
+ TARGETING::Target* i_target,
+ void* io_buffer, size_t& io_buflen,
+ AccessType_DriverOnly i_accessType, va_list i_args)
+ __attribute__((alias("DeviceFW_deviceOpValist")));
+
};
diff --git a/src/usr/devicefw/userif.C b/src/usr/devicefw/userif.C
index 5955d13d0..130c090d1 100644
--- a/src/usr/devicefw/userif.C
+++ b/src/usr/devicefw/userif.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/devicefw/userif.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/devicefw/userif.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/** @file driverif.C
* Implement the functions from userif.H.
*/
OpenPOWER on IntegriCloud