aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.c
blob: fc304b249a99e410ca9e5d59d41d72f49844a52b (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
44
// MIT License, Copyright (c) 2020 Marvin Borner

#include <acpi.h>
#include <boot.h>
#include <cpu.h>
#include <fpu.h>
#include <fs.h>
#include <keyboard.h>
#include <load.h>
#include <mem.h>
#include <mouse.h>
#include <serial.h>
#include <syscall.h>
#include <timer.h>

void kernel_main(struct vid_info *vid_info)
{
	heap_init(0x00f00000);

	boot_passed = vid_info;

	// Serial connection
	serial_install();
	serial_print("\nConnected.\n");

	// Install drivers
	acpi_install();
	hpet_install();
	interrupts_install();
	fpu_install();
	timer_install();
	keyboard_install();
	mouse_install();

	// Enable drivers
	sti();

	ls_root();

	syscall_init();
	proc_init();

	idle();
}