summaryrefslogtreecommitdiffstats
path: root/src/sys/init
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2010-09-09 15:21:12 -0500
committerPatrick Williams <iawillia@us.ibm.com>2010-09-09 15:21:12 -0500
commit51621c156c03feff0d5e4246ecd2e18473fd347d (patch)
tree4e64c4bb13b54a081e3b2d0d2db886d4f3379def /src/sys/init
parent80b83026362d07b10ed1ae16afb162f7699757cb (diff)
downloadtalos-hostboot-51621c156c03feff0d5e4246ecd2e18473fd347d.tar.gz
talos-hostboot-51621c156c03feff0d5e4246ecd2e18473fd347d.zip
Add task_exec system call.
Diffstat (limited to 'src/sys/init')
-rw-r--r--src/sys/init/init_main.C14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C
index 72bfc64a8..ef9dfb1e7 100644
--- a/src/sys/init/init_main.C
+++ b/src/sys/init/init_main.C
@@ -1,5 +1,8 @@
#include <kernel/console.H> // TODO : Remove this.
+#include <kernel/syscalls.H>
+#include <sys/syscall.h>
+
#include <sys/task.h>
#include <sys/mutex.h>
#include <sys/msg.h>
@@ -7,6 +10,7 @@
mutex_t global_mutex;
+/*
void init_child(void* unused)
{
mutex_lock(global_mutex);
@@ -15,6 +19,7 @@ void init_child(void* unused)
for (volatile int i = 0 ; i < 100000; i++);
task_end();
}
+*/
void vfs_main(void*);
@@ -24,7 +29,12 @@ 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.
+
+ // TODO... add a barrier to ensure VFS is fully up.
+ while (NULL == _syscall0(Systemcalls::MSGQ_RESOLVE_ROOT));
+ task_yield();
+
+
/*
uint64_t* mmio_addr = (uint64_t*) mmio_map((void*)0x800000000, 1);
printk("MMIO Access %llx\n", *mmio_addr);
@@ -51,6 +61,8 @@ void init_main(void* unused)
}
*/
+ task_exec("libexample.so", NULL);
+
while(1)
task_yield();
}
OpenPOWER on IntegriCloud