summaryrefslogtreecommitdiff
path: root/src/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r--src/kernel/kernel.c46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index 50e0578..50b8359 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -1,31 +1,45 @@
#include <stdbool.h>
+#include <smp.h>
#include <serial.h>
#include <printf.h>
#include <paging.h>
#include <video.h>
#include <acpi.h>
#include <panic.h>
+#include <kernel.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>
+
+//testing headers
+#include <testmalloc.h>
-void main() {
- if(!(init_serial(COM1))) {
- printf("\nKernal started on CPU 1!\n"); // will detect cpu later
- }
-
- rsdp_t *rsdp;
- rsdp = find_RSDP();
- if(!(rsdp)) {
- printf("Couldn't find the RSDP... not sure what to do now.\n");
- panic(KERNEL_PANIC_RSDP_UNFOUND, KERNEL_PANIC_INVOKED);
- }
- dump_video();
- debug_print_memory();
+void main() {
+#ifndef SCREEN_OUTPUT
+ if(init_serial(COM1)) printf("\nKernal started on CPU 1!\n");
+#endif
+ get_mem_capabilities();
+ init_pmap(map_complete_physical());
+ unmap_lowmem();
+
+
+ find_root_sdp();
+ debug_acpi();
+
+ init_interrupts();
- init_pmap();
- debug_pmap();
+
+ randinit();
- panic(KERNEL_PANIC_KERNEL_RETURNED, KERNEL_PANIC_INVOKED);
+ smp_boot();
+ PANIC(KERNEL_PANIC_KERNEL_RETURNED);
}