Mail Archives: djgpp/1999/10/24/08:42:46
On 22 Oct 1999, Martin Stromberg wrote:
> I must be missing something. Suppose I allocate a descriptor and it's
> value is 0x103, which means it's a ring-3 descriptor.
I think you will never see 0x103 in a DJGPP program, because it's a
GDT selector. 0x107 would be a ring-3 LDT selector.
> I then call
> one of those two calls above and try to set its ring to 2. If that
> call succeed, the descriptor value has changed to 0x102?!!!
Yes! The lower 3 bits of the selector are not part of the index into
the descriptor table, they are the TI (table indicator) bit and the
RPL, the requested privilege level. So 0x102, 0x103 and 0x107 all
point to the same segment descriptor whose index is 0x20.
- Raw text -