[MPlayer-dev-eng] [Patch] Correction of P4 family CPUs detection in cputable.h

Zuxy zuxy.meng at gmail.com
Sun Oct 2 11:08:03 CEST 2005


Hi,

Cputable.h seems outdated and contains incorrect information for P4 family 
CPUs. It's not a critical issue though and it's easy to fix.

--- MPlayer-1.0pre7try2\cputable.h      Tue Dec 16 21:35:01 2003
+++ MPlayer-1.0pre7try2.new\cputable.h  Sun Oct  2 16:56:25 2005
@@ -119,11 +119,11 @@
                        /* D */ F_UNKNOWN,
                        /* E */ F_UNKNOWN,
                        /* F extended family (P4/new IA-64)*/ {
-                               /* 0 */ N_UNKNOWN,
-                               /* 1 */ "Pentium 4/Xeon Willamette",
-                               /* 2 */ "Pentium 4/Xeon/Celeron Foster",
-                               /* 3 */ "Pentium 4/Xeon/Celeron Northwood",
-                               /* 4 */ N_UNKNOWN,
+                               /* 0 */ "Pentium 4 Willamtte/Xeon Foster",
+                               /* 1 */ "Pentium 4 Willamette/Xeon Foster",
+                               /* 2 */ "Pentium 4/Celeron D Northwood/Xeon 
Prestonia/Gallatin",
+                               /* 3 */ "Pentium 4/Celeron D Prescott/Xeon 
Nocona",
+                               /* 4 */ "Pentium 4/Celeron D Prescott/Xeon 
Nocona",
                                /* 5 */ N_UNKNOWN,
                                /* 6 */ N_UNKNOWN,
                                /* 7 */ N_UNKNOWN,


In addition, according to Intel/AMD official documentations, CPU family should 
be displayed as the sum of CPUID's family field and extended family field when 
a CPU has a CPUID family 0xF.

--- MPlayer-1.0pre7try2\cpudetect.c     Thu Jan 13 05:56:25 2005
+++ MPlayer-1.0pre7try2.new\cpudetect.c Sun Oct  2 17:04:49 2005
@@ -122,7 +122,7 @@
                caps->cpuType=(regs2[0] >> 8)&0xf;
                if(caps->cpuType==0xf){
                    // use extended family (P4, IA64)
-                   caps->cpuType=8+((regs2[0]>>20)&255);
+                   caps->cpuType=0xf+((regs2[0]>>20)&255);
                }
                caps->cpuStepping=regs2[0] & 0xf;






More information about the MPlayer-dev-eng mailing list