summaryrefslogtreecommitdiffstats
path: root/src/include/usr/devicefw
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-05-24 21:18:35 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-06-02 15:14:28 -0500
commit74b9b31c9ae811dd527d4eb328e9fa93327442ab (patch)
tree848b6ad8a46f8a5a8065f80fcaddf07d061b3be2 /src/include/usr/devicefw
parentf0e44bc60ca80d5bf875f0836a119e361d84dd44 (diff)
downloadtalos-hostboot-74b9b31c9ae811dd527d4eb328e9fa93327442ab.tar.gz
talos-hostboot-74b9b31c9ae811dd527d4eb328e9fa93327442ab.zip
Errl support for device framework.
Change-Id: I7849df2994312c6e91d9f86431c2d084c26b21cf Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/99 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Diffstat (limited to 'src/include/usr/devicefw')
-rw-r--r--src/include/usr/devicefw/devfwreasoncodes.H20
-rw-r--r--src/include/usr/devicefw/driverif.H32
-rw-r--r--src/include/usr/devicefw/userif.H18
3 files changed, 45 insertions, 25 deletions
diff --git a/src/include/usr/devicefw/devfwreasoncodes.H b/src/include/usr/devicefw/devfwreasoncodes.H
new file mode 100644
index 000000000..0f55f063d
--- /dev/null
+++ b/src/include/usr/devicefw/devfwreasoncodes.H
@@ -0,0 +1,20 @@
+#ifndef __DEVICEFW_DEVFWREASONCODES_H
+#define __DEVICEFW_DEVFWREASONCODES_H
+
+#include <hbotcompid.H>
+
+namespace DeviceFW
+{
+ enum DevFwModuleId
+ {
+ DEVFW_MOD_ASSOCIATOR = 0x00,
+ };
+
+ enum DevFwReasonCode
+ {
+ DEVFW_RC_INVALID_REGISTRATION = DEVFW_COMP_ID | 0x01,
+ DEVFW_RC_NO_ROUTE_FOUND = DEVFW_COMP_ID | 0x02,
+ };
+};
+
+#endif
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
index ceff91c59..a3c5b37b6 100644
--- a/src/include/usr/devicefw/driverif.H
+++ b/src/include/usr/devicefw/driverif.H
@@ -72,10 +72,10 @@ namespace DeviceFW
/** @typedef deviceOp_t
* @brief Function prototype for registered device-driver operations.
*/
- typedef ErrorHandle_t(*deviceOp_t)(OperationType,
- TargetHandle_t,
- void*, size_t&,
- int64_t, va_list);
+ typedef errlHndl_t(*deviceOp_t)(OperationType,
+ TargetHandle_t,
+ void*, size_t&,
+ int64_t, va_list);
/**
* @brief Register a device driver routing function with the framework.
@@ -173,10 +173,10 @@ namespace DeviceFW
* perform accesses which may be only visible to internal drivers.
*/
template <typename AccType>
- ErrorHandle_t deviceOp(OperationType i_opType,
- TargetHandle_t i_target,
- void* io_buffer, size_t& io_buflen,
- AccType i_accessType, ...)
+ errlHndl_t deviceOp(OperationType i_opType,
+ TargetHandle_t i_target,
+ void* io_buffer, size_t& io_buflen,
+ AccType i_accessType, ...)
{
return InvalidParameterType(); // Cause a compile fail if not one of
// the explicit template specializations.
@@ -235,15 +235,15 @@ namespace DeviceFW
// TargType - TargetType only.
// AccType - AccessType, AccessType_DriverOnly (no WILDCARD).
template <>
- ErrorHandle_t deviceOp<>(OperationType i_opType,
- TargetHandle_t i_target,
- void* io_buffer, size_t& io_buflen,
- AccessType i_accessType, ...);
+ errlHndl_t deviceOp<>(OperationType i_opType,
+ TargetHandle_t i_target,
+ void* io_buffer, size_t& io_buflen,
+ AccessType i_accessType, ...);
template <>
- ErrorHandle_t deviceOp<>(OperationType i_opType,
- TargetHandle_t i_target,
- void* io_buffer, size_t& io_buflen,
- AccessType_DriverOnly i_accessType, ...);
+ errlHndl_t deviceOp<>(OperationType i_opType,
+ TargetHandle_t i_target,
+ void* io_buffer, size_t& io_buflen,
+ AccessType_DriverOnly i_accessType, ...);
};
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index dc4cbd4c7..db9285a02 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -10,12 +10,12 @@
#define __DEVICEFW_USERIF
#include <stdint.h>
+#include <errl/errltypes.H>
namespace DeviceFW
{
- /* TODO: Update these to real error log / target handle type once those
- * pieces of code are complete. */
- typedef void* ErrorHandle_t;
+ /* TODO: Update these to real target handle type once that piece of code
+ * is complete. */
typedef int TargetHandle_t;
/** @enum AccessType
@@ -68,9 +68,9 @@ namespace DeviceFW
* </PRE>
*
*/
- ErrorHandle_t deviceRead(TargetHandle_t i_target,
- void* o_buffer, size_t& io_buflen,
- AccessType i_accessType, ...);
+ errlHndl_t deviceRead(TargetHandle_t i_target,
+ void* o_buffer, size_t& io_buflen,
+ AccessType i_accessType, ...);
/**
* @brief Perform a hardware write operation.
@@ -98,9 +98,9 @@ namespace DeviceFW
* </PRE>
*
*/
- ErrorHandle_t deviceWrite(TargetHandle_t i_target,
- void* i_buffer, size_t& io_buflen,
- AccessType i_accessType, ...);
+ errlHndl_t deviceWrite(TargetHandle_t i_target,
+ void* i_buffer, size_t& io_buflen,
+ AccessType i_accessType, ...);
};
OpenPOWER on IntegriCloud