blob: 85c11036f77e93e0b118c090ad84e09ff2292246 (
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
45
46
47
48
49
|
// MIT License, Copyright (c) 2020 Marvin Borner
#include "config.h"
#include <boot.h>
#include <cpu.h>
#include <def.h>
#include <fs.h>
#include <gui.h>
#include <interrupts.h>
#include <keyboard.h>
#include <load.h>
#include <mem.h>
#include <print.h>
#include <serial.h>
#include <syscall.h>
#include <timer.h>
void kernel_main(struct vid_info *vid_info)
{
HEAP = 0x00200000;
HEAP_START = HEAP; // For malloc function
// Initialize VESA video
vesa_init(vid_info->info);
u32 terminal_background[3] = { 0, 0, 0 };
vesa_fill(terminal_background);
// Serial connection
serial_install();
serial_print("\nConnected.\n");
// Install drivers
interrupts_install();
timer_install();
keyboard_install();
// Enable drivers
sti();
ls_root();
gui_init(FONT_PATH);
gui_term_write("Wake up, " USERNAME "...\n");
syscall_init();
proc_init();
idle();
}
|