diff --git a/arch/x86/kernel/isrs.c b/arch/x86/kernel/isrs.c index b7747310..73f1e203 100644 --- a/arch/x86/kernel/isrs.c +++ b/arch/x86/kernel/isrs.c @@ -170,13 +170,14 @@ static void fpu_init(union fpu_state* fpu) if (has_fxsr()) { i387_fxsave_t* fx = &fpu->fxsave; - memset(fx, 0x00, sizeof(union fpu_state)); + memset(fx, 0x00, sizeof(i387_fxsave_t)); fx->cwd = 0x37f; if (has_xmm()) fx->mxcsr = 0x1f80; } else { i387_fsave_t *fp = &fpu->fsave; - memset(fp, 0x00, sizeof(union fpu_state)); + + memset(fp, 0x00, sizeof(i387_fsave_t)); fp->cwd = 0xffff037fu; fp->swd = 0xffff0000u; fp->twd = 0xffffffffu; diff --git a/arch/x86/kernel/processor.c b/arch/x86/kernel/processor.c index 93e5f540..f923fabb 100644 --- a/arch/x86/kernel/processor.c +++ b/arch/x86/kernel/processor.c @@ -45,8 +45,10 @@ int cpu_detection(void) if (has_avx()) kprintf("The CPU owns the Advanced Vector Extensions (AVX). However, MetalSVM doesn't support AVX!\n"); - if (has_fpu()) + if (has_fpu()) { + kputs("Found and initialize FPU!\n"); asm volatile ("fninit"); + } return 0; }