Reputation: 1013
How are different types of segment identified as different? Wikipedia states:
Segments can be defined to be either code, data, or system segments
It also states:
Descriptors with bit 12 clear are "system descriptors" and are used for specialized purposes.
So, I gather that this "system bit" is used to identify a system segment, but what about code and data segments? Additionally, since these identifiers are stored separately instead of as a single 2-bit value, can you get combination-types, like system code and system data segments?
Upvotes: 0
Views: 105
Reputation: 44106
The Type field of a segment descriptor is not one bit but four.
The S field defines if the descriptor is a system descriptor (bit is clear) or not.
The interpretation of the Type field depends on the value of S.
Non system descriptors
System descriptors
To better understand how protected/long mode segmentation works I advice you dropping Wikipedia in favour of the Intel manuals.
Upvotes: 3