Date: Mon, 25 Aug 1997 12:12:20 +1100 From: Bill Currie Subject: Re: Help with GDT and protection on pentium In-reply-to: <33FBF9E1.51123954@zap.stat.ubc.ca> To: Jean Meloche , djgpp AT delorie DOT com Message-id: <199708250017.MAA12990@teleng1.tait.co.nz gatekeeper.tait.co.nz> Organization: Tait Electronics Limited MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Comments: Authenticated sender is Precedence: bulk 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.