summaryrefslogtreecommitdiff
path: root/kc/core/kc_main.c
blob: cfbc56467e2d19cefdda137f3b145725f1c2b923 (plain)
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
#include "cpu.h"
#include "serial.h"
#include "kprint.h"
#include "memory.h"
#include "panic.h"
#include "task.h"

#include <kernel/entry.h>

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

//TODO: initialize vm before cpu?
//      alternatively, split memory and/or cpu initialization steps

static struct kc_boot_data *boot_data;

unsigned long kc_main(struct kc_boot_data *data)
{
    boot_data = data;

    cpu_init();
    serial_init();
    kputs("<hacker voice> i'm in 3333\r\n");
    memory_init();
    task_init();

    return 0;
}

struct kc_boot_data *get_boot_data()
{
    return boot_data;
}