Real mode to protected mode: Chapter 12 study notes

1. In protected mode, the offset for each segment of the memory access can not exceed descriptor offset declaration section
2. For code segment and a data segment, segment limit practical use to allow access to the top-end address for the stack segment, the lowest end of the address period limits the actual use is not allowed access to
3. when the particle size is 4KB in units of segments, segment descriptor actual limit was:

(Descriptor segment limit + 1) * 4KB - 1 = descriptor segment limit * 4KB + 0xFFF

descriptor segment limit the number of 4KB + 1 can be obtained, and multiplied by 4KB, this segment can be derived size, and the offset is zero, which is the maximum segment
offset for the segment occupied by the memory size - 1, the segment limit value (descriptor segment limit. 1 +) * 4KB --1;
. 4 protection of memory

- a data segment: 0 <= (EA + the operand size - 1) <= segment boundaries actual use, EA represents the effective memory access address
- snippet: 0 <= (EIP + instruction length - 1) <= actually used segment limit
- the stack segment: segment limit practical use + 1 <= ESP - operand length <= 0xFFFFFFFF

The class descriptor segment register needs to match

 

Guess you like

Origin www.cnblogs.com/chenjiazhan/p/12026383.html