Mail Archives: djgpp/1997/08/24/20:11:55
On 21 Aug 97 at 1:18, Jean Meloche wrote:
> I'm playing around with the dpmi and I am confused about the
> protection mechanisms of the pentium
>
> - I dumped the GDT and found that GDT segment 0x8 is a segment with
> RW
> permission and DPL=3.
> - My CS=0xF7 (CPL=3, LDT segment 0x1E)
>
> - I figured that I should be able to load the coresponding segment
> descriptor
> into DS by loading DS with 0x43 (RPL=3, GDT segment 0x8).
>
> Not so. I get a SIGSVEC...
>
> Can someone tell me what I am missing here?
the 0x8 is not the segment number, but the offset into the table. ie,
no multiplication is done by the cpu, it just masks of the rpl and
ldt bits. Just use 0xb to access the gdt. the rpl just ors with the
segment number to form a selector.
Bill
--
Leave others their otherness.
- Raw text -