diff options
-rw-r--r-- | Kernel/Arch/i386/CPU.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp index 4cb3533fd0..7d13a29ec3 100644 --- a/Kernel/Arch/i386/CPU.cpp +++ b/Kernel/Arch/i386/CPU.cpp @@ -1003,15 +1003,16 @@ UNMAP_AFTER_INIT void Processor::cpu_detect() u32 max_extended_leaf = CPUID(0x80000000).eax(); - VERIFY(max_extended_leaf >= 0x80000001); - CPUID extended_processor_info(0x80000001); - if (extended_processor_info.edx() & (1 << 20)) - set_feature(CPUFeature::NX); - if (extended_processor_info.edx() & (1 << 27)) - set_feature(CPUFeature::RDTSCP); - if (extended_processor_info.edx() & (1 << 11)) { - // Only available in 64 bit mode - set_feature(CPUFeature::SYSCALL); + if (max_extended_leaf >= 0x80000001) { + CPUID extended_processor_info(0x80000001); + if (extended_processor_info.edx() & (1 << 20)) + set_feature(CPUFeature::NX); + if (extended_processor_info.edx() & (1 << 27)) + set_feature(CPUFeature::RDTSCP); + if (extended_processor_info.edx() & (1 << 11)) { + // Only available in 64 bit mode + set_feature(CPUFeature::SYSCALL); + } } if (max_extended_leaf >= 0x80000007) { |