No longer call init_mtrrs() if there are no MTRRs, also made generic_init_mtrrs()

no longer try to access any MSRs when there are no MTRRs. Got it? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17574 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-05-24 10:18:49 +00:00
parent 373e124fd8
commit 1283fc6e42
2 changed files with 6 additions and 5 deletions
@@ -60,6 +60,9 @@ generic_count_mtrrs(void)
void
generic_init_mtrrs(uint32 count)
{
if (count == 0)
return;
// disable and clear all MTRRs
// (we leave the fixed MTRRs as is)
// TODO: check if the fixed MTRRs are set on all CPUs identically?
+3 -5
View File
@@ -358,11 +358,9 @@ arch_cpu_init_post_modules(kernel_args *args)
close_module_list(cookie);
if (sCpuModule == NULL)
return B_OK;
// initialize MTRRs
call_all_cpus(&init_mtrrs, NULL);
// initialize MTRRs if available
if (x86_count_mtrrs > 0)
call_all_cpus(&init_mtrrs, NULL);
return B_OK;
}