Volume 2 System Programming (794096), страница 12
Текст из файла (страница 12)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Figure 15-10. Format of DEV_MAP[n] Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Figure 15-11. Address Translation with Traditional Paging . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404Figure 15-12. Address Translation with Nested Paging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405Figure 15-13. SLB Example Layout . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Figure 15-14. Layout of VM_CR MSR (C001_0114h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417Figure 15-15. Layout of SMM_CTL MSR (C001_0116h) . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 418Figure 16-1. Block Diagram of a Typical APIC Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421Figure 16-2. APIC Base Address Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 424Figure 16-3. APIC ID Register (APIC Offset 20h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426Figure 16-4. APIC Version Register (APIC Offset 30h). . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 427Figure 16-5. General Local Vector Table Register Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428Figure 16-6. APIC Timer Local Vector Table Register (APIC Offset 320h) . . . .
. . . . . . . . . . . . . . . . . . . . 429Figure 16-7. Timer Current Count Register - CCR (APIC Offset 390h) . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Figure 16-8. Timer Initial Count Register - ICR (APIC Offset 380h) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 430Figure 16-9. Divide Configuration Register - DCR (APIC Offset 3E0h) . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Figure 16-10. Local Interrupt 0/1 (LINT0/1) Local Vector Table Register (APIC Offset 350h/360h) . . . . .
431Figure 16-11. Performance Monitor Counter Local Vector Table Register (APIC Offset 340h) . . . . . . . . . . 432Figure 16-12. Thermal Sensor Local Vector Table Register (APIC Offset 330h) . . . . . . . . . . . . . . . . . . . . . 432Figure 16-13. APIC Error Local Vector Table Register (APIC Offset 370h). .
. . . . . . . . . . . . . . . . . . . . . . . 433Figure 16-14. APIC Error Status Register (APIC Offset 370h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433Figure 16-15. Spurious Interrupt Register (APIC Offset F0h) . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 434Figure 16-16. Interrupt Command Register - ICR (APIC Offset 310:300h). . . . . . . . . . . . . . . . . . . . . . . . . . 435Figure 16-17. Remote Read Register (APIC Offset C0h) . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 437Figure 16-18. Logical Destination Register - LDR (APIC Offset D0h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438Figure 16-19. Destination Format Register (APIC Offset E0h) . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 439Figure 16-20. Arbitration Priority Register - APR (APIC Offset 90h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440Figure 16-21. Interrupt Request Register - IRR (APIC Offset 270:200h). . . . . . . . . . . . . . . . . . . . . . . . . . . . 441Figure 16-22. In Service Register—ISR (APIC Offset 170:100h) . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442Figure 16-23. Trigger Mode Register - TMR (APIC Offset 1F0:180h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443Figure 16-24. APIC 80 - Task Priority Register - TPR (APIC Offset 80h) . . . . . . . . .
. . . . . . . . . . . . . . . . . 444Figure 16-25. Processor Priority Register - PPR (APIC Offset A0h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444Figure 16-26. End of Interrupt - EOI (APIC Offset B0h) . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 445xviiiFigures24593—Rev. 3.13—July 2007AMD64 TechnologyFigure 16-27. Format of SEOI Register (in Local APIC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446Figure 17-1.
OSVW MSR0: OSVW_ID_Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447Figure 17-2. OSVW MSR1: OSVW Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 448Figure 17-3. OSVW MSRn: OSVW Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448Figure 18-1. P-State Current Limit Register (MSR C001_0061h) . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 451Figure 18-2. P-State Control Register (MSR C001_0062h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452Figure 18-3. P-State Status Register (MSR C001_0063h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 452FiguresxixAMD64 Technologyxx24593—Rev. 3.13—July 2007Figures24593—Rev. 3.13—July 2007AMD64 TechnologyTablesTable 1-1.Operating Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 11Table 1-2.Interrupts and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Table 2-1.Instructions That Reference RSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 31Table 2-2.64-Bit Mode Near Branches, Default 64-Bit Operand Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Table 2-3.Invalid Instructions in 64-Bit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 34Table 2-4.Invalid Instructions in Long Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Table 2-5.Reassigned Instructions in 64-Bit Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 36Table 2-6.Differences Between Long Mode and Legacy Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Table 4-1.Segment Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 69Table 4-2.Descriptor Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Table 4-3.Code-Segment Descriptor Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 81Table 4-4.Data-Segment Descriptor Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Table 4-5.System-Segment Descriptor Types (S=0)—Legacy Mode. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 83Table 4-6.System-Segment Descriptor Types—Long Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Table 4-7.Descriptor-Entry Field Changes in Long Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Table 5-1.Supported Paging Alternatives (CR0.PG=1) . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Table 5-2.Physical-Page Protection, CR0.WP=0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Table 5-3.Effect of CR0.WP=1 on Supervisor Page Access . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Table 6-1.System Management Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Table 7-1.Memory Access by Memory Type . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 169Table 7-2.Caching Policy by Memory Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170Table 7-3.Memory Access Ordering Rules . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Table 7-4.AMD64 Architecture Cache-Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Table 7-5.MTRR Type Field Encodings . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Table 7-6.Fixed-Range MTRR Address Ranges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Table 7-7.Combined MTRR and Page-Level Memory Type with Unmodified PAT MSR . . . .
. . . . . . . 189Table 7-8.PAT Type Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192Table 7-9.PAT-Register PA-Field Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Table 7-10.Combined Effect of MTRR and PAT Memory Types . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Table 7-11.Extended Fixed-Range MTRR Type Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Table 8-1.Interrupt-Vector Source and Cause. . . . . . . . . . . . . . . . . . . . . . . . . . .