diff options
author | Brett Weiland <brett_weiland@bpcspace.com> | 2021-08-24 14:09:29 -0500 |
---|---|---|
committer | Brett Weiland <brett_weiland@bpcspace.com> | 2021-08-24 14:09:29 -0500 |
commit | 9b22a6965579ea1867aea291d910c96f386b518b (patch) | |
tree | d06dbb9c4708f1cc713bcb115b32ff9bce4cf9b9 /src/kernel/kernel.c | |
parent | bad4b0e9bdfee336bfc1c23761408279eaec1558 (diff) |
major backup 8.24.21
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r-- | src/kernel/kernel.c | 46 |
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); } |