Detecting a 486+ processor in real mode?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Detecting a 486+ processor in real mode?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:00 pm, edited 2 times in total.
Peter_Vigren

Re:Detecting a 486+ Processor in RealMode?

Post by Peter_Vigren »

You can check if the processor is at least a 286, remap int 6 and then use an 486+ opcode. If the processor is just an 386, it will issue the invalid opcode exception (int 6).
RicoSanchez

Re:Detecting a 486+ Processor in RealMode?

Post by RicoSanchez »

Besides that the IA-32 manual discusses how to identify 8086, 286 and 386+ processors, it also discusses how to identify between 386 and 486+, and between 486 without CPUID and 486+ with CPUID. Here's a quote from the IA-32 Intel? Architecture Software Developer's manual, Volume 1: Basic Architecture, Chapter 13, paragraph 2:

Other EFLAG register bits that can be used to differentiate between the 32-bit processors:

? Bit 18 (AC) ? Implemented only on the Pentium 4, Intel Xeon, P6 family, Pentium, and
Intel486 processors. The inability to set or clear this bit distinguishes an Intel386 processor
from the later IA-32 processors.

? Bit 21 (ID) ? Determines if the processor is able to execute the CPUID instruction. The
ability to set and clear this bit indicates that it is a Pentium 4, Intel Xeon, P6 family,
Pentium, or later- version Intel486 processor.


Have fun!
Post Reply