Ticket #553: generic_x86.cpp.diff
File generic_x86.cpp.diff, 1.1 KB (added by , 18 years ago) |
---|
-
generic_x86.cpp
28 28 #define IA32_MTRR_ENABLE_FIXED (1UL << 10) 29 29 #define IA32_MTRR_VALID_RANGE (1UL << 11) 30 30 31 32 31 struct mtrr_capabilities { 33 32 mtrr_capabilities(uint64 value) { *(uint64 *)this = value; } 34 33 … … 48 47 { 49 48 cpuid_info cpuInfo; 50 49 if (get_current_cpuid(&cpuInfo, 1) != B_OK 51 || (cpuInfo.eax_1.features & IA32_FEATURE_MTRR) == 0) 50 || (cpuInfo.eax_1.features & IA32_FEATURE_MTRR) == 0 51 || (cpuInfo.eax_1.features & IA32_FEATURE_MSR) == 0) 52 52 return 0; 53 53 54 54 mtrr_capabilities capabilities(x86_read_msr(IA32_MSR_MTRR_CAPABILITIES)); … … 160 160 void 161 161 generic_dump_mtrrs(uint32 count) 162 162 { 163 164 cpuid_info cpuInfo; 165 if (get_current_cpuid(&cpuInfo, 1) != B_OK 166 || (cpuInfo.eax_1.features & IA32_FEATURE_MTRR) == 0 167 || (cpuInfo.eax_1.features & IA32_FEATURE_MSR) == 0) 168 return; 169 163 170 if (x86_read_msr(IA32_MSR_MTRR_DEFAULT_TYPE) & IA32_MTRR_ENABLE) { 164 171 TRACE(("MTRR enabled\n")); 165 172 } else {