summaryrefslogtreecommitdiff
path: root/Kernel/Arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Arch/x86')
-rw-r--r--Kernel/Arch/x86/common/Processor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp
index a55a7dd4e5..32f038712d 100644
--- a/Kernel/Arch/x86/common/Processor.cpp
+++ b/Kernel/Arch/x86/common/Processor.cpp
@@ -594,6 +594,14 @@ UNMAP_AFTER_INIT void Processor::cpu_setup()
MSR sfmask_msr(MSR_SFMASK);
sfmask_msr.set(rflags_mask);
#endif
+
+ // Query OS-enabled CPUID features again, and set the flags if needed.
+ CPUID processor_info(0x1);
+ if (processor_info.ecx() & (1 << 27))
+ m_features |= CPUFeature::OSXSAVE;
+ CPUID extended_features(0x7);
+ if (extended_features.ecx() & (1 << 4))
+ m_features |= CPUFeature::OSPKE;
}
UNMAP_AFTER_INIT void Processor::early_initialize(u32 cpu)