summaryrefslogtreecommitdiffstats
path: root/src/include/sys
diff options
context:
space:
mode:
authordgilbert <dgilbert@us.ibm.com>2011-07-28 16:42:28 -0500
committerDouglas R. Gilbert <dgilbert@us.ibm.com>2011-08-17 14:22:39 -0500
commitc56648379cde6ea3bcfac07923bb560734c6e16f (patch)
tree81ee3d5abaa130d0f1e36e038c3a344e11f55ce0 /src/include/sys
parent20b03fdaeb7414fdf9d43634976ca1ab5fbac7f1 (diff)
downloadtalos-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/include/sys')
-rw-r--r--src/include/sys/mm.h10
-rw-r--r--src/include/sys/vfs.h38
2 files changed, 44 insertions, 4 deletions
diff --git a/src/include/sys/mm.h b/src/include/sys/mm.h
index 4719ff7df..71e41d24c 100644
--- a/src/include/sys/mm.h
+++ b/src/include/sys/mm.h
@@ -2,6 +2,7 @@
#define __SYS_MM_H
#include <stdint.h>
+#include <limits.h>
#include <sys/msg.h>
#ifdef __cplusplus
@@ -24,4 +25,13 @@ int mm_alloc_block(msg_q_t mq,void* va,uint64_t size);
}
#endif
+/** @fs mm_icache_invalidate()
+ * @brief Invalidate the ICACHE for the given memory
+ *
+ * @param[in] i_addr - Destination address
+ * @param[in] i_cpu_word_count - number of CPU_WORDs (uint64_t)
+ */
+void mm_icache_invalidate(void * i_addr, size_t i_cpu_word_count);
+
+
#endif
diff --git a/src/include/sys/vfs.h b/src/include/sys/vfs.h
index 5c28e29b8..27337f469 100644
--- a/src/include/sys/vfs.h
+++ b/src/include/sys/vfs.h
@@ -2,12 +2,20 @@
#define __SYS_VFS_H
#include <stdint.h>
+// NOTE!. This file is included by linker.C and can't include non standard header files
+#ifndef LINKER_C
+// other includes not visable to the linker
+#include <sys/task.h>
+#endif
// make TODO VFS_MODULE_MAX equal to the actual number of modules in the base image (+ 2?)
#define VFS_MODULE_MAX 64
// Extended use 4 4k pages
+// Extended Module Virtual address at 1GB
+#define VFS_EXTENDED_MODULE_VADDR (1 * 1024 * 1024 * 1024)
+#define VFS_EXTENDED_MODULE_TABLE_ADDRESS (VFS_EXTENDED_MODULE_VADDR)
+#define VFS_EXTENDED_MODULE_TABLE_OFFSET 0
#define VFS_EXTENDED_MODULE_MAX 128
-#define VFS_EXTENDED_MODULE_TABLE_ADDRESS 0x0000000040000000UL
#define VFS_MODULE_NAME_MAX 64
#define VFS_SYMBOL_INIT _init
#define VFS_SYMBOL_START _start
@@ -32,12 +40,15 @@ extern const char* VFS_ROOT;
extern const char* VFS_ROOT_BIN;
extern const char* VFS_ROOT_DATA;
extern const char* VFS_ROOT_MSG;
+extern const char* VFS_MSG;
enum VfsMessages
{
- VFS_MSG_REGISTER_MSGQ,
- VFS_MSG_RESOLVE_MSGQ,
- VFS_MSG_EXEC,
+ 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
};
struct VfsSystemModule
@@ -52,10 +63,29 @@ struct VfsSystemModule
};
extern VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
+
extern uint64_t VFS_LAST_ADDRESS;
#ifdef __cplusplus
}
#endif
+#ifndef LINKER_C
+/**
+ * Find the VfsSystemModule data for the given module name
+ * @param[in] i_table VFS module table
+ * @param[in] i_name name of module to find
+ * @return VfsSystemModule ptr to data | NULL if not found
+ */
+VfsSystemModule * vfs_find_module(VfsSystemModule * i_table, const char * i_name);
+
+/**
+ * Call the module start routine
+ * @param[in] i_module VfsSystemModule data for the module
+ * @param[in] i_param parameter to pass to task_create() for this module
+ * @return tid_t of started task | -1 if i_module is NULL | -2 if there is no start()
+ */
+tid_t vfs_exec(VfsSystemModule * i_module, void* i_param);
+#endif
+
#endif
OpenPOWER on IntegriCloud