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( );
|
|
|
|
|
|
|
|
void pause( ) {
|
|
|
|
for (uint64_t i = 0; i < 1024; i++) {
|
|
|
|
for (uint64_t j = 0; j < 1024; j++) {
|
|
|
|
// for (uint64_t q = 0; q < 1; q++) { asm volatile("pause"); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
pause( );
|
|
|
|
arch::init( );
|
|
|
|
pause( );
|
2023-10-07 18:28:48 +03:00
|
|
|
cpu::init( );
|
2023-10-12 22:30:54 +03:00
|
|
|
pause( );
|
2023-10-07 18:28:48 +03:00
|
|
|
mem::init( );
|
2023-10-12 22:30:54 +03:00
|
|
|
fb::printf("\t\t\t\t *** БМПОС %u.%u.%u.%u ***\n", VERSION_MAJOR,
|
|
|
|
VERSION_MINOR, VERSION_BUILD);
|
|
|
|
fb::printf("\t\t\t\t *** Дата сборки: %s %s ***\n", __DATE__, __TIME__);
|
|
|
|
mod::init( );
|
|
|
|
pause( );
|
|
|
|
|
|
|
|
asm volatile("int $0");
|
2023-09-30 22:51:57 +03:00
|
|
|
|
2023-10-07 18:28:48 +03:00
|
|
|
for (;;) { asm volatile("hlt"); }
|
2023-09-30 16:30:06 +03:00
|
|
|
}
|