AMD64 Architecture Programmer's Manual, Volume 2

Total Page:16

File Type:pdf, Size:1020Kb

AMD64 Architecture Programmer's Manual, Volume 2 AMD64 Technology AMD64 Architecture Programmer’s Manual Volume 2: System Programming Publication No. Revision Date 24593 3.21 March 2012 Advanced Micro Devices AMD64 Technology 24593—Rev. 3.21—March 2012 © 2002 – 2012 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. The information contained herein may be of a preliminary or advance nature and is subject to change 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 property 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 appli- cations 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, and AMD Opteron, and combinations thereof, AMD Virtualization and 3DNow! are trademarks, and AMD-K6 is a registered trademark of Advanced Micro Devices, Inc. MMX is a trademark and Pentium is a registered trademark of Intel Corporation. HyperTransport is a licensed trademark of the HyperTransport Technology Consortium. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. 24593—Rev. 3.21—March 2012 AMD64 Technology Contents Contents . iii Figures. xvii Tables . xxv Revision History. xxix Preface. xxxiii About This Book. xxxiii Audience . xxxiii Organization . xxxiii Conventions and Definitions . xxxiv Notational Conventions . xxxv Definitions . xxxvi Registers . xli Endian Order . xliv Related Documents. xliv 1 System-Programming Overview . .1 1.1 Memory Model . 1 Memory Addressing . 2 Memory Organization . 3 Canonical Address Form . .4 1.2 Memory Management . 5 Segmentation . 5 Paging . 7 Mixing Segmentation and Paging . 8 Real Addressing. 10 1.3 Operating Modes . 11 Long Mode. 12 64-Bit Mode. 13 Compatibility Mode. 13 Legacy Modes . 14 System Management Mode (SMM) . 15 1.4 System Registers . 15 1.5 System-Data Structures . 17 1.6 Interrupts . 19 1.7 Additional System-Programming Facilities . 20 Hardware Multitasking . .20 Machine Check . 21 Software Debugging . 21 Performance Monitoring . .22 2 x86 and AMD64 Architecture Differences . .23 2.1 Operating Modes . 23 Long Mode. 23 Contents iii AMD64 Technology 24593—Rev. 3.21—March 2012 Legacy Mode . 23 System-Management Mode. 24 2.2 Memory Model . 24 Memory Addressing . .24 Page Translation . 25 Segmentation . 26 2.3 Protection Checks . 27 2.4 Registers . 28 General-Purpose Registers. .28 YMM/XMM Registers . 28 Flags Register . 28 Instruction Pointer . ..
Recommended publications
  • North American Company Profiles 8X8
    North American Company Profiles 8x8 8X8 8x8, Inc. 2445 Mission College Boulevard Santa Clara, California 95054 Telephone: (408) 727-1885 Fax: (408) 980-0432 Web Site: www.8x8.com Email: [email protected] Fabless IC Supplier Regional Headquarters/Representative Locations Europe: 8x8, Inc. • Bucks, England U.K. Telephone: (44) (1628) 402800 • Fax: (44) (1628) 402829 Financial History ($M), Fiscal Year Ends March 31 1992 1993 1994 1995 1996 1997 1998 Sales 36 31 34 20 29 19 50 Net Income 5 (1) (0.3) (6) (3) (14) 4 R&D Expenditures 7 7 7 8 8 11 12 Capital Expenditures — — — — 1 1 1 Employees 114 100 105 110 81 100 100 Ownership: Publicly held. NASDAQ: EGHT. Company Overview and Strategy 8x8, Inc. is a worldwide leader in the development, manufacture and deployment of an advanced Visual Information Architecture (VIA) encompassing A/V compression/decompression silicon, software, subsystems, and consumer appliances for video telephony, videoconferencing, and video multimedia applications. 8x8, Inc. was founded in 1987. The “8x8” refers to the company’s core technology, which is based upon Discrete Cosine Transform (DCT) image compression and decompression. In DCT, 8-pixel by 8-pixel blocks of image data form the fundamental processing unit. 2-1 8x8 North American Company Profiles Management Paul Voois Chairman and Chief Executive Officer Keith Barraclough President and Chief Operating Officer Bryan Martin Vice President, Engineering and Chief Technical Officer Sandra Abbott Vice President, Finance and Chief Financial Officer Chris McNiffe Vice President, Marketing and Sales Chris Peters Vice President, Sales Michael Noonen Vice President, Business Development Samuel Wang Vice President, Process Technology David Harper Vice President, European Operations Brett Byers Vice President, General Counsel and Investor Relations Products and Processes 8x8 has developed a Video Information Architecture (VIA) incorporating programmable integrated circuits (ICs) and compression/decompression algorithms (codecs) for audio/video communications.
    [Show full text]
  • Beyond MOV ADD XOR – the Unusual and Unexpected
    Beyond MOV ADD XOR the unusual and unexpected in x86 Mateusz "j00ru" Jurczyk, Gynvael Coldwind CONFidence 2013, Kraków Who • Mateusz Jurczyk o Information Security Engineer @ Google o http://j00ru.vexillium.org/ o @j00ru • Gynvael Coldwind o Information Security Engineer @ Google o http://gynvael.coldwind.pl/ o @gynvael Agenda • Getting you up to speed with new x86 research. • Highlighting interesting facts and tricks. • Both x86 and x86-64 discussed. Security relevance • Local vulnerabilities in CPU ↔ OS integration. • Subtle CPU-specific information disclosure. • Exploit mitigations on CPU level. • Loosely related considerations and quirks. x86 - introduction not required • Intel first ships 8086 in 1978 o 16-bit extension of the 8-bit 8085. • Only 80386 and later are used today. o first shipped in 1985 o fully 32-bit architecture o designed with security in mind . code and i/o privilege levels . memory protection . segmentation x86 - produced by... Intel, AMD, VIA - yeah, we all know these. • Chips and Technologies - left market after failed 386 compatible chip failed to boot the Windows operating system. • NEC - sold early Intel architecture compatibles such as NEC V20 and NEC V30; product line transitioned to NEC internal architecture http://www.cpu-collection.de/ x86 - other manufacturers Eastern Bloc KM1810BM86 (USSR) http://www.cpu-collection.de/ x86 - other manufacturers Transmeta, Rise Technology, IDT, National Semiconductor, Cyrix, NexGen, Chips and Technologies, IBM, UMC, DM&P Electronics, ZF Micro, Zet IA-32, RDC Semiconductors, Nvidia, ALi, SiS, GlobalFoundries, TSMC, Fujitsu, SGS-Thomson, Texas Instruments, ... (via Wikipedia) At first, a simple architecture... At first, a simple architecture... x86 bursted with new functions • No eXecute bit (W^X, DEP) o completely redefined exploit development, together with ASLR • Supervisor Mode Execution Prevention • RDRAND instruction o cryptographically secure prng • Related: TPM, VT-d, IOMMU Overall..
    [Show full text]
  • Application Programming
    AMD64 Technology AMD64 Architecture Programmer’s Manual Volume 1: Application Programming Publication No. Revision Date 24592 3.14 September 2007 Advanced Micro Devices AMD64 Technology 24592—Rev. 3.14—September 2007 © 2002 – 2007 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. The information contained herein may be of a preliminary or advance nature and is subject to change 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 property 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 appli- cations 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.
    [Show full text]
  • "Design Rules, Volume 2: How Technology Shapes Organizations
    Design Rules, Volume 2: How Technology Shapes Organizations Chapter 17 The Wintel Standards-based Platform Carliss Y. Baldwin Working Paper 20-055 Design Rules, Volume 2: How Technology Shapes Organizations Chapter 17 The Wintel Standards-based Platform Carliss Y. Baldwin Harvard Business School Working Paper 20-055 Copyright © 2019 by Carliss Y. Baldwin Working papers are in draft form. This working paper is distributed for purposes of comment and discussion only. It may not be reproduced without permission of the copyright holder. Copies of working papers are available from the author. Funding for this research was provided in part by Harvard Business School. © Carliss Y. Baldwin Comments welcome. Please do not circulate or quote. Design Rules, Volume 2: How Technology Shapes Organizations Chapter 17 The Wintel Standards-based Platform By Carliss Y. Baldwin Note to Readers: This is a draft of Chapter 17 of Design Rules, Volume 2: How Technology Shapes Organizations. It builds on prior chapters, but I believe it is possible to read this chapter on a stand-alone basis. The chapter may be cited as: Baldwin, C. Y. (2019) “The Wintel Standards-based Platform,” HBS Working Paper (November 2019). I would be most grateful for your comments on any aspect of this chapter! Thank you in advance, Carliss. Abstract The purpose of this chapter is to use the theory of bottlenecks laid out in previous chapters to better understand the dynamics of an open standards-based platform. I describe how the Wintel platform evolved from 1990 through 2000 under joint sponsorship of Intel and Microsoft. I first describe a series of technical bottlenecks that arose in the early 1990s concerning the “bus architecture” of IBM-compatible PCs.
    [Show full text]
  • PCM-5823 at Our Website: Click HERE PCM-5823
    Full-service, independent repair center -~ ARTISAN® with experienced engineers and technicians on staff. TECHNOLOGY GROUP ~I We buy your excess, underutilized, and idle equipment along with credit for buybacks and trade-ins. Custom engineering Your definitive source so your equipment works exactly as you specify. for quality pre-owned • Critical and expedited services • Leasing / Rentals/ Demos equipment. • In stock/ Ready-to-ship • !TAR-certified secure asset solutions Expert team I Trust guarantee I 100% satisfaction Artisan Technology Group (217) 352-9330 | [email protected] | artisantg.com All trademarks, brand names, and brands appearing herein are the property o f their respective owners. Find the Advantech PCM-5823 at our website: Click HERE PCM-5823 NS Geode Single Board Computer with CPU SVGA/LCD, Dual Ethernet Interface Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com Copyright Notice This document is copyrighted, 2000. All rights are reserved. The original manufacturer reserves the right to make improvements to the products described in this manual at any time without notice. No part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of the original manufacturer. Information provided in this manual is intended to be accurate and reliable. However, the original manufacturer assumes no responsibility for its use, nor for any infringements upon the rights of third parties which may result from its use. Acknowledgements AMD is a trademark of Advanced Micro Devices, Inc. Award is a trademark of Award Software International, Inc. IBM, PC/AT, PS/2 and VGA are trademarks of International Business Machines Corporation.
    [Show full text]
  • Fabless: the Transformation of the Semiconductor Industry
    DANIEL NENNI PAUL MCLELLAN FABLESS: THE TRANSFORMATION OF THE SEMICONDUCTOR INDUSTRY Foreword by Dr. Cliff Hou, VP of R&D, TSMC A SEMIWIKI.COM PROJECT FABLESS: The Transformation of The Semiconductor Industry DANIEL NENNI PAUL MCLELLAN WITH FOREWORD BY CLIFF HOU, VP OF R&D, TSMC A SEMIWIKI.COM PROJECT Fabless: The Transformation of the Semiconductor Industry Copyright 2013 by SemiWiki.com LLC. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system without the prior written consent of the publisher. Authors: Daniel Nenni and Paul McLellan Editors: Beth Martin and Shushana Nenni ISBN: 978-1-4675-9307-6 BISAC: Business & Economics / General Fabless: The Transformation of the Semiconductor Industry Table of Contents Foreword .................................................................................................. iv Preface ......................................................................................................vi Chapter 1: The Semiconductor Century ............................................10 Chapter 2: The ASIC Business ............................................................21 In Their Own Words: VLSI Technology ......................................29 In Their Own Words: eSilicon Corporation .................................36 Chapter 3: The FPGA ..........................................................................44
    [Show full text]
  • Embedded Pentium Processors
    Embedded Pentium® Processor- Based POS Terminal Sample Design Application Note November 1998 Order Number: 273218-001 Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended 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 characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The Pentium® processor may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. MPEG is an international standard for video compression/decompression promoted by ISO. Implementations of MPEG CODECs, or MPEG enabled platforms may require licenses from various entities, including Intel Corporation. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an ordering number and are referenced in this document, or other Intel literature may be obtained by calling 1-800- 548-4725 or by visiting Intel's website at http://www.intel.com.
    [Show full text]
  • Table of Contents
    PROFILES 1996 A Worldwide Survey of IC Manufacturers and Suppliers Table of Contents Alphabetical Listing of Companies....................................................................................................ix North American Company Profiles 8x8, Inc. ..................................................................................................................................1-1 ACC Microelectronics Corporation............................................................................................1-3 Actel Corporation.....................................................................................................................1-4 Allegro MicroSystems, Inc........................................................................................................1-7 Alliance Semiconductor Corporation ........................................................................................1-10 Altera Corporation....................................................................................................................1-14 AMCC (Applied Micro Circuits Corporation)...............................................................................1-18 AMD (Advanced Micro Devices, Inc.) .......................................................................................1-21 AMI (American Microsystems Inc.)...........................................................................................1-28 Anadigics, Inc..........................................................................................................................1-31
    [Show full text]
  • BRAND MANAGEMENT Case No. 1 INTEL: BUILDING a TECHNOLOGY
    BRAND MANAGEMENT Case No. 1 INTEL: BUILDING A TECHNOLOGY BRAND INTRODUCTION Intel’s corporate branding strategy, which many credit for the company’s unparalleled success in the microprocessor industry during the 1990s, stemmed from a court decision. On March 1, 1991, District Judge William Ingram ruled that the “386” designation used by Intel for its microprocessor family was a generic description and could not be trademarked. Intel had been confident that the judge would rule in its favor, and the unexpected court decision effectively invalidated Intel’s current branding strategy. This decision allowed competitors to use Intel’s established naming scheme, which would have been disastrous. Intel’s response was to develop a trademark name for its processor family, the now- familiar “Pentium,” and launch a corporate branding campaign designed to make Intel the first name in processors. Both moves proved to be enormously successful. Intel became one of the leading companies in the PC boom, enjoying virtually unchallenged market leadership through the 1990s. Problems arose, however, as the PC industry slowed down in the early 2000s. Intel faced a future where the PC which represented the core of the company’s microprocessor business, was no longer the essential tool for the Information Age. Wireless telecommunications devices were becoming increasingly popular, and they required different types of processors. The company had spent over three decades building the most recognizable brand in the PC microprocessor industry. Intel’s challenge in the new century was to extend into innovative categories while maintaining the equity in the brand and its microprocessor leadership position.
    [Show full text]
  • 0001047469-99-011450.Pdf
    - ------------------------------------------------------------------------------- - ------------------------------------------------------------------------------- UNITED STATES SECURITIES AND EXCHANGE COMMISSION Washington, D.C. 20549 FORM 10-K (Mark One) [X] Annual Report Pursuant to Section 13 or 15(d) of the Securities Exchange Act of 1934 For the fiscal year ended December 26, 1998, OR [ ] Transition Report Pursuant to Section 13 or 15(d) of the Securities Exchange Act of 1934 For the transition period from to ------------------ ------------------ Commission File Number 0-6217 INTEL CORPORATION (Exact name of registrant as specified in its charter) Delaware 94-1672743 (State or other jurisdiction of (I.R.S. Employer incorporation or organization) Identification No.) 2200 Mission College Boulevard, Santa Clara, California, 95052-8119 (Address of principal executive offices, Zip Code) Registrant's telephone number, including area code (408) 765-8080 Securities registered pursuant to Section 12(b) of the Act: Title of each class Name of each exchange on which registered NONE Securities registered pursuant to Section 12(g) of the Act: Common Stock, $.001 par value Indicate by check mark whether the registrant (1) has filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that the registrant was required to file such reports), and (2) has been subject to such filing requirements for the past 90 days. YES X NO ----- ----- Indicate by check mark if disclosure of delinquent filers pursuant to Item 405 of Regulation S-K is not contained herein, and will not be contained, to the best of registrant's knowledge, in definitive proxy or information statements incorporated by reference in Part III of this Form 10-K or any amendment to this Form 10-K.
    [Show full text]
  • X87 X87 Is a Floating Point-Related Subset of the X86 Architecture Instruction Set
    x87 x87 is a floating point-related subset of the x86 architecture instruction set. It originated as an extension of the 8086 instruction set in the form of optional floating point coprocessors that worked in tandem with corresponding x86 CPUs. These microchips had names ending in "87". Like other extensions to the basic instruction set, x87-instructions are not strictly needed to construct working programs, but provide hardware and microcode implementations of common numerical tasks, allowing these tasks to be performed much faster than corresponding machine code routines can. The x87 instruction set includes instructions for basic floating point operations such as addition, subtraction and comparison, but also for more complex numerical operations, such as the computation of the tangent function and its inverse, for example. Most x86 processors since the Intel 80486 have had these x87 instructions implemented in the main CPU but the term is sometimes still used to refer to that part of the instruction set. Before x87 instructions were standard in PCs, compilers or programmers had to use rather slow library calls to perform floating-point operations, a method that is still common in (low-cost) embedded systems. Description The x87 registers form an 8-level deep non-strict stack structure ranging from ST(0) to ST(7) with registers that can be directly accessed by either operand, using an offset relative to the top, as well as pushed and popped. (This scheme may be compared to how a stack frame may be both pushed, popped and indexed.) There are instructions to push, calculate, and pop values on top of this stack; monadic operations (FSQRT, FPTAN etc.) then implicitly address the topmost ST(0) while dyadic operations (FADD, FMUL, FCOM, etc.) implicitly address ST(0) and ST(1).
    [Show full text]
  • Intel 386 Microprocessor Design and Development Oral History Panel
    Intel 386 Microprocessor Design and Development Oral History Panel Participants: John Crawford Gene Hill Jill Leukhardt Jan Willem Prak Jim Slager Moderated by: Jim Jarrett Recorded: December 2, 2008 Mountain View, California CHM Reference number: X5063.2009 © 2008 Computer History Museum Intel 386 Microprocessor Design and Development Oral History Panel Jim Jarrett: Okay we’re here today, December 2, 2008 at the Computer History Museum, to talk to the Intel 386 microprocessor development and design team and this is the first of two tapes; there will be another tape made that talks to the marketing team. So we want to begin with some self introductions by the members of the team. John Crawford let’s begin with you. John Crawford: Thank you. I’m John Crawford; I was the Chief Architect of the 386. I got an undergraduate degree from Brown University, 1975, Masters in Computer Science from the University of North Carolina in 1977 and I joined Intel right out of college. The first five years I worked as a software engineer at Intel developing software tools for the 8086. That prepared me nicely for the 386 job because I knew the instruction set inside and out of the compatible processors. I started work on the 386 in early 1982, and stayed with the project through completion. I went on to architect the 486. I co-managed the Pentium Processor Team and then later on I led the HP-Intel team that developed the Itanium architecture. I’m still at Intel working on various other chips and technologies. Jarrett: What’s your position at Intel now? Crawford: I’m an Intel Fellow, which is the top of the technical career ladder; I was named a Fellow in 1992, long after the 386.
    [Show full text]