From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing / Hardware (Rated C-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
Taskforce icon
This article is supported by Computer hardware task force (marked as Low-importance).

Unnamed section #1[edit]

CPUID is not specific to Intel Architecture, but its used in other CPUs as well, for example ARM MPCore [1], Altera NIOS2 [2]. In general, any architectural that supports Linux SMP kernel, must be able to uniquely identify underlaying processor to the kernel.

This page should be updated to incorporate this.

--Asadzia 07:56, 26 March 2007 (UTC)

IMO, the list of manufacturer IDs (specifically Transmeta) should be on individual lines, as the 2nd id for Transmeta was hiding. I'm gonna change it, unless theres a good reason why it was done this way. (talk) 19:47, 17 November 2010 (UTC)

Unnamed section #2[edit]

The first example code segfaults when I run it, compile with:

as -g cpuid.asm -o cpuid.o
ld  -dynamic-linker /lib64/ -lc cpuid.o -o cpuid

Is this my error or is the source incorrect? My assembly isn't great, but shouldn't there be a

movl $1, %eax
int  $0x80

Kobrien88 (talk) 03:16, 23 January 2011 (UTC)

With the assemble/link commands you are using, yes, you are correct (at least on Linux.) I went ahead and changed the code. Should work with no segfaults now. Kabure (talk) 01:36, 14 February 2011 (UTC)

What is the rationale behind using assembly language snippets in this article? As shown under "..other languages" CPUID can be easily called from within C. As the majority of the assembly is about bit shifting, masking and formatting I'd consider C (or maybe even pseudo code) far more readable and giving more information to the average reader. I nobody speaks up, I'd like to replace the programs for the cache information and the brand string with C or pseudo code snippets. Also I'd like to add new leaves, especially AMD specific ones. To what detail shall this happen? Just a short description of the contained information or the full bit mask description? --APritzel (talk) 14:02, 1 August 2011 (UTC)

Hi, I get segfaults under Linux with Intel Compiler with the code in this article titled with "Or, a generally useful C implementation that works on 32 and 64 bit setups". The code was compiled als follows: icc -O0 -g test.c -o test. No segfault without -O0. Any idea? Disassembly:

Dump of assembler code for function cpuid:
0x000000000040056c <cpuid+0>:   push   %rbp
0x000000000040056d <cpuid+1>:   mov    %rsp,%rbp
0x0000000000400570 <cpuid+4>:   sub    $0x50,%rsp
0x0000000000400574 <cpuid+8>:   mov    %rbx,-0x18(%rbp)
0x0000000000400578 <cpuid+12>:  mov    %edi,-0x10(%rbp)
0x000000000040057b <cpuid+15>:  mov    %rsi,-0x50(%rbp)
0x000000000040057f <cpuid+19>:  mov    %rdx,-0x48(%rbp)
0x0000000000400583 <cpuid+23>:  mov    %rcx,-0x40(%rbp)
0x0000000000400587 <cpuid+27>:  mov    %r8,-0x38(%rbp)
0x000000000040058b <cpuid+31>:  mov    -0x50(%rbp),%rax
0x000000000040058f <cpuid+35>:  mov    -0x10(%rbp),%edx
0x0000000000400592 <cpuid+38>:  mov    %edx,(%rax)
0x0000000000400594 <cpuid+40>:  mov    -0x50(%rbp),%rax
0x0000000000400598 <cpuid+44>:  mov    -0x48(%rbp),%rdx
0x000000000040059c <cpuid+48>:  mov    -0x40(%rbp),%rcx
0x00000000004005a0 <cpuid+52>:  mov    -0x38(%rbp),%rbx
0x00000000004005a4 <cpuid+56>:  mov    %rax,-0x30(%rbp)
0x00000000004005a8 <cpuid+60>:  mov    (%rax),%eax
0x00000000004005aa <cpuid+62>:  mov    %rcx,-0x28(%rbp)
0x00000000004005ae <cpuid+66>:  mov    %rdx,-0x20(%rbp)
0x00000000004005b2 <cpuid+70>:  mov    %ebx,%edi
0x00000000004005b4 <cpuid+72>:  cpuid
0x00000000004005b6 <cpuid+74>:  mov    %ebx,%esi
0x00000000004005b8 <cpuid+76>:  mov    %edi,%ebx
0x00000000004005ba <cpuid+78>:  mov    %edx,(%rbx)
0x00000000004005bc <cpuid+80>:  mov    -0x28(%rbp),%rdx
0x00000000004005c0 <cpuid+84>:  mov    %ecx,(%rdx)
0x00000000004005c2 <cpuid+86>:  mov    -0x20(%rbp),%rdx
0x00000000004005c6 <cpuid+90>:  mov    %esi,(%rdx)
0x00000000004005c8 <cpuid+92>:  mov    -0x30(%rbp),%rdx
0x00000000004005cc <cpuid+96>:  mov    %eax,(%rdx)
0x00000000004005ce <cpuid+98>:  mov    -0x18(%rbp),%rbx
0x00000000004005d2 <cpuid+102>: leaveq
0x00000000004005d3 <cpuid+103>: retq
End of assembler dump.

ECX is output-only?[edit]

There is nothing on the page (or to my knowledge anywhere else) which supports the assertion that the ECX register is ever involved in selecting a return value.

the value in the EAX register, and in some cases the ECX register, specifies what information to return

Accordingly I propose that the highlit phrase be struck from the article. Martin Kealey (talk) 04:01, 21 August 2013 (UTC)

Extended function msb[edit]

The article says "To obtain extended function information CPUID should be called with the second most significant bit of EAX set. To determine the highest extended function calling parameter, call CPUID with EAX = 80000000h." Isn't 0x80000000 setting the most significant bit, rather than the 2nd msb? (talk) 06:54, 24 February 2014 (UTC)

CPUID for input EAX=4[edit]

Does useful stuff. Should be added. (talk) 08:45, 10 July 2014 (UTC)

App note 485 gone[edit]

Even the removal notice thereof is gone from Intel's site, but the notice can still be read at (talk) 09:58, 10 July 2014 (UTC)

External links modified[edit]

Hello fellow Wikipedians,

I have just added archive links to one external link on CPUID. Please take a moment to review my edit. You may add {{cbignore}} after the link to keep me from modifying it, if I keep adding bad data, but formatting bugs should be reported instead. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether, but should be used as a last resort. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

You may set the |checked=, on this template, to true or failed to let other editors know you reviewed the change. If you find any errors, please use the tools below to fix them or call an editor by setting |needhelp= to your help request.

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

If you are unable to use these tools, you may set |needhelp=<your help request> on this template to request help from an experienced user. Please include details about your problem, to help other editors.

Cheers.—cyberbot IITalk to my owner:Online 07:04, 28 March 2016 (UTC)

KVM manufacturer ID string[edit]

The KVM manufacturer ID string is only 9 characters long - should it not be 12? — Preceding unsigned comment added by Joe Glancy (talkcontribs) 17:50, 10 June 2016 (UTC)