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
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.
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.
found a tool to manipulate the CPUID
check this link:
http://f0dder.reteam.org/amdp4.htm
i think it needs some improvement
Thanks, but my point was slightly different: I'd like to manipulate the CPUID.0000_0000:1 and 8000_0000:1 values. Alas, seems that there is no way to do it .
Hey, AMD! Sorry for repeating myself. If you would implement the CPUID.01.Vendor change feature, this would help you to sue Intel about unfair play. Just imagine how simply you would provide the evidence, just by changing the CPUID.Vendor in BIOS from "AuthenticAMD" to "GenuineIntel". VIA already made such a feature, so why didn't you? What are you waiting for?
Originally posted by: avk Hey, AMD! Sorry for repeating myself. If you would implement the CPUID.01.Vendor change feature, this would help you to sue Intel about unfair play. Just imagine how simply you would provide the evidence, just by changing the CPUID.Vendor in BIOS from "AuthenticAMD" to "GenuineIntel". VIA already made such a feature, so why didn't you? What are you waiting for?
I have found "AMD Processor Recongition" ( 20734.pdf ) on their site, which seems to describe pretty much what you needed...
I have found "AMD Processor Recongition" ( 20734.pdf ) on their site, which seems to describe pretty much what you needed...
C**p, it's for old 32-bit generation chips...
Again and again I will repeat: "Carthage must be destroyed!" I mean: Intel must be catched in its unfair play a.k.a "GenuineIntel" on the software market! Do you know that lots of software contain this CPUID.Vendor check (what about Adobe Creative Suite 1, 2, 3, 4) which is preventing them to use most of SIMD extensions on non-Intel CPUs? Why are you still do nothing against it?
Is that so difficult to implement an allocation of three MSRs like this?:
1st MSR: First eight ASCII symbols of CPUID.Vendor string;
2nd MSR: Last four ASCII symbols of CPUID.Vendor string and one 32-bit value for CPUID.FamilyModelStepping (just to make Family = 06);
3rd MSR: AND-mask for CPUID.8000_0001 to hide AMD-specific features which usually are not present in Intel CPUs (3DNow!, E3DNow!, EMMX, 3DNow! Prefetch, SSE4A, LZCNT, XOP, CVT16, FMA4 etc).
You could allow user to program these MSRs in the BIOS only by reading some sort of disclaimer if you want, but you definitely should implement this feature to let people know that Intel is a fraud. Here, in Europe, you could change people's mind by doing this, not sure about the other world.
agner: Relax, it's just an imitation I've made . I just want to say that AMD should implement such a feature (let's call it "Chameleon") long time ago, say, in 1996, with the K5 release. This feature would be a very simple and efficient way to proof that many programs are too sensitive to CPUID.Vendor string.
P.S. BTW, It seems that I've made a (small) mistake in the second "Chameleon" feature page: CPUID.0000_0001.Signature.
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? | |
I have collected major facts about the Intel compiler issue on my blog:
http://www.agner.org/optimize/blog/read.php?i=49
Nice put, I'd say. But, like I said, a petition would be a more efficient form of expression.
BTW, I've written a small program that can change the "Genu"+"ineI"+"ntel" into the "Auth"+"enti"+"cAMD" and vice versa. You wouldn't believe how much these signatures were found in a miscellaneous software! I recall Morpheus' phrase: "The Matrix is everywhere, it is all around us."
Originally posted by: avk I've written a small program that can change the "Genu"+"ineI"+"ntel" into the "Auth"+"enti"+"cAMD" and vice versa.
Have you found any examples of programs that run faster on AMD when you change this string in the binary?
If you publish your code then everybody can try with their programs.
The program itself is very simple, every coder (even rookie) can create something alike. But I can, of course, publish its source .
As for its testing: not thoroughly. I think you perfectly know that just changing a CPUID.Vendor Signature from one to another is not enough. Every case, I believe, should be thoroughly analyzed and debugged. You see, my goal is to check as many modern PC games as I can, but, alas, I'm not so rich to buy all of them. If I'd try to use their illegal versions (downloaded from the Torrent, for example), who'd believe my results?
cpuid dumps detailed information about the CPU(s) gathered from the CPUID instruction, and also determines the exact model of CPU(s) from that information. It dumps all information available from the CPUID instruction. The exact collection of information available varies between manufacturers and even between different CPUs from a single manufacturer.
I have made a program that can manipulate the CPUID vendor string, family and model number on VIA Nano processors. You can download it from http://www.agner.org/optimize/cpuidfake.zip . It works only on VIA, not on AMD or Intel processors.
Now you can test if a program runs faster if you cange the CPUID. All you need is a computer with a VIA processor (The VIA Mini-ITX board costs less than 200$ and fits into a standard desktop cabinet).
If you find any benchmarks or other commonly used programs with evidently unfair CPU dispatching then please let me know.
Thank you, Agner!
Hey, AMD, wake up! What are you waiting for? Intel will never be a fair player on the CPU market, and you perfectly know this! I believe that it is extremely urgent that you, AMD, should implement this feature. Is it so damn difficult to implement just two or three additional MSR in order to make your CPUs a chameleons like VIA did back in 2003 with C3?
Originally posted by: avk
I believe that it is extremely urgent that you, AMD, should implement this feature.
Considering how long the development cycle of a microprocessor is, it will take several years before we have a CPUID change feature in an AMD processor if they decide to make one. By that time, Intel will probably have changed their strategy due to legal pressure and bad publicity.
It would be much faster to make a CPUID manipulation program based on AMD virtualization instructions. I don't have the time to make such a program, but I hope that somebody else will do it. It could be added as a feature to existing virtualization software. Some virtualization tools are open source, so this is doable.
Maybe you're right.