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:
@@ -60,6 +60,9 @@ generic_count_mtrrs(void)
|
|||||||
void
|
void
|
||||||
generic_init_mtrrs(uint32 count)
|
generic_init_mtrrs(uint32 count)
|
||||||
{
|
{
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
// disable and clear all MTRRs
|
// disable and clear all MTRRs
|
||||||
// (we leave the fixed MTRRs as is)
|
// (we leave the fixed MTRRs as is)
|
||||||
// TODO: check if the fixed MTRRs are set on all CPUs identically?
|
// TODO: check if the fixed MTRRs are set on all CPUs identically?
|
||||||
|
|||||||
@@ -358,11 +358,9 @@ arch_cpu_init_post_modules(kernel_args *args)
|
|||||||
|
|
||||||
close_module_list(cookie);
|
close_module_list(cookie);
|
||||||
|
|
||||||
if (sCpuModule == NULL)
|
// initialize MTRRs if available
|
||||||
return B_OK;
|
if (x86_count_mtrrs > 0)
|
||||||
|
call_all_cpus(&init_mtrrs, NULL);
|
||||||
// initialize MTRRs
|
|
||||||
call_all_cpus(&init_mtrrs, NULL);
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user