mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:27:35 +00:00
Kernel: Detect support for CPUID FXSR
The fxsave and fxrstor instructions are available only if the FXSR feature is present.
This commit is contained in:
parent
90873781c1
commit
fea23d0ec1
2 changed files with 5 additions and 0 deletions
|
@ -971,6 +971,8 @@ UNMAP_AFTER_INIT void Processor::cpu_detect()
|
|||
set_feature(CPUFeature::PGE);
|
||||
if (processor_info.edx() & (1 << 23))
|
||||
set_feature(CPUFeature::MMX);
|
||||
if (processor_info.edx() & (1 << 24))
|
||||
set_feature(CPUFeature::FXSR);
|
||||
if (processor_info.edx() & (1 << 25))
|
||||
set_feature(CPUFeature::SSE);
|
||||
if (processor_info.edx() & (1 << 26))
|
||||
|
@ -1137,6 +1139,8 @@ String Processor::features_string() const
|
|||
return "syscall";
|
||||
case CPUFeature::MMX:
|
||||
return "mmx";
|
||||
case CPUFeature::FXSR:
|
||||
return "fxsr";
|
||||
case CPUFeature::SSE2:
|
||||
return "sse2";
|
||||
case CPUFeature::SSE3:
|
||||
|
|
|
@ -548,6 +548,7 @@ enum class CPUFeature : u32 {
|
|||
SSE4_2 = (1 << 20),
|
||||
XSAVE = (1 << 21),
|
||||
AVX = (1 << 22),
|
||||
FXSR = (1 << 23),
|
||||
};
|
||||
|
||||
class Thread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue