2023-09-30 22:51:57 +03:00
|
|
|
#include <arch.h>
|
|
|
|
#include <cpu.h>
|
|
|
|
#include <fb.h>
|
2023-10-07 18:28:48 +03:00
|
|
|
#include <limine.h>
|
|
|
|
#include <mem.h>
|
|
|
|
#include <mod.h>
|
2023-09-30 22:51:57 +03:00
|
|
|
#include <tool.h>
|
2023-10-12 22:30:54 +03:00
|
|
|
#include <version.h>
|
|
|
|
|
|
|
|
extern "C" void main( );
|
|
|
|
|
2023-10-12 22:50:46 +03:00
|
|
|
static inline void pause( ) {
|
2023-10-12 22:30:54 +03:00
|
|
|
for (uint64_t i = 0; i < 1024; i++) {
|
|
|
|
for (uint64_t j = 0; j < 1024; j++) {
|
2023-10-12 22:50:46 +03:00
|
|
|
for (uint64_t q = 0; q < 1; q++) { asm volatile("pause"); }
|
2023-10-12 22:30:54 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-30 22:21:56 +03:00
|
|
|
|
|
|
|
// Точка входа
|
2023-10-07 18:28:48 +03:00
|
|
|
extern "C" void _start( ) {
|
|
|
|
asm volatile("cli");
|
2023-09-30 22:21:56 +03:00
|
|
|
|
2023-10-07 18:28:48 +03:00
|
|
|
fb::init( );
|
2023-10-12 22:30:54 +03:00
|
|
|
arch::init( );
|
2023-10-07 18:28:48 +03:00
|
|
|
cpu::init( );
|
|
|
|
mem::init( );
|
2023-10-12 22:50:46 +03:00
|
|
|
fb::printf("\t\t\t\t *** Базовая Модульная Платформа Операционных Систем "
|
|
|
|
"версии %u.%u, %u ***\n",
|
|
|
|
VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD);
|
2023-10-12 22:30:54 +03:00
|
|
|
fb::printf("\t\t\t\t *** Дата сборки: %s %s ***\n", __DATE__, __TIME__);
|
|
|
|
mod::init( );
|
|
|
|
|
2023-10-07 18:28:48 +03:00
|
|
|
for (;;) { asm volatile("hlt"); }
|
2023-09-30 16:30:06 +03:00
|
|
|
}
|