AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors
Total Page:16
File Type:pdf, Size:1020Kb
AMD Processor Recognition Application Note For Processors Prior to AMD Family 0Fh Processors Publication # 20734 Revision: 3.13 Issue Date: December 2005 © 1997–2004 Advanced Micro Devices, Inc. All rights reserved. The contents of this document are provided in connection with Advanced Micro Devices, Inc. (“AMD”) products. AMD makes no representations or warranties with respect to the accuracy or completeness of the contents of this publication and reserves the right to make changes to specifications and product descriptions at any time without notice. No license, whether express, implied, arising by estoppel or otherwise, to any intellectual property rights is granted by this publication. Except as set forth in AMD’s Standard Terms and Conditions of Sale, AMD assumes no liability whatsoever, and disclaims any express or implied warranty, relating to its products including, but not limited to, the implied warranty of merchantability, fitness for a particular purpose, or infringement of any intellectual prop- erty right. AMD’s products are not designed, intended, authorized or warranted for use as components in systems intended for surgical implant into the body, or in other applications intended to support or sustain life, or in any other application in which the failure of AMD’s product could create a situation where personal injury, death, or severe property or environmental damage may occur. AMD reserves the right to discontinue or make changes to its products at any time without notice. Trademarks AMD, the AMD Arrow logo, AMD Athlon, AMD Duron, AMD Sempron, and combinations thereof, AMD-762, Cool‘n’Quiet, and AMD PowerNow! are trademarks and AMD-K6, AM5x86 and Am486 are registered trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. 20734 Rev. 3.13 December 2005 AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors Contents Revision History . .9 Chapter 1 Introduction . .11 1.1 The CPUID Instruction . .12 1.1.1 Static versus Idiosyncratic CPUID Information . .12 1.1.2 CPUID Functions . .12 1.2 CPUID Privilege Level . .15 1.3 Additional Information . .15 Chapter 2 Summary of CPUID Functions and Values . .17 2.1 CPUID Standard Function 0 and Extended Function 8000_0000h . .17 2.1.1 Highest Standard Function Number Available . .17 2.1.2 Highest Extended Function Number Available . .17 2.2 Standard Function 1 and Extended Function 8000_0001h . .18 2.2.1 Processor Signature . .18 2.2.2 Feature Support—Standard Function 1 and Extended Function 8000_0001h . .20 2.3 Processor Name String—Extended Functions 8000_0002h–8000_0004h . .21 2.4 L1 Cache and TLB Information—Extended Function 8000_0005h . .22 2.5 L2 Cache Information—Extended Function 8000_0006h . .23 2.5.1 L2 TLB Information for 2-Mbyte and 4-Mbyte Pages . .24 2.5.2 L2 TLB Information for 4-Kbyte Pages . .24 2.5.3 L2 Cache Information . .24 2.6 Advanced Power Management Features . .25 2.6.1 Vendor-Specific Feature Flags—Extended Functions 8000_0008h– 8000_0018h . .26 Chapter 3 Programming the Processor Name String . .27 3.1 The Name String on AMD Legacy Processors . .27 3.2 Processor Name String Code Requirements . .29 3.2.1 Name String Format . .29 3.2.2 Name String Determination for AMD Athlon™, AMD Duron™, and AMD Sempron™ Processors 29 Contents 3 AMD Processor Recognition Application Note for Processors Prior to 20734 Rev. 3.13 December 2005 AMD Family 0Fh Processors 3.2.3 AMD Recommended Name String for AMD Athlon™ Processor Models 2 and 4 and AMD Duron™ Processor Model 3 30 3.2.4 AMD Recommended Name String for Mobile AMD Athlon™ 4 Processor Model 6 and Mobile AMD Duron™ Processor Model 3 30 3.2.5 Identifying the Platform Context—AMD Athlon™ Processor Model 6 and Later 31 3.2.5.1 Identifying Mobile Platforms . .31 3.2.5.2 Identifying Multiprocessing Platforms . .31 3.2.5.3 Identifying Desktop Platforms . .31 3.2.6 AMD-Recommended Name String for Mobile AMD Athlon™ and Mobile AMD Duron™ Processors . .31 3.2.7 Name String for Desktop Processors . .33 3.2.7.1 Desktop Model Numbers . .33 3.2.8 Name Strings for AMD Sempron™ Processors . .35 3.2.9 AMD Name String for AMD Athlon™ and AMD Duron™ MP Server/ Workstation Processors . .36 3.3 Programming the Processor Name String . .36 3.4 Processor Recognition Code Sample . .37 Appendix A Model Number Mappings . .41 A.1 Model Numbers for AMD Athlon™ Desktop and MP Processors . .41 A.2 Model Numbers for Mobile AMD Athlon™ Processors . .41 A.3 Model Number Mappings for AMD Sempron™ Processors Models 8 and 10 . .44 4 Contents 20734 Rev. 3.13 December 2005 AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors List of Tables Table 1. CPUID Standard Functions. .13 Table 2. CPUID Extended Functions . .13 Table 3. Processor Signatures for AMD Athlon™, AMD Duron™, and AMD Legacy Processors (CPUID Function 1) . .19 Table 4. Extended Feature EDX Bit Interpretation. .21 Table 5. Associativity Values for L2 Caches and TLBs. .24 ® ® Table 6. Default Name Strings for Am486 and Am5x86 Processors through AMD AthlonTM and AMD Sempron™ Processors. .27 Table 7. AMD-Recommended Name String for AMD Athlon™ Processor Models 2 and 4 and AMD Duron™ Processor Model 3 . .30 Table 8. AMD Recommended Name String for Mobile AMD Athlon™ 4 Processor Model 6 and Mobile AMD Duron™ Processor Model 6 . .30 Table 9. Recommended Name Strings for Mobile AMD Athlon™ Model 6 and Later and Mobile AMD Duron™ Processors . .32 Table 10. Name Strings for AMD Athlon™ and AMD Duron™ Desktop Processors . .33 Table 11. Recommended Name Strings for AMD Sempron™ Processors Models 8 and 10. .35 Table 12. Recommended Name Strings for AMD Athlon™ and AMD Duron™ MP Server/ Workstations . .36 Table 13. Model Number Mappings for Desktop and Mobile AMD Athlon™ XP and AMD Athlon™ MP Processors . .42 Table 14. AMD Sempron™ Processors Model 8 and Model 10 . .44 List of Tables 5 AMD Processor Recognition Application Note for Processors Prior to 20734 Rev. 3.13 December 2005 AMD Family 0Fh Processors 6 List of Tables 20734 Rev. 3.13 December 2005 AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors List of Figures Figure 1. Processor Signature Fields in EAX returned by Standard Function 0000_0001h and Extended Function 8000_0001h . .18 Figure 2. TLB Information for 2-Mbyte and 4-Mbyte Pages returned in EAX by Extended Function 8000_0005h . .22 Figure 3. TLB Information for 4-Kbyte Pages returned by Extended Function 8000_0005h in EBX . .22 Figure 4. L1 Data Cache Information returned in ECX by Extended Function 8000_0005h . .23 Figure 5. L1 Instruction Cache Information Returned in EDX by Extended Function 8000_0005h . .23 Figure 6. L2 TLB Information for 2-Mbyte and 4-Mbyte Pages Returned in EAX by Extended Function 8000_0006h . .24 Figure 7. L2 TLB Information for 4-Kbyte Pages Returned in EBX by Extended Function 8000_0006h . .24 Figure 8. L2 TLB Information returned in ECX by Extended Function 8000_0006h. .24 Figure 9. Advanced Power Management Features Returned in EDX by Extended Function 8000_0007h . .25 List of Figures 7 AMD Processor Recognition Application Note for Processors Prior to 20734 Rev. 3.13 December 2005 AMD Family 0Fh Processors 8 List of Figures 20734 Rev. 3.13 December 2005 AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors Revision History Date Revision Description December 2005 3.13 Removed references to processor family 0Fh and later. Refer to PID 25481 for processor family 0Fh and later. August 2004 3.12 Extensive edit, rewrite, and reorganization of previous version; included information for AMD Sempron™ processors Models 6, 8 and 10. This public document includes all information in all previous versions. Revision History 9 AMD Processor Recognition Application Note for Processors Prior to 20734 Rev. 3.13 December 2005 AMD Family 0Fh Processors 10 Revision History 20734 Rev. 3.13 December 2005 AMD Processor Recognition Application Note for Processors Prior to AMD Family 0Fh Processors Chapter 1 Introduction The contents of this document covers the CPUID instruction and programming the processor name string for processors released prior to AMD family 0Fh processors. Refer to the AMD CPUID Specification, order# 25481, for information on processor recognition of AMD family 0Fh and later processors. The rapid evolution of x86 architecture led to the implementation of new computational features that greatly complicated the microprocessor software development environment. The differences between x86 processors of different vendors, or between one generation of processor and another from the same vendor, were radical enough that software was not immediately portable from platform to platform. It was difficult to develop operating systems, device drivers, and application software without determining the type of processor in a given system. To develop software to run on a variety of platforms, the detection of subtle differences between instruction set implementations and other features from one processor to the next became critical. It was possible to detect the differences between early types of processors by running subroutines that tested the results of certain instruction sequences. If a particular instruction or feature was not implemented on the processor, alternative paths were selected by which to achieve the desired computational result. Such methods soon became cumbersome. The success of the x86 family of processors rapidly led to a complex landscape of architectural variation and technological innovation. To sift through the myriad possibilities, software required a simple, standardized, extensible method of processor identification. The CPUID instruction was added to the x86 instruction set for this purpose. Beginning with the Am486® DX4 processor, all AMD processors support the CPUID instruction.