summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea G. Monaco <andrea.monaco@autistici.org>2021-02-11 13:31:31 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-02-11 13:31:31 +0100
commit307130477110d33ab193f4f5376847d2234c1aca (patch)
treecd8f9961e1e00a8a4cdd7f1be25e27d9ea24c541
parentd80a4d8734a6598daf449835d1aa7de09c986250 (diff)
i386 fpu: fix bogus check
Avoid panicing on all CPUs that do not support xsaves. * i386/i386/fpu.c (init_fpu): Panic on CPUs that do not support xsaves only if the cpu-reported xsave size is smaller than expected.
-rw-r--r--i386/i386/fpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index b9dff733..a8459d65 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -191,7 +191,7 @@ init_fpu(void)
ecx = 0x0;
cpuid(eax, ebx, ecx, edx);
fp_xsave_size = offsetof(struct i386_fpsave_state, xfp_save_state) + ebx;
- if(fp_xsave_size < sizeof(struct i386_fpsave_state));
+ if(fp_xsave_size < sizeof(struct i386_fpsave_state))
panic("CPU-provided xstate size %d "
"is smaller than our minimum %d!\n",
fp_xsave_size,