bond/kernel/ke/boot.c

43 lines
978 B
C
Raw Normal View History

/* Copyright 2016 secXsQuared
* Distributed under GPL license
* See COPYING under root for details
*/
2018-01-26 08:43:22 +00:00
#include "kernel/ke/boot.h"
2018-01-25 19:11:22 +00:00
#include "kernel/ke/alloc.h"
2018-01-26 08:43:22 +00:00
#include "test/test_case.h"
2018-02-08 19:51:29 +00:00
#include "kernel/ke/print.h"
// returning from this function results in halting the cpu
2018-01-26 08:43:22 +00:00
void KABI ke_main(boot_info_t *boot_info)
{
2016-10-17 06:05:34 +00:00
if (boot_info == NULL)
{
// failed.
2018-02-08 19:51:29 +00:00
ke_printf("KERNEL: HAL init failed.\n");
return;
}
2017-02-01 03:26:08 +00:00
// init kernel heap
//sx_pmm_init(boot_info->pmm_info);
2016-10-17 06:05:34 +00:00
2016-09-13 04:41:09 +00:00
ke_alloc_init();
2018-02-08 19:51:29 +00:00
ke_printf("KERNEL: Base Addr is 0x%X. Size is %uB, %uKB.\n",
boot_info->krnl_start,
2016-10-17 06:05:34 +00:00
(boot_info->krnl_end - boot_info->krnl_start),
(boot_info->krnl_end - boot_info->krnl_start) / 1024);
2018-02-08 19:51:29 +00:00
ke_printf("KERNEL: CPU Vendor is \"%s\".\n", boot_info->cpu_vd_str);
linked_list_test();
2016-10-17 06:05:34 +00:00
avl_tree_test();
2016-10-17 06:05:34 +00:00
salloc_test();
2018-02-08 19:51:29 +00:00
ke_printf("KERNEL: Kernel tasks finished.\n");
return;
}