summaryrefslogtreecommitdiffstats
path: root/main.c
blob: 7315f5038bd0e6f51f9f9045c56de0ea608128ec (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
32
33
34
35
36
37
38
39
40
41
42
43
#include "jove.h"
#include "object.h"
#include "memory.h"
#include "print.h"
#include "init.h"
#include "device/portio_uart.h"
#include "device/processor.h"
#include "device/initrd.h"

struct jove_ObjectDirectory _initDirectory = {
    
    .entries = {
        [0] = {
            .type = KO_OBJECT_DIRECTORY,
            .data = 1
        },
    }
};

void
_jove_main(void)
{
    bsp_setup();
#ifdef ENABLE_PORTIO_UART
    portio_uart_setup();
#endif

    pmem_setup();
    vmem_setup();
#ifdef ENABLE_INITRD
    initrd_setup();
#endif

    init_load();
    kprintf("Reached end of kernel main!\n");
    hcf();
}

NORETURN void
hcf(void)
{
    for(;;) __asm__ volatile("hlt");
}