CPUID

kzaj

CPUID (opcode 0FH,0A2H) jest dostepna od procesorów 586. Aby sprawdzić, czy jest obsługiwana trzeba sprawdzić, czy bit 21 rejestru FLAGS jest modyfikowalny. Proponuję kod asma następujący:

  PUSHFD
  POP     EAX
  XOR     EAX, 000200000H         ;NOTUJEMY FLAGE ID, ZEBY SPRAWDZIC CZY JEST CPUID
  PUSH    EAX
  POPFD
  PUSHFD
  POP     ECX
  CMP     EAX, ECX
  JZ      MAMY_CPUID
 

Jak wiemy, czy CPUID jest obsługiwane, możemy je wykonać. Numer funkcji podajemy w rejestrze EAX. Funkcje są następujące:

Funkcja 0:
Na wyjściu: EAX to maksymalny numer funkcji (opiszę tylko 0 i 1, po prostu nie znam innych :( )
ECX:EBX:EDX - w ASCII nazwa producenta (AuthenticAMD dla AMD, GenuineIntel - Intel, RiseRiseRise - Rise, SiS SiS SiS dla Sis)
Funkcja 1:
EAX - struktura o następującym formacie:
bity 3..0 - wersja procy
bity 7..4 - model
bity 11..8 - rodzina
bity 13..12 - typ procesora (00 - original OEM processor, 01 - OverDrive, 10 - Dual, 11 - zarezerwowane).
bity 15..14 - zarezerwowane
bity 19..16 - rozszerzony model (extended model) - INTEL
bity 27..20 - rozszerzona rodzinal (extended family) - INTEL
bity 31..28 - zarezerwowane

po bitach 11-4 można rozpoznać nzawę procesora. Poszukaj w internecie tabel dla tego, ja mam dawno nieaktualną.

              EDX  - tablica z obsługiwanymi funkcjami procesora:

0 Floating Point Unit
1 Virtual Mode Extensions
2 Debugging Extensions
3 Page Size Extensions 4MB
4 Time Stamp Counter
5 Model Specific Registers
6
PAE (Physical Address Extension)

7 Machine Check Exception
8 CMPXCHG8B Instruction
9 APIC
11 SYSENTER / SYSEXIT Instruction
12 Memory Type Range Registers
13 Page Global Enable
14 Machine Check Architecture
15 Conditional Move Instruction
16 Page Attribute Table
17 36 bit Page Size Extensions
18 Processor Serial Number

19 CLFLUSH Instruction Supported

21 Debug Store

22 Thermal Monitor and Software Controlled Clock

23 MMX Instruction
24
FXSR (Fast Floating Point SAve and Restore)

25
Streaming SIMD Extensions

26 Streaming SIMD Extensions 2
27
Self Snoop
28
Hyper Threading Technology
29
Thermal Monitor Supported
31
Signal Break on FERR

25 komentarzy

Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing. Keto Diet

Just pure brilliance from you here. I have never expected something less than this from you and you have not disappointed me at all. I suppose you will keep the quality work going on. Diabetes

It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing. Benefits of Pineapple Juice

I would like to say that this blog really convinced me to do it! Thanks, very good post. Ginseng

If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries Aloe Vera

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. Zucchini

A debt of gratitude is in order for the blog entry amigo! Keep them coming... Anxiety

I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . . Kimchi

I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.. Broccoli

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. Chicken

I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . . Jackfruit

I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon… Lean Belly Breakthrough

If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries Spirulina

If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries Spirulina

kik for windows messenger application that allows you to send and receive messages, photos, videos, sketches and more contents, once after registering the username on the Kik application. Then Kik for PC is developed with some important features,

That is the article I was looking for. Your article gives me another approach on this issue. I hope to read more articles from you. bloxorz

I have read many other articles about the same topic, but your article convinced me! Thanks your share! free gift code generator

Tento druh CPU je dobrý, bude to? Potřebuju rychlou!

Tommy Green from Website - https://www.ebuske.com/monetizze-como-funciona/

Call Quicken Support Phone Number and get the quickest answers from Quicken experts. Contact Quicken support by phone, call +1-855-999-9877. call quicken
quicken help
call quicken customer support
quicken tech support telephone number
how to contact quicken by phone
quicken online backup support
quicken bill pay phone number
buy quicken

Świetny opis CPUID po angielsku http://www.sandpile.org/ia32/cpuid.htm

w 486 CPUID było wprowadzone z tego co pamiętam

w tasmie można wybrać proca w trybie zgodności z masmem → .586
albo P586N

chyba 586 - TASM przy dyrektywie .586P zwraca "Invalid instruction for currently selected processor(s)"

A nie od 486? o_O

www.google.com -> OPCODES.LST - tam sa opisane dalsze funkcje
http://tb.infogem.com.pl/cpuid.html - tez troszke jest

W tagach 'asm' umiescilem kod. Mam nadzieje, ze nie kloci sie to z twoja wizja formatowania (chociaz do kapitalikow nie bardzo pasuje :( )
Szkoda, ze skupiles sie jedynie na procesorach Intela (SSE jest ale 3DNow brak). Chociaz akurat obecne procesory AMD obsluguja takze SSE.

Nieco formatowania tylko dodaj dla większej czytelności i będzie super.