- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I everyone, I need to use some assembly calls to get informations about the hardware on x86: where I can get some docs with the list of all the possible registers that I can use and some basic documentation on them ? I'm also interested in any other possible set of registers to get all the possible informations that I can get.
Please note that I don't need docs on the intrinsics, I have the compiler docs for them, just plain old assembly.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe "http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html" is what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GHui wrote:
Maybe "http://www.intel.com/content/www/us/en/processors/architectures-software..." is what you need.
Thanks, but it looks like a long list of really beefy docs, can you be more specific ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I think I'm getting something out of this, with reference to the document 64-ia-32-architectures-software-developer-vol-2a-manual.pdf
I'm putting 1 in EAX and EAX is returning
00000000000000000000011011111011
on an X86 64 bit CPU, the problem is that in that document there are no information about how to decode this, at page 227 there is just a scheme with no information about what this bits mean.
How I can decode this information without the proper docs ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vol 2 contains details of each assembly instruction.
If you look for the CPUID instruction, you will see a description of the info returned by the CPUID instruction.
There is no easy list of registers. And many registers change with each processor and some registers change with different steppings of the processor. Then there are the platform registers, other device specific registers (battery, gfx card, display), OS registers, bios, smbios, sensors, BMC, etc, etc.
What are you trying to accomplish? Have you looked for already available software or libraries that do what you want to do? There are tools like cpu-z, hw-monitor from http://www.cpuid.com/ and software libaries such as http:openhardwaremonitor.org. On the linux side the /proc/cpuinfo files display lots of cpu info.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That doc has been removed as it was mostly a duplicate of the info in the SDM vol 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Patrick Fay (Intel) wrote:
Vol 2 contains details of each assembly instruction.
If you look for the CPUID instruction, you will see a description of the info returned by the CPUID instruction.
There is no easy list of registers. And many registers change with each processor and some registers change with different steppings of the processor. Then there are the platform registers, other device specific registers (battery, gfx card, display), OS registers, bios, smbios, sensors, BMC, etc, etc.
What are you trying to accomplish? Have you looked for already available software or libraries that do what you want to do? There are tools like cpu-z, hw-monitor from http://www.cpuid.com/ and software libaries such as http:openhardwaremonitor.org. On the linux side the /proc/cpuinfo files display lots of cpu info.
Pat
I'm trying to implement my own library in C++ since I need a C++ interface and doing this kind of things in C++ is a lot easier than using C.
CPU-z is closed source, it's not a library, and it also runs only under Windows, /proc/cpuinfo not only is not a library but is probably buggy since it shows me flags that I don't have enabled on my hardware, for example my CPU doesn't have HyperThreading but cpuinfo shows that flag among the ones that are supported by my CPU.
I can't find a good library in C++ so I'm writing one on my own.
I noticed that the flags returned by EAX=1 and EAX=80000001h are probably the most "stable" ones because I can't see too much variation across different platforms and their output/meaning is not related to other values of EAX/EBX/ECX/EDX from other registers.
I don't think that the complexity of something can be an excuse ( which is probably not complex at all, if Intel has manufactured all the Intel CPUs out there Intel surely knows what is in what, it's probably "a long list" not a "complex thing" ), if Intel is publishing something called "software developer manual" it should contain all the necessary informations to develop software with Intel products, if you are just telling me what is supposed to be the position of a given set of bit without telling me how to decode those bits, well, I can do software with Intel products just like I did before reading that guide/manual, which means that the manual is useless.
the point is: or there is another companion resource to that manual or I can't really see the point of it, at least when it comes to CPUID assembly instructions.
If there is something that I'm missing please tell me what it is and where to find it, and If you have another opinion explain it, I'm just surprised that with official docs I'm not able to use official products.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's look at the output of cpuid.01h (meaning when you input eax= 01h). Looking at table 3-17 for input eax=01h, we see for example, that bit 8-15 of ebx is the CLFLUSH size (where you have to multiply the extracted bits by 8 to get the cache line size in bytes. Does this make sense?
The rest of table 3-17 similarly explains how to extract the rest of the fields (or references another table which explains how to extract the info). In the old cpuid app note there was some sample C code to extract lots of the cpuid info.... but that has apparently gone away.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not exactly what you are looking for , but anyway you might read those posts if you are interested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bp wrote:
Ok, I think I'm getting something out of this, with reference to the document 64-ia-32-architectures-software-developer-vol-2a-manual.pdf
I'm putting 1 in EAX and EAX is returning00000000000000000000011011111011
on an X86 64 bit CPU, the problem is that in that document there are no information about how to decode this, at page 227 there is just a scheme with no information about what this bits mean.
How I can decode this information without the proper docs ?
When [EAX] = 1 then the information returned in eax register will contain only version information of your cpu.First four bits i.e EAX [3-0] == Stepping ID.Next four bits i.e EAX[7-4] == Model.Next four bits i.e EAX[11-8] == Family .Next four bits are reserved/do not contain any information. Bits 16-19 i.e EAX[19-16] == Extended Model ID.Next 8 bits compose Extended family ID i.e EAX[27-20] == Extended Family ID and last four bits are reserved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Patrick Fay (Intel) wrote:
That doc has been removed as it was mostly a duplicate of the info in the SDM vol 2.
Sorry did not read that info.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page