summaryrefslogtreecommitdiffstats
path: root/apps/init/main.c
blob: 6deb12caa7c8115ce69a701b71a92f50637949c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <kernel/object.h>
#include <jove/jove.h>
#include <jove/object.h>
#include <jove/syscall.h>

#include "memory.h"

/**This program acts as a memory and process server.*/

__attribute__((noreturn))
static void
spin_fail(void)
{
    for(;;);
}

extern void __libc_heap_init(uintptr_t);

void
main(void *message_ptr)
{
    __jove_syscall_obj = INIT_OBJECT_MESSAGE;
    __jove_syscall_ptr = message_ptr;
    _jove_alloc_objdir_inplace(&__jove_untyped_directory, &__rootdir, INIT_OBJECT_UNTYPED_DIR);

    jove_kprintf("Hello, Userland!\n");
    pager_setup();
    __libc_heap_init((uintptr_t)message_ptr + KO_MESSAGE_BYTES);

    for(;;);
}