From 97fe8bbe9e8d2d56f664311ab85b73adaa45879d Mon Sep 17 00:00:00 2001 From: secXsQuared1995 Date: Mon, 17 Oct 2016 02:05:34 -0400 Subject: [PATCH] busy busy busy --- x64/src/hal/hal_mem.c | 2 +- x64/src/kernel/k_boot.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/x64/src/hal/hal_mem.c b/x64/src/hal/hal_mem.c index 11d59e4..749ffda 100644 --- a/x64/src/hal/hal_mem.c +++ b/x64/src/hal/hal_mem.c @@ -10,7 +10,7 @@ #include "hal_arch.h" #include "hal_intr.h" -static uint8_t _gdts[HAL_CORE_COUNT][GDT_ENTRY_NUM*GDT_ENTRY_SIZE]; +static uint8_t _gdts[HAL_CORE_COUNT][GDT_ENTRY_NUM * GDT_ENTRY_SIZE]; static hal_gdt_ptr_t _gdt_ptrs[HAL_CORE_COUNT]; #define KERNEL_HEAP_SIZE 8192 diff --git a/x64/src/kernel/k_boot.c b/x64/src/kernel/k_boot.c index 0ff88bd..196fbb1 100644 --- a/x64/src/kernel/k_boot.c +++ b/x64/src/kernel/k_boot.c @@ -14,26 +14,30 @@ extern void KAPI hal_printf(char const *, ...); // returning from this function results in halting the cpu void KAPI ke_main(k_hal_boot_info_t *boot_info) { - if(boot_info == NULL) + if (boot_info == NULL) { // failed. hal_printf("KERNEL: HAL init failed.\n"); return; } - // init kernel heap - sx_pmm_init(boot_info->pmm_info); +// init kernel heap + sx_pmm_init(boot_info + ->pmm_info); + ke_alloc_init(); hal_printf("KERNEL: Base Addr is 0x%X. Size is %uB, %uKB.\n", boot_info->krnl_start, - (boot_info->krnl_end-boot_info->krnl_start), - (boot_info->krnl_end-boot_info->krnl_start)/1024); + (boot_info->krnl_end - boot_info->krnl_start), + (boot_info->krnl_end - boot_info->krnl_start) / 1024); hal_printf("KERNEL: CPU Vendor is \"%s\".\n", boot_info->cpu_vd_str); linked_list_test(); + avl_tree_test(); + salloc_test(); hal_printf("KERNEL: Kernel tasks finished.\n");