66 lines
993 B
C
66 lines
993 B
C
|
/******************************************************************************
|
||
|
*
|
||
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
||
|
* Please, refer LICENSE file for legal information
|
||
|
*
|
||
|
******************************************************************************/
|
||
|
|
||
|
/**
|
||
|
* @file main.c
|
||
|
* @author Ilja Kartašov <ik@lowenware.com>
|
||
|
* @brief
|
||
|
*
|
||
|
* @see https://lowenware.com/
|
||
|
*/
|
||
|
|
||
|
#include <core/log.h>
|
||
|
#include <core/arch.h>
|
||
|
#include <core/irq.h>
|
||
|
#include <core/timer.h>
|
||
|
|
||
|
|
||
|
|
||
|
void
|
||
|
k_main(void);
|
||
|
|
||
|
|
||
|
void
|
||
|
k_main(void)
|
||
|
{
|
||
|
k_log_init();
|
||
|
|
||
|
k_logs("Starting Lowe OS (EL");
|
||
|
k_logi(aarch64_get_el(), 10);
|
||
|
k_logs(")\n");
|
||
|
|
||
|
if (k_arch_init())
|
||
|
goto panic;
|
||
|
|
||
|
k_timer_init();
|
||
|
k_irq_enable_controller();
|
||
|
k_irq_enable();
|
||
|
|
||
|
goto ok;
|
||
|
/*
|
||
|
k_logs("\tclock");
|
||
|
if (k_clock_init())
|
||
|
goto panic;
|
||
|
|
||
|
k_logs(" - ok\n\tscheduler");
|
||
|
if (k_scheduler_init())
|
||
|
goto panic;
|
||
|
|
||
|
k_logs(" - ok\n");
|
||
|
|
||
|
k_scheduler_run();
|
||
|
*/
|
||
|
|
||
|
panic:
|
||
|
k_logs(" - ERROR\n");
|
||
|
ok:
|
||
|
for (;;) {
|
||
|
__asm__("WFE");
|
||
|
}
|
||
|
}
|
||
|
|