summaryrefslogtreecommitdiffstats
path: root/src/usr/devicefw/associator.H
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2012-03-29 16:03:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-30 15:50:50 -0500
commita2cf819c913c65fb9a019b8e62c8e77b8964929a (patch)
tree103843cd2c48b1a8af4f17de3da1bc23627b8836 /src/usr/devicefw/associator.H
parentdf3648d7cd33ee146de3041d3f0d93a713075e26 (diff)
downloadtalos-hostboot-a2cf819c913c65fb9a019b8e62c8e77b8964929a.tar.gz
talos-hostboot-a2cf819c913c65fb9a019b8e62c8e77b8964929a.zip
Prevent double registration in device framework
The device framework code will log an error if more than one function is registered for the same operation/access/target combination. Change-Id: Id5136c389250ed26d7b62ff3b71116bba54ceb89 RTC: 38760 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/805 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/devicefw/associator.H')
-rw-r--r--src/usr/devicefw/associator.H23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/usr/devicefw/associator.H b/src/usr/devicefw/associator.H
index f803926c2..7d462e537 100644
--- a/src/usr/devicefw/associator.H
+++ b/src/usr/devicefw/associator.H
@@ -66,16 +66,31 @@ namespace DeviceFW
~Associator();
/** Register routing interface. See deviceRegisterRoute. */
- void registerRoute(int64_t i_opType,
- int64_t i_accType,
- int64_t i_targetType,
- deviceOp_t i_regRoute);
+ errlHndl_t registerRoute(int64_t i_opType,
+ int64_t i_accType,
+ int64_t i_targetType,
+ deviceOp_t i_regRoute);
/** Perform routing. See deviceOp. */
errlHndl_t performOp(OperationType i_opType,
TARGETING::Target* i_target,
void* io_buffer, size_t& io_buflen,
int64_t i_accessType, va_list i_addr);
+
+ private:
+ /**
+ * @brief Find an associated function for the given operation
+ *
+ * @param[in] i_opType Enumeration specifying the operation type
+ * @param[in] i_accessType Enumeration specifying the access type
+ * @param[in] i_devType Enumeration specifying the target type
+ *
+ * @return NULL if none found, else a function pointer
+ */
+ deviceOp_t findDeviceRoute( OperationType i_opType,
+ TARGETING::TYPE i_devType,
+ int64_t i_accessType );
+
private:
typedef std::vector<deviceOp_t> opVector_t;
OpenPOWER on IntegriCloud