2023-10-21 21:23:51 +03:00
|
|
|
|
/**
|
|
|
|
|
* start.c
|
|
|
|
|
* Файл с точкой входа
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Файл с функцией для инициализации системы
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2023-10-21 20:27:23 +03:00
|
|
|
|
#include <arch.h>
|
|
|
|
|
#include <limine.h>
|
2024-01-13 00:00:11 +03:00
|
|
|
|
#include <log.h>
|
2023-10-21 20:27:23 +03:00
|
|
|
|
#include <mem.h>
|
|
|
|
|
#include <mod.h>
|
|
|
|
|
#include <tool.h>
|
|
|
|
|
#include <version.h>
|
|
|
|
|
|
2024-01-20 19:04:26 +03:00
|
|
|
|
uint64_t full_init = 0;
|
2024-01-21 21:40:21 +03:00
|
|
|
|
|
2023-10-21 20:27:23 +03:00
|
|
|
|
// Точка входа
|
|
|
|
|
void _start( ) {
|
|
|
|
|
asm volatile("cli");
|
|
|
|
|
|
2024-01-13 00:00:11 +03:00
|
|
|
|
log_init( );
|
2023-10-21 20:27:23 +03:00
|
|
|
|
mem_init( );
|
2024-01-21 19:25:04 +03:00
|
|
|
|
fb_init( );
|
2024-01-13 00:00:11 +03:00
|
|
|
|
log_init_mem( );
|
2024-01-21 19:25:04 +03:00
|
|
|
|
arch_init( );
|
2024-02-01 10:24:32 +03:00
|
|
|
|
pit_init( );
|
|
|
|
|
task_init( );
|
2024-02-01 11:12:35 +03:00
|
|
|
|
task_f_init = 1;
|
2024-01-22 17:45:34 +03:00
|
|
|
|
mod_init( );
|
2023-10-21 21:23:51 +03:00
|
|
|
|
|
2024-01-13 00:00:11 +03:00
|
|
|
|
LOG("\t\t\t\t *** Базовая Модульная Платформа Операционных Систем "
|
|
|
|
|
"версии %u.%u.%u %s***\n",
|
|
|
|
|
VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, KERNEL_GIT_TAG);
|
2023-10-21 20:27:23 +03:00
|
|
|
|
|
2024-01-13 00:00:11 +03:00
|
|
|
|
LOG("\t\t\t\t *** Дата сборки: %s %s ***\n", __DATE__, __TIME__);
|
2023-10-31 19:07:15 +03:00
|
|
|
|
|
2024-01-22 21:45:56 +03:00
|
|
|
|
time_t time = rtc_get_time( );
|
2024-02-01 10:24:32 +03:00
|
|
|
|
LOG("Время: %u:%u.%u, %u.%u.%u\n", time.hours, time.minutes, time.second, time.day, time.month, time.year);
|
2024-01-22 21:45:56 +03:00
|
|
|
|
|
2024-01-20 19:04:26 +03:00
|
|
|
|
full_init = 1;
|
|
|
|
|
|
2024-02-01 10:24:32 +03:00
|
|
|
|
task_after_init( );
|
|
|
|
|
|
2024-02-05 20:57:44 +03:00
|
|
|
|
LOG("Готово! Для выхода из симуляции удерживайте: ESCAPE\n");
|
2023-12-14 11:25:22 +03:00
|
|
|
|
asm volatile("sti");
|
|
|
|
|
|
2024-01-13 00:00:11 +03:00
|
|
|
|
for (;;) { asm volatile("hlt"); }
|
2023-10-21 20:27:23 +03:00
|
|
|
|
}
|