diff options
author | dgilbert <dgilbert@us.ibm.com> | 2011-07-28 16:42:28 -0500 |
---|---|---|
committer | Douglas R. Gilbert <dgilbert@us.ibm.com> | 2011-08-17 14:22:39 -0500 |
commit | c56648379cde6ea3bcfac07923bb560734c6e16f (patch) | |
tree | 81ee3d5abaa130d0f1e36e038c3a344e11f55ce0 /src/usr/vfs/vfsrp.H | |
parent | 20b03fdaeb7414fdf9d43634976ca1ab5fbac7f1 (diff) | |
download | talos-hostboot-c56648379cde6ea3bcfac07923bb560734c6e16f.tar.gz talos-hostboot-c56648379cde6ea3bcfac07923bb560734c6e16f.zip |
Virtual File System module load and unload
Change-Id: Iaa6a256a8a15ac48bfba5bc1cab292c5ac246166
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/253
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vfs/vfsrp.H')
-rw-r--r-- | src/usr/vfs/vfsrp.H | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/usr/vfs/vfsrp.H b/src/usr/vfs/vfsrp.H new file mode 100644 index 000000000..456979e2d --- /dev/null +++ b/src/usr/vfs/vfsrp.H @@ -0,0 +1,90 @@ +#ifndef VFSRP_H +#define VFSRP_H + +#include <stdint.h> +#include <builtins.h> +#include <errl/errltypes.H> + +struct msg_t; + +namespace VFS +{ + void vfs_msg_handler(void * unused); + + /** + * Virtual File System Service + */ + class VfsRp + { + public: + + /** + * static init + * @param[in] task args + */ + static void init(void * i_taskArgs); + + protected: + /** + * Ctor + */ + VfsRp() : iv_msgQ(NULL), iv_pnor_vaddr(0) {} + + /** + * Dtor + */ + ~VfsRp(); + + /** + * Start message handler + */ + static void msg_handler(void * unused); + + /** + * Load or Unload a module + * @param[in] i_msg the message + * @note Does not return. calls task_end() + */ + static void load_unload(void * i_msg); + + /** + * Call _start on module + * @param[in] i_msg the message + * @note Does not return. calls task_end() + */ + static void exec(void * i_msg); + + private: // functions + + /** + * Initialize this object + * @return return code on error + */ + errlHndl_t _init(); + + /** + * Message handler + */ + void msgHandler(); + + /** + * Load or Unload a module + * @param[in] i_msg the message + */ + void _load_unload(msg_t * i_msg); + + /** + * Call _start on module + * @param[in] i_msg the message + */ + void _exec(msg_t * i_msg); + + private: // data + + msg_q_t iv_msgQ; //!< message queue + uint64_t iv_pnor_vaddr; //!< virtual address of ext image in PFNOR + }; + +}; // VFS namepsace + +#endif |