Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ... Volume 3: General-Purpose and System Instructions - Stanford ...

scs.stanford.edu
from scs.stanford.edu More from this publisher
13.07.2015 Views

AMD64 Technology 24594 Rev. 3.10 February 2005296 XOR

24594 Rev. 3.10 February 2005 AMD64 Technology4 System Instruction ReferenceThis chapter describes the function, mnemonic syntax, opcodes,affected flags, and possible exceptions generated by the systeminstructions. The system instructions are used to establish theoperating mode, access processor resources, handle programand system errors, and manage memory. Many of theseinstructions can only be executed by privileged software, suchas the operating system kernel and interrupt handlers, that runat the highest privilege level. Only system instructions canaccess certain processor resources, such as the control registers,model-specific registers, and debug registers.System instructions are supported in all hardwareimplementations of the AMD64 architecture, except that thefollowing system instructions are implemented only if theirassociated CPUID function bits are set:• RDMSR and WRMSR, indicated by bit 5 of CPUID standardfunction 1 or extended function 8000_0001h.• SYSENTER and SYSEXIT, indicated by bit 11 of CPUIDstandard function 1.• SYSCALL and SYSRET, indicated by bit 11 of CPUIDextended function 8000_0001h.• Long Mode instructions, indicated by bit 29 of CPUIDextended function 8000_0001h.There are also several other CPUID function bits that controlthe use of system resources and functions, such as pagingfunctions, virtual-mode extensions, machine-check exceptions,advanced programmable interrupt control (APIC), memorytyperange registers (MTRRs), etc. For details, see “ProcessorFeature Identification” in Volume 2.For further information about the system instructions andregister resources, see:• “System-Management Instructions” in Volume 2.• “Summary of Registers and Data Types” on page 30.• “Notation” on page 43.• “Instruction Prefixes” on page 3.297

24594 Rev. 3.10 February 2005 AMD64 Technology4 <strong>System</strong> Instruction ReferenceThis chapter describes the function, mnemonic syntax, opcodes,affected flags, <strong>and</strong> possible exceptions generated by the systeminstructions. The system instructions are used to establish theoperating mode, access processor resources, h<strong>and</strong>le program<strong>and</strong> system errors, <strong>and</strong> manage memory. Many of theseinstructions can only be executed by privileged software, suchas the operating system kernel <strong>and</strong> interrupt h<strong>and</strong>lers, that runat the highest privilege level. Only system instructions canaccess certain processor resources, such as the control registers,model-specific registers, <strong>and</strong> debug registers.<strong>System</strong> instructions are supported in all hardwareimplementations of the AMD64 architecture, except that thefollowing system instructions are implemented only if theirassociated CPUID function bits are set:• RDMSR <strong>and</strong> WRMSR, indicated by bit 5 of CPUID st<strong>and</strong>ardfunction 1 or extended function 8000_0001h.• SYSENTER <strong>and</strong> SYSEXIT, indicated by bit 11 of CPUIDst<strong>and</strong>ard function 1.• SYSCALL <strong>and</strong> SYSRET, indicated by bit 11 of CPUIDextended function 8000_0001h.• Long Mode instructions, indicated by bit 29 of CPUIDextended function 8000_0001h.There are also several other CPUID function bits that controlthe use of system resources <strong>and</strong> functions, such as pagingfunctions, virtual-mode extensions, machine-check exceptions,advanced programmable interrupt control (APIC), memorytyperange registers (MTRRs), etc. For details, see “ProcessorFeature Identification” in <strong>Volume</strong> 2.For further information about the system instructions <strong>and</strong>register resources, see:• “<strong>System</strong>-Management <strong>Instructions</strong>” in <strong>Volume</strong> 2.• “Summary of Registers <strong>and</strong> Data Types” on page 30.• “Notation” on page 43.• “Instruction Prefixes” on page 3.297

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!