-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel.c
More file actions
executable file
·50 lines (40 loc) · 1.1 KB
/
kernel.c
File metadata and controls
executable file
·50 lines (40 loc) · 1.1 KB
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
#include "multiboot.h"
#include "printf.h"
#include "screen.h"
#include "types.h"
#include "stdlib/task.h"
#include "descriptor_tables.h"
#include "dev/keyboard.h"
#include "stdlib/paging.h"
#include "stdlib/kernelheap.h"
u32 stack_esp;
void main(struct multiboot * header, u32 stack_pointer)
{
stack_esp = stack_pointer;
initialize_descriptor_tables();
clear_screen();
printf("\n +-----------------+\n");
printf(" ,~~. | KWA |\n");
printf(" ( 9 )-_, < -KWA! | \n");
printf("(\\___ )=='-' +-----------------+\n");
printf(" \\ . ) )\n");
printf(" \\ `-' /\n");
printf(" `~j-'\n");
printf(" \"=:)\n");
printf("\n");
clear_screen();
printf("[+] Scanning PCI\n");
PCIScan();
printf("[+] keyboard initialization\n");
init_keyboard();
asm volatile("sti");
printf("[+] memory initialization.\n");
initialise_paging();
printf("[+] timer initialization\n");
printf("[+] tasking initialization\n");
initialise_timer(50);
initialise_tasking();
int ret = fork();
//task_switch();
print_task_info();
}