summaryrefslogtreecommitdiffstats
path: root/src/sys
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2010-09-09 12:04:57 -0500
committerPatrick Williams <iawillia@us.ibm.com>2010-09-09 12:04:57 -0500
commitb4f1ab54b36f7dc273b9a80081c019f7d6618715 (patch)
treeb92783ceee76262fce9057c4e7537c8390a9c603 /src/sys
parentfbedff5e909777a1d646947bd4f9beca6ddf7024 (diff)
downloadtalos-hostboot-b4f1ab54b36f7dc273b9a80081c019f7d6618715.tar.gz
talos-hostboot-b4f1ab54b36f7dc273b9a80081c019f7d6618715.zip
Support modules.
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/init/init_main.C6
-rw-r--r--src/sys/vfs/vfs_main.C23
2 files changed, 28 insertions, 1 deletions
diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C
index 4be986ba7..72bfc64a8 100644
--- a/src/sys/init/init_main.C
+++ b/src/sys/init/init_main.C
@@ -25,7 +25,7 @@ void init_main(void* unused)
printk("Bringing up VFS...");
task_create(&vfs_main, NULL);
task_yield(); // TODO... add a barrier to ensure VFS is fully up.
-
+/*
uint64_t* mmio_addr = (uint64_t*) mmio_map((void*)0x800000000, 1);
printk("MMIO Access %llx\n", *mmio_addr);
@@ -49,4 +49,8 @@ void init_main(void* unused)
for (volatile int i = 0 ; i < 1000000; i++);
mutex_unlock(global_mutex);
}
+*/
+
+ while(1)
+ task_yield();
}
diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C
index 6ba561eb2..481df1101 100644
--- a/src/sys/vfs/vfs_main.C
+++ b/src/sys/vfs/vfs_main.C
@@ -10,6 +10,8 @@ const char* VFS_ROOT = "/";
const char* VFS_ROOT_BIN = "/bin/";
const char* VFS_ROOT_DATA = "/data/";
const char* VFS_ROOT_MSG = "/msg/";
+VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
+uint64_t VFS_LAST_ADDRESS;
struct VfsPath
{
@@ -28,13 +30,34 @@ struct VfsEntry
VfsEntry* prev;
};
+void vfs_module_init()
+{
+ printk("Initializing modules.\n");
+
+ VfsSystemModule* module = &VFS_MODULES[0];
+ while ('\0' != module->module[0])
+ {
+ printk("\tIniting module %s...", module->module);
+ (module->init)(NULL);
+ printk("done.\n");
+
+ module++;
+ }
+
+ printk("Modules initialized.");
+}
+
void vfs_main(void* unused)
{
+ // Create message queue, register with kernel.
msg_q_t vfsMsgQ = msg_q_create();
msg_q_register(vfsMsgQ, VFS_ROOT);
printk("done.\n");
// TODO... barrier with init.
+
+ // Initalize modules.
+ vfs_module_init();
Util::Locked::List<VfsEntry, VfsEntry::key_type> vfsContents;
OpenPOWER on IntegriCloud