Processor-Type and -Level

Olaf Leidinger leidola at
Mon Dec 1 13:22:49 CST 2003


Once I tried to install the win32 version of gimp-1.3.xx-i686 using wine
and the installer refused to install because gimp was only compiled for
newer processors. The author told me, that he uses the GetSystemInfo
function to get the data he needs.

Running a modified MS-example on wine I get this result:

Hardware information:
  OEM ID: 0
  Number of processors: 1
  Page size: 4096
  Processor type: 586
  Processor Level: 5
  Processor Revision: 0
  Minimum application address: 10000
  Maximum application address: 7fffffff
  Active processor mask: 1

And the same on Win2k I get this output:

Hardware information:
  OEM ID: 0
  Number of processors: 1
  Page size: 4096
  Processor type: 586
  Processor Level: 6
  Processor Revision: 2560
  Minimum application address: 10000
  Maximum application address: 7ffeffff
  Active processor mask: 1

Note - I am using an athlon-xp.

/********** some source ***********/
#include <windows.h>
#include <stdio.h>
int main()
   SYSTEM_INFO siSysInfo;
   // Copy the hardware information to the SYSTEM_INFO structure.
   // Display the contents of the SYSTEM_INFO structure.
   printf("Hardware information: \n");
   printf("  OEM ID: %u\n", siSysInfo.dwOemId);
   printf("  Number of processors: %u\n",
   printf("  Page size: %u\n", siSysInfo.dwPageSize);
   printf("  Processor type: %u\n", siSysInfo.dwProcessorType);
   printf("  Processor Level: %u\n", siSysInfo.wProcessorLevel);
   printf("  Processor Revision: %u\n", siSysInfo.wProcessorRevision);
   printf("  Minimum application address: %lx\n",
   printf("  Maximum application address: %lx\n",
   printf("  Active processor mask: %u\n",
   return 1;

/********** end of some source ***********/

To bring a long story to an end:
I had a look at cpu.c from dll/kernel directory and I found this part:
[line 251]
	/* FIXME: the two entries below should be computed somehow... */
	cachedsi.lpMinimumApplicationAddress	= (void *)0x00010000;
	cachedsi.lpMaximumApplicationAddress	= (void *)0x7FFFFFFF;
	cachedsi.dwActiveProcessorMask		= 1;
	cachedsi.dwNumberOfProcessors		= 1;
	cachedsi.dwProcessorType		= PROCESSOR_INTEL_PENTIUM;
	cachedsi.dwAllocationGranularity	= 0x10000;
	cachedsi.wProcessorLevel		= 5; /* 586 */
	cachedsi.wProcessorRevision		= 0;

So the corresponding values are compiled in. 

Either we change wProcessorLevel to 6 or get it from the running system.
I'd prefer the later ;-)

When I have some free time I could -perhaps- try to fix it  but I've
never changed something in the wine source. Does anybody have any
proposals of how to change it in an acceptable manner?

I know that all the information I need can be read from /proc/cpuinfo -
but perhaps there is an easier way then reading it from there as I don't
know if it is still there in 2.6.


Olaf Leidinger

More information about the wine-devel mailing list