diff --git a/headers/private/kernel/arch/x86/arch_cpu.h b/headers/private/kernel/arch/x86/arch_cpu.h index dbb6cb1e5c..2acd0271bf 100644 --- a/headers/private/kernel/arch/x86/arch_cpu.h +++ b/headers/private/kernel/arch/x86/arch_cpu.h @@ -352,6 +352,7 @@ // cr4 flags #define IA32_CR4_PAE (1UL << 5) +#define IA32_CR4_MCE (1UL << 6) #define IA32_CR4_GLOBAL_PAGES (1UL << 7) #define CR4_OS_FXSR (1UL << 9) #define CR4_OS_XMM_EXCEPTION (1UL << 10) diff --git a/src/system/kernel/arch/x86/arch_cpu.cpp b/src/system/kernel/arch/x86/arch_cpu.cpp index e62c85e28f..fc120be406 100644 --- a/src/system/kernel/arch/x86/arch_cpu.cpp +++ b/src/system/kernel/arch/x86/arch_cpu.cpp @@ -1350,6 +1350,9 @@ arch_cpu_init_percpu(kernel_args* args, int cpu) gCpuIdleFunc = halt_idle; } + if (x86_check_feature(IA32_FEATURE_MCE, FEATURE_COMMON)) + x86_write_cr4(x86_read_cr4() | IA32_CR4_MCE); + #ifdef __x86_64__ // if RDTSCP is available write cpu number in TSC_AUX if (x86_check_feature(IA32_FEATURE_AMD_EXT_RDTSCP, FEATURE_EXT_AMD))