summaryrefslogtreecommitdiff
path: root/src/kernel/main.c
blob: 677faaf126c7906049667079d28c3b9f7423b233 (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
#include <kernel/arch/generic.h>
#include <kernel/main.h>
#include <kernel/mem.h>
#include <kernel/panic.h>
#include <kernel/proc.h>

void r3_test();

void kmain(struct kmain_info info) {
	log_write(info.init.at, info.init.size);
	log_const("mem...");
	mem_init(&info);

	log_const("creating process...");
	struct process *proc = process_new(r3_test);
	log_const("switching...");
	process_switch(proc);
}

void r3_test() {
	log_const("ok");
	asm("cli");
	panic();
}