| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
[RESOLVED] How to get Processor Serial Number
Well, this question was posted tens times.
I know that acual Intel/AMD CPUs does not support Processor Serial Number. Next function demonstrates this. Executing CPUID with EAX=1, and then test bit 18 of EDX (Processor Serial Number feature flag - is always '0'). Code:
bool CPU::IsCPUSerialSupported()
{
bool bSupported = false;
DWORD cpufeat = 0;
_asm
{
xor eax, eax
inc eax
CPUID
mov cpufeat, edx
}
if(0x00040000 & cpufeat) // get bit 18
{
bSupported = true;
}
return bSupported;
}
)In fact, MY QUESTION IS: Does enybody know why it is not supported? Is it not possible for the manufacturer to assure an unique one, or it's a privacy reason, or someting else? Also, does enybody know if this will be changed in the future?
__________________
Ovidiu Cucu
|
|
#2
|
||||
|
||||
|
no rules
Hi Ovidiu!
Interesting subject you're bringing. Don't know too much about so many processors types and manufacturers, so you've made me curious about it. It seems same as for graphics cards, or in fact, for most of the hardware, ... there're no rules constraining the manufacturers about certain things. Did search about more info and came across some nice links. Just in case it might bring you something useful: http://osdev.berlios.de/cpuid.html http://www.sandpile.org/ia32/cpuid.htm http://www.ka9q.net/code/cpuid/ http://grafi.ii.pw.edu.pl/gbm/x86/cpuid.html http://www.paradicesoftware.com/specs/cpuid/ Best part I've read on this subject was: Quote:
__________________
Bogdan Apostol ESRI Developer Network Compilers demystified - Function pointers in Visual Basic 6.0 Enables the use of function pointers in VB6 and shows how to embed native code in a VB application. Customize your R2H The unofficial board dedicated to ASUS R2H UMPC owners. |
|
#3
|
||||
|
||||
|
Thank you for the answer and for useful links.
What is strange is that it seems the manufacturers "made place" for Processor Serial Number, (CPUID function 3 (EAX=3)), but did not implement it. Why? I attached a little test application in this long thread (cpuid.zip). Even the maximum CPUID function reported is 2 (and also PSN flag is '0'), it executes (just for testing) CPUID with EAX=3. Well, it not chrashes but the results are the same as for function 2.So, from Processor Serial Number point of view this is garbage
__________________
Ovidiu Cucu
|
|
#4
|
||||
|
||||
|
take in consideration that in most motherboards the processor serial number becomes disabled by default, so it's not worth programming anything with a feature that it's useless..
__________________
Visit my page: http://usuarios.lycos.es/hernandp and my blog... http://hernandp.blogspot.com |
|
#5
|
|||
|
|||
Quote:
Not very clear, please explain more.
__________________
VOTE HERE! |
|
#6
|
||||
|
||||
|
Re: How to get Processor Serial Number
I mean that the motherboard BIOS disables the processor serial number (this is configurable with the CMOS Setup) but suppose that you program an application that effectively uses that Serial Number. In fact, in most mobos the default setting is Processor SN : DISABLED.
I do not recommend using this "feature" because : 1) from the end user perspective: many users won't want to touch any obscure CMOS setup 2) this SN feature can issue some privacy problems, and that's the reason why the PIII Serial Number exposition to the outside was so blamed in the past.
__________________
Visit my page: http://usuarios.lycos.es/hernandp and my blog... http://hernandp.blogspot.com |
|
#7
|
||||
|
||||
|
Re: How to get Processor Serial Number
Quote:
This is a frequently posted problem in other forums, so I thought this is the best place where it can be clarified for everybody once and forever.
__________________
Ovidiu Cucu
|
|
#8
|
||||
|
||||
|
Re: How to get Processor Serial Number
I have found this interesting comment in another discussion forum:
Quote:
__________________
Ovidiu Cucu
Last edited by ovidiucucu; December 21st, 2004 at 04:34 AM. |
|
#9
|
||||
|
||||
|
Re: How to get Processor Serial Number
Don't trust thirdparty information.
![]() Take a look at the Intel Developer Resource: ftp://download.intel.com/design/Xeon...s/24161827.pdf Quote:
__________________
I am not offering technical guidiance via email or IM Come on share your photo with us! CG members photo album! Use the Code Tags! |
|
#10
|
||||
|
||||
|
Resolved.
__________________
Ovidiu Cucu
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|