Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/doc/library/intel/24369101.pdf
Дата изменения: Thu Oct 7 13:17:48 1999
Дата индексирования: Sat Dec 22 10:12:28 2007
Кодировка:

Поисковые слова: р п р п р п р п р п р п р п р п р п р п р п р п
Addendum-- Intel Architecture Software Developer's Manual
Volume 1: Basic Architecture
Order Number 243691-001

NOTE: The Intel Architecture Software Developer's Manual consists of the following volumes: Basic Architecture, Order N umber 243190; Instruction Set Reference, Order Number 243191; Addendum to the Instruction Set Reference, Order Number 243689; System Programming Guide, O rder Number 243192; and the Addendum to the System Programming Guide, Order Number 243690. Please refer to all of these volumes when evaluating your design needs.


Information in this document is provided in connection with Int el products. No license, express or implied, by estoppel or ot herwise, to any intellectual property rights is granted by t his document. Except as provided in Intel's Terms and Condition s o f Sale fo r such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warran ty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchanta bility, or infringement of any patent , copyright or other intellectual property right. Intel products are not intend ed for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or cha racteristics of any fea tures or instructio ns marked "reserved" or "u ndefined." Inte l reserves these f or future definition and shall have no responsibility whatsoever for conflicts or incomp atibilitie s arising from f uture changes to them. Intel's Inte l Architecture processors (e.g., Pentium®, Pentium® Pro, Pentium® II, and CeleronTM processors) may contain design defects or errors known as errata wh ich may cause the produ ct to devia te from published spe cificatio ns. Curre nt characterized errata are available on request. Contact your local Int el sales office or your dist ributor to obtain the latest specifications and before placing your product order. Copies of documents which have an ordering numb er and are ref ere nce d in th is docume nt, o r other Intel literature, may be ob tain ed by calling 1-800-548-4725 or by visiting Intel's website at http://www.intel. com Copyright © Intel Corporation 1996, 1997. Third-party brands and names are the property o f their respective o wners.


TABLE OF CONTENTS
PAGE

CHAPTER 10 PROCESSOR IDENTIFICATION AND FEATURE 10.1. CPUID INSTRUCTION EXTENSIONS . . 10.1.1. Version Inform ation . . . . . . . . . . . . . . . 10.1.2. Control Register Extensions . . . . . . . .

DETER ...... ...... ......

MINATIO N . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4

iii



CHAPTER 10 PROCESSOR IDENTIFICATION AND FEATURE DETERMINATION
When writing software intended to run on several different types of Intel Architecture processors, it is generally necessary to identify the type of processor present in a system and the processor features that are available to an application. This chapter describes how to identify the processor that is executing the code and determine the features the processor supports. It also shows how to determine if an FPU or NPX is present. For more information about processor identification and supported features, refer to the following documents:

· ·

AP-485, Intel Processor Identification and the CPUID Instruction For a complete list of the features that are available for the different Intel Architecture processors, refer to Chapter 17 of the Intel Architecture Software Developer's Manual, Volume 3: System Programming Guide.

10.1. CPUID INSTRUCTION EXTENSIONS
The CPUID instruction of all P6 family processors behave identically. The CPUID instruction is described in detail in the application note, AP-485, Intel Processor Identification and the CPUID Instruction. This section describes processor-specific information returned by the CPUID instruction. The CPUID instruction's behavior varies depending upon the contents of the EAX register when the instruction is executed. Table 10-1 shows the interaction between the value in EAX before the call to CPUID and the value that CPUID returns.

10-1


PROCESSOR IDENTIFICATION AND FEATURE DETERM INATION

Table 10-1. EAX Input Value and CPUID Return Values
EAX 0 E AX E BX E DX E CX 1 E AX EBX EDX E CX 2 E AX E BX E DX E CX CPUID Return Values Maximum CPUID input value 756E6547H 49656E69H 6C65746EH `uneG' (G in BL) `Ieni' `letn' (i in DL) (n in CL)

Version information (Type, Family, Model, Stepping) Reserved Reserved Feature information Cache Infor mation Cache Infor mation Cache Infor mation Cache Infor mation

Refer to the CPUID application note, AP-485, for details on cache information. AP-485 is available from the following web site: http://developer.intel.com/design/pro/applnots/ap485.htm. In addition, the following two new cache descriptors are defined for P6 family processors with Model > 3:
1M L2 C ache 2M L2 C ache 4-way set associative 4-way set associative 32-byte line size 32-byte line size 44h 45h

10.1.1. Version Information
When the CPUID instruction is executed with a 1 in EAX, it returns version and feature information. Figure 10-1 shows the version information bit fields returned by CPUID in EAX. The 233, 266, and 300 MHz Pentium® II processors are indicated by a `6' in the Family ID and a `3' in the Model ID field. Future P6 family processors are indicated by a `6' in the Family ID and a value greater than `3' in the Model ID field.

10-2


PROCESSOR IDENTIFICATION AND FEATURE D ETERM INATION

31 Reserved (0)

12

11 Family ID

08

07

04

03

00

Model ID

St epping ID

Figure 10-1. Processor Version Information Returned by CPUID in EAX

Figure 10-2 shows the feature information bit fields returned by CPUID in EDX.
31 25 24 23 22-18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 F X S R M M X

Reserved (0)

rsvd

PP SA ET 3 6

CMP MCG OAE V

MS TE RP R

r s v d

AC PX I8 C

MPMT CASS EERC

P S E

DVF EMP EU

Figure 10-2. Feature Information Returned by CPUID in EDX

Table 10-2 describes the bit representations for the new P6 family processor features.
Table 10-2. New P6 Family Processor Feature Inform ation Returned by CPUID in EDX
Bit 11 23 Feature S EP MMX Value 1 1 Description Fast System Call MMXTM technology Notes Indicates whether the processor supports the Fast System Call instructions, SYSENTER and SYSEXIT.. Indicates whether the processor supports the MMX technology instruction set and architecture..
TM

Table 10-3 describes the bit representations for new P6 family processor features.

10-3


PROCESSOR IDENTIFICATION AND FEATURE DETERM INATION

Table 10-3. New P6 Family Processor Feature Information Returned by CPUID in EDX
Bit 16 Feature PAT Value 1 Descript ion Page Attribute Table Notes Indicates whether the processor supports the Page Attribute Table. This feature augments the Memory Type Range Registers ( MTRRs) , allowing an oper ating system to specify attr ibutes of memory on a page granularity through a linear address. Indicates whether the processor supports 4 MB pages that ar e capable of addressing physical memory beyond 4 GB . This feature indicates that the upper four bits of the physical address of the 4-MB page is encoded by bits 13-16 of the page directory entr y. These bits are reserved for future use. The contents of these fields are not defined and should not be relied upon or altered. Indicates whether the processor supports the FXSAVE and FXRSTOR instructions for fast save and restore of the floating point context. Presence of this bit also indicates that CR4.OSFXSR is available, allow ing an operating system to indicate that it uses the fast save/restore instructions.

17

PSE- 36

1

36-bit Page Size Extension

18-22

rsvd

0

Reserved

24

FXS R

1

Fast floating point save and restore

10.1.2. Control Register Extensions
The control registers (CR0, CR1, CR2, CR3 and CR4) determine the operating mode of the processor and the characteristics of the currently executing task. A new field has been added to CR4, which contains a group of flags used to enable several architectural extensions as depicted in Figure 10-3.
31 Reserved (set to 0) 10 09 08 07 06 05 PAE 04 PSE 03 DE 02 TSD 01 PVI 00 VME

OSFXSR PCE

P G E M CE

Figure 10-3. CR4 Register Extensions

The new field at bit 9 (OSFXSR) is set by the operating system to indicate that it uses the FXSAVE/FXRSTOR instructions for saving/restoring FP/MMX state during context switches. This bit defaults to clear (zero) at processor initialization.

10-4





UNITED STATES, Intel Corporation 2200 Mission College Blvd., P.O. Box 58119, Santa Clara, CA 95052-8119 Tel: +1 408 765-8080 JAPAN, Intel Japan K.K. 5-6 Tokodai, Tsukuba-shi, Ibaraki-ken 300-26 Tel: + 81-29847-8522 FRANCE, Intel Corporation S.A.R.L. 1, Quai de Grenelle, 75015 Paris Tel: +33 1-45717171 UNITED KINGDOM, Intel Corporation (U.K.) Ltd. Pipers Way, Swindon, Wiltshire, England SN3 1RJ Tel: +44 1-793-641440 GERMANY, Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/ Muenchen Tel: +49 89/99143-0 HONG KONG, Intel Semiconductor Ltd. 32/F Two Pacific Place, 88 Queensway, Central Tel: +852 2844-4555 CANADA, Intel Semiconductor of Canada, Ltd. 190 Attwell Drive, Suite 500 Rexdale, Ontario M9W 6H8 Tel: +416 675-2438