delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/24/20:11:55

Date: Mon, 25 Aug 1997 12:12:20 +1100
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Help with GDT and protection on pentium
In-reply-to: <33FBF9E1.51123954@zap.stat.ubc.ca>
To: Jean Meloche <jean AT zap DOT stat DOT ubc DOT ca>, 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
Comments: Authenticated sender is <billc AT blackmagic DOT tait DOT co DOT nz>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019