blob: ab60f186111ce58453d7c8df4a03433013d3017f (
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
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
58
59
|
#include <stdbool.h>
#include <smp.h>
#include <klog.h>
#include <printf.h>
#include <paging.h>
#include <video.h>
#include <acpi.h>
#include <panic.h>
#include <addr.h>
#include <stdbool.h>
#include <int.h>
#include <io.h>
#include <cpuid.h>
#include <heap.h>
#include <random.h>
#include <timer.h>
#include <libc.h>
#include <smp.h>
//testing headers
//#include <testmalloc.h>
void kmain() {
PANIC(KERNEL_PANIC_KERNEL_RETURNED);
}
void smp_kinit() {
printf("Kernal started on core <<<<< \n");
smp_load_idt();
kmain();
}
//TODO move to global constructors
void kernel_init() {
size_t pmap_size;
get_mem_capabilities();
pmap_size = map_complete_physical();
init_klog();
init_pmap(pmap_size);
printf("\nKernal started on CPU 1!\n");
find_root_sdp();
debug_acpi();
init_interrupts_bsp();
randinit();
clear_screen();
debug_pzone();
smp_boot();
fix_stack();
unmap_lowmem();
kmain();
}
|