2-3 Intro To Protected Mode Memory Addressing: Descriptor From A Descriptor Table
2-3 Intro To Protected Mode Memory Addressing: Descriptor From A Descriptor Table
Chapter2:2: The
TheMicroprocessor
Microprocessorand
andits
itsArchitecture
Architecture
١
Selectors and Descriptors
• The descriptor is located in the segment
register & describes the location, length, and
access rights of the segment of memory.
– it selects one of 8192 descriptors from one
of two tables of descriptors
• In protected mode, this segment number can
address any memory location in the system
for the code segment.
• Indirectly, the register still selects a memory
segment, but not directly as in real mode.
٢
Figure 2–6 The 80286 through Core2 64-bit descriptors.
٣
Figure 2–8 The contents of a segment register during protected mode
operation of the 80286 through Core2 microprocessors.
٤
Figure 2–9 Using the DS register to select a description from the global
descriptor table. In this example, the DS register accesses memory locations
00100000H–001000FFH as a data segment.
٥
• DS contains 0008H, which accesses the
descriptor number 1 from the global
descriptor table using a requested
privilege level of 00.
• Descriptor number 1 contains a descriptor
that defines the base address as
00100000H with a segment limit of
000FFH.
• This means that a value of 0008H loaded
into DS causes the microprocessor to use
memory locations 00100000H–
001000FFH
٦
• The linear address, as generated by software,
is broken into three sections that are used to
access the page directory entry, page table
entry, and memory page offset address.
Figure 2–12 The format for the linear address (a) and a
page directory or page table entry (b).
٧
Calculating Linear Addresses
• Given a segment address, multiply it by 16
(10H) (add a hexadecimal zero to the
right), and add it to the offset.
• Example: convert 08F1:0100 to a linear
address
- Adjusted Segment value: 0 8 F 1 0
- Add the offset: 0 1 0 0
- Linear address: 0 9 0 1 0
٨
Figure 2–13 The paging mechanism in the 80386 through
Core2 microprocessors.
٩
١٠