cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

avk
Adept III

CPUID values' manipulation

Is it possible to manipulate the CPUID values returned back to a program?

I know about MSRs responsible on CPUID.8000_0002..4 (i.e. CPU Name), but I'm rather talking about CPUID.0000_0000..1 and CPUID.8000_0000..1. I suspect that some programs are too relying on these CPUID values, so I need a tool to proof it.
Tags (1)
0 Likes
27 Replies

CPUID values' manipulation

In general I don't know of any way to manipulate the CPUID results returned by the processor. There is a bit in MSR MSRC001_0015, Hardware Configuration Register (HWCR) which allows you to disable certain SSE instructions (bit 15). I've copied the text from the BIOS and Kernel Developer's Guide below. You can get the guide here: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116.PDF

15 SseDis: SSE instructions disable. Read-write. 1=Disables SSE instructions. If this is set, then
CPUID Fn[8000_0001, 0000_0001]_EDX[SSE, SSE2], CPUID Fn0000_0001_ECX[SSE3], and
CPUID Fn8000_0001_ECX[SSE4A] are 0.

Regards,

  Randy 

0 Likes
avk
Adept III

CPUID values' manipulation

Thank you for the information. But my point is slightly different: to replace, for example, "AuthenticAMD" string with "GenuineIntel". You see, I know several applications that are relying on this string, and I suspect that this quirk is a cause of slowdown of those applications on non-Intel CPUs. All I need is a tool capable of these manipulation. Maybe such a thing possible on some virtual machine?
0 Likes
avk
Adept III

CPUID values' manipulation

Well, there are interesting information about changing CPUID: Ars Technica. In brief: a VIA Nano CPU has an ability to change its CPUID.Vendor string, and this ability in the hands of article's author leads to impressive results: PCMark 2005 Memory Score was improved by 47.4%! It's very pity that none of AMD CPUs have mentioned ability (maybe enginering samples have?) - this would be useful to proof that many programs rely of "GenuineIntel" string.
0 Likes
agner
Adept I

CPUID values' manipulation

I have made similar observations for software compiled with an Intel compiler or using an Intel function library. The software has a CPU dispatcher which chooses the optimal code path depending on which instruction set is supported. Unfortunately, the CPU dispatcher refuses to acknowledge anything in a CPU that doesn't have the "GenuineIntel" identifier. If you have the source code, it is possible to recompile it with the Intel CPU dispatcher replaced. See www.agner.org/optimize/optimizing_cpp.pdf for the details. The result is a dramatic increase in speed on AMD processors for math functions and certain other functions.

If the source code is not available, then the only possibility for improving the speed of the Intel-compiled software on an AMD processor is to find the CPU dispatcher inside the binary code and modify it manually, which is quite difficult. However, it is possible to verify that the code looks for the "GenuineIntel" string by searching the binary file for this string. The string is divided into three 32-bit constants with the values "Genu" "ineI" "ntel". Use any search tool to look for each of these string fragments in the .exe and .dll files used.

0 Likes
avk
Adept III

CPUID values' manipulation

I have already did such an investigation and even more . For example:
1) ABBYY Fine Reader 8.0's ScanMan.exe contains the CPU dispatcher which blocks the SSE2 code path (and chooses x87) on CPU with Vendor = "AuthenticAMD" and Base Family = 0Fh, i.e. on K8 & K10!
2) Several DivX 6.x versions contain similar CPU dispatcher which blocks SSE's (and chooses MMX) on CPU with Vendor != "GenuineIntel".

What unfair play!
0 Likes
agner
Adept I

CPUID values' manipulation

Try to file a bug report with a detailed explanation and see what they say. They may not be aware what the Intel compiler is doing.

0 Likes
avk
Adept III

CPUID values' manipulation

Ok, I'll try.
0 Likes
avk
Adept III

CPUID values' manipulation

Please, tell me: is it possible to disable 3DNow! & E3DNow! instructions, excluding PREFETCH/W? Some even not so old programs use 3DNow! instead of SSEx (do you know Far Cry and Crysis games?), so K10's performance in those cases is undeservedly suffers. If would be nice feature to enable/disable 3DNow! in the BIOS - several games and multimedia programs will increase their performance. BTW, what about to implement this feature into the new Fusion software utility?
0 Likes
Tatsumaru
Journeyman III

CPUID values' manipulation

found a tool to manipulate the CPUID

check this link:

http://f0dder.reteam.org/amdp4.htm

i think it needs some improvement

 

0 Likes