blob: 3ff0463e0766d1e17020975c865eeb0ad957655a (
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
50
51
52
53
54
55
56
57
|
// MIT License, Copyright (c) 2020 Marvin Borner
#include <boot.h>
#include <cpu.h>
#include <fb.h>
#include <fs.h>
#include <ide.h>
#include <interrupts.h>
#include <keyboard.h>
#include <load.h>
#include <mem.h>
#include <mm.h>
#include <mouse.h>
#include <net.h>
#include <pci.h>
#include <random.h>
#include <serial.h>
#include <syscall.h>
#include <timer.h>
void kernel_main(struct mem_info *mem_info, struct vid_info *vid_info); // Decl
void kernel_main(struct mem_info *mem_info, struct vid_info *vid_info)
{
// Serial connection
serial_install();
serial_print("\nKernel was compiled at " __TIME__ " on " __DATE__ "\n");
serial_print("Serial connected.\n");
memory_install(mem_info, vid_info);
memory_switch_dir(virtual_kernel_dir());
paging_enable();
cpu_enable_features();
cpu_print();
srand(rdseed());
// Install drivers
vfs_install();
device_install();
ata_install();
pci_install();
interrupts_install();
timer_install();
keyboard_install();
mouse_install();
fb_install(vid_info);
/* net_install(); */
// Enable drivers
sti();
keyboard_reset();
syscall_init();
proc_init();
idle();
}
|