bond/x64/src/kernel/ke/boot.c

45 lines
1011 B
C
Raw Normal View History

/* Copyright 2016 secXsQuared
* Distributed under GPL license
* See COPYING under root for details
*/
#include "../arch/amd64/boot.h"
2017-02-01 03:26:08 +00:00
#include "pmm.h"
#include "alloc.h"
#include "test_case.h"
2017-02-01 03:26:08 +00:00
extern void KABI hal_printf(char const *, ...);
// returning from this function results in halting the cpu
2017-02-23 02:36:00 +00:00
void KABI ke_system_startup(void *boot_info)
{
2016-10-17 06:05:34 +00:00
if (boot_info == NULL)
{
// failed.
hal_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();
hal_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);
hal_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();
hal_printf("KERNEL: Kernel tasks finished.\n");
return;
}