busy busy busy

This commit is contained in:
secXsQuared1995 2016-10-17 02:05:34 -04:00
parent 1f080a6b80
commit 97fe8bbe9e
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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");