A segment selector provides the software that uses it with an index into the GDT or LDT (the offset of its associated segment descriptor), a global/local flag (determines whether the selector points to the GDT or the LDT), and access rights information."
Using these instructions, a program loads the visible part of the segment register with a 16-bit selector.
Segment descriptors are stored in descriptor tables: global (GDT) and local (LDT) and are identified with segment selectors. Segment descriptor is an 8 bytes long structure that contains one memory segment's: base address (32-bits), limit (20-bits) and access rights (see Fig. 2.4 and 2.5).
Segment Descriptor: In the Protected mode of x86, Memory Management Unit (MMU) uses the segment selector to access a descriptor, segment descriptors are a part of the segmentation unit, which provides the processor with the data it needs to translate a logical address into a linear address.
When does segment selector comes in picture. The line in Intel Guide says:
"Each segment descriptor has an associated segment selector. A segment selector provides the software that uses it with an index into the GDT or LDT (the offset of its associated segment descriptor), a global/local flag (determines whether the selector points to the GDT or the LDT), and access rights information."
I didn't quite get it.
Are there separate segment selector register(s)? How is it calculated? Why we need it.?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With