Fix AMD CPU selection in generic_x86 kernel add-on

* The AMD-part of the add-on is supposed to reject some very old
  models. However, a bug in the selection code caused it to reject
  anything with model-number smaller 9 regardless of model-family.
  This caused MTRR setup to not happen on many AMD CPUs and Haiku
  being very slow on these machines.

* Fixes #10571
This commit is contained in:
Julian Harnath 2014-02-26 21:47:41 +00:00
parent d035469704
commit f0ccf10243

View File

@ -28,7 +28,8 @@ amd_init(void)
// The K6-2 doesn't seem to support write-combining (before model 9),
// so we ignore anything before that one.
if (gCPU[0].arch.family <= 5 || gCPU[0].arch.model < 9)
if (gCPU[0].arch.family < 5
|| (gCPU[0].arch.family == 5 && gCPU[0].arch.model < 9))
return B_ERROR;
generic_mtrr_compute_physical_mask();