summaryrefslogtreecommitdiffstats
path: root/src/usr/vfs/vfsrp.H
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2012-01-13 09:40:41 -0600
committerDouglas R. Gilbert <dgilbert@us.ibm.com>2012-01-19 14:47:50 -0600
commit11a2e07a97bb44005dfd8fe8bac690014b3e2a81 (patch)
tree3a8492a5476e540ced0cbb7cb21c8d16b0936f9f /src/usr/vfs/vfsrp.H
parent67ab5c65b2caabff6147143a90ab5584573e24ae (diff)
downloadtalos-hostboot-11a2e07a97bb44005dfd8fe8bac690014b3e2a81.tar.gz
talos-hostboot-11a2e07a97bb44005dfd8fe8bac690014b3e2a81.zip
VFS add functions to find module by address and query if module is loaded
Change-Id: I471a2a773d42f11ab973f42ca701c8be5191d776 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/611 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Diffstat (limited to 'src/usr/vfs/vfsrp.H')
-rw-r--r--src/usr/vfs/vfsrp.H26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/usr/vfs/vfsrp.H b/src/usr/vfs/vfsrp.H
index c5a74c91f..8492f559d 100644
--- a/src/usr/vfs/vfsrp.H
+++ b/src/usr/vfs/vfsrp.H
@@ -27,6 +27,8 @@
#include <builtins.h>
#include <errl/errltypes.H>
#include <sys/msg.h>
+#include <vector>
+#include <sys/sync.h>
struct msg_t;
@@ -68,11 +70,28 @@ namespace VFS
*/
const VfsSystemModule * get_vfs_info(const char * i_name) const;
+ /**
+ * Get the module name that contains the given address
+ * @param[in] i_vaddr The virtual address
+ * @return ptr to the module name or NULL if it's not found
+ */
+ const char * get_name_from_address(const void * i_vaddr) const;
+
+ /**
+ * Query if a module is loaded
+ * @param[in] i_name The module name
+ * @return [true|false]
+ */
+ bool is_module_loaded(const char * i_name);
+
protected:
/**
* Ctor
*/
- VfsRp() : iv_msgQ(NULL), iv_pnor_vaddr(0) {}
+ VfsRp() : iv_msgQ(NULL), iv_pnor_vaddr(0)
+ {
+ mutex_init(&iv_mutex);
+ }
/**
* Dtor
@@ -127,6 +146,11 @@ namespace VFS
msg_q_t iv_msgQ; //!< message queue
uint64_t iv_pnor_vaddr; //!< virtual address of ext image in PFNOR
+
+ typedef std::vector<VfsSystemModule *> ModuleList_t;
+
+ mutex_t iv_mutex; //!< lock for iv_loaded
+ ModuleList_t iv_loaded; //!< Loaded modules
};
}; // VFS namepsace
OpenPOWER on IntegriCloud