summaryrefslogtreecommitdiffstats
path: root/src/include/sys
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/include/sys
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/include/sys')
-rw-r--r--src/include/sys/vfs.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/sys/vfs.h b/src/include/sys/vfs.h
index 155851398..3094a1707 100644
--- a/src/include/sys/vfs.h
+++ b/src/include/sys/vfs.h
@@ -69,8 +69,8 @@ enum VfsMessages
VFS_MSG_REGISTER_MSGQ, //!< Message to VFS_ROOT to register a message queue
VFS_MSG_RESOLVE_MSGQ, //!< Message to VFS_ROOT to find a message queue
VFS_MSG_EXEC, //!< Message to VFS_ROOT execute a module
- VFS_MSG_LOAD, //!< Message to VFS_MSG to load a module
- VFS_MSG_UNLOAD, //!< Message to VFS_MSG to unload a module
+ VFS_MSG_LOAD, //!< Message to vfsrp to load a module
+ VFS_MSG_UNLOAD, //!< Message to vfsrp to unload a module
};
struct VfsSystemModule
@@ -81,7 +81,7 @@ struct VfsSystemModule
void (*fini)(void*); //!< ptr to fini()
uint64_t * text; //!< ptr to text (code) section
uint64_t * data; //!< ptr to data section
- uint64_t byte_count; //!< no. of memory pages used
+ uint64_t byte_count; //!< no. of bytes in module
};
extern VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
@@ -102,6 +102,15 @@ extern uint64_t VFS_LAST_ADDRESS;
VfsSystemModule * vfs_find_module(VfsSystemModule * i_table, const char * i_name);
/**
+ * Find the VfsSystemModule for the given address
+ * @param[in] i_table The VFS module table to look in
+ * @param[in] i_vaddr The virtual address
+ * @return VrsSytemModule ptr for the module | NULL if not found
+ */
+VfsSystemModule * vfs_find_address(VfsSystemModule * i_table,
+ const void * i_vaddr);
+
+/**
* Get the module's start routine
* @param[in] i_module VfsSystemModule data for the module
* @return Function pointer of module's start or negative value on error.
OpenPOWER on IntegriCloud