aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.c
blob: 07188b9d8e6f10f5d064f901b479f6d58b976ba8 (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
#include <fbos/init.h>
#include <fbos/printk.h>
#include <fbos/mm.h>
#include <fbos/sched.h>
#include <fbos/dt.h>

unsigned long init_stack[THREAD_SIZE / sizeof(unsigned long)];

struct task_struct init_task = { .stack = init_stack };

/*
 * This is the main entry point of the kernel after head.S is done. This
 * function can (and will) assume that everything has been reset and that we can
 * start the whole thing.
 */
__noreturn __kernel void start_kernel(uintptr_t *dtb)
{
	// TODO: disable irqs, etc.

	printk("Welcome to FizzBuzz OS!\n");

	parse_dtb(dtb);

	// TODO: reenable stuff

	for (;;)
		;
}