Вынос инициализации FPU из кода ядра в

This commit is contained in:
Aren Elchinyan 2023-12-12 21:42:25 +03:00
parent f4d7b3e4e9
commit 5236f156e6
2 changed files with 5 additions and 6 deletions

View File

@ -94,12 +94,6 @@ void cpu_idle( ) {
void cpu_init( ) {
uint32_t eax, ebx, ecx, edx;
cpuid(1, &eax, &ebx, &ecx, &edx);
if ((edx >> 0) & 1) {
asm volatile("finit");
LOG("FPU(x87) поддерживается!\n");
}
if ((edx >> 22) & 1) {
acpi_msrs_support = true;
LOG("Встроенный терморегулятор MSRS для ACPI\n");

View File

@ -12,6 +12,11 @@ module_info_t __attribute__((section(".minit"))) init(env_t *env) {
uint32_t eax, ebx, ecx, edx;
cpuid(1, &eax, &ebx, &ecx, &edx);
if ((edx >> 0) & 1) {
asm volatile("finit");
fb_printf("FPU(x87) поддерживается!\n");
}
if ((edx >> 23) & 1) { fb_printf("MMX поддерживается!\n"); }
if ((edx >> 25) & 1) {