www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/07/13:30:36

Date: Thu, 7 Oct 1999 17:09:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: 1043730 <dfokkema AT cs DOT vu DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: far pointers again
In-Reply-To: <7tho7c$p4i@cs.vu.nl>
Message-ID: <Pine.SUN.3.91.991007170116.23726C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 7 Oct 1999 Fokkema DOT DBRA AT delorie DOT com wrote:

> I understand all this, but I thought it was nice if you could access all
> memory available. But if gnu cc doesn't support far pointers, and it is,
> as was suggested to me, just a flitch in the early intel processors, does
> this mean that dos c compilers are about the only ones that implement far
> pointers which they invented themselves (i.e. it is not part of the ansi-c
> standard)?

Far pointers only make sense in segmented architecture.  If there are 
processors besides Intel that support segmented memory (I'm not aware of 
any, but I don't claim to know all of them), they could also use far 
pointers.  Otherwise, far pointers aren't needed.

Using a single 4GB segment is a way to pretend that x86 isn't segmented.
Unfortunately, we cannot do this 100% percent, since the DPMI spec 
effectively requires you to work with several different segment 
descriptors.

> : wheras if you are writing an OS, you can get all the same protection 
> : benefits from paging systems which work a similar way on all hardware).
> 
> How exactly do I get the same protection? By paging out all the memory
> belonging to other processes?

I think Shawn meant to use the page tables and page directories to 
separate the address spaces of different processes.  Kinda what Windows 
does for different virtual machines.

> But because I don't want to let go of my protection schemes, I'm very
> interested in how I could implement protection using the paging mechanisms so
> I won't need far pointers at all, like the rest of the world, it seems.

Perhaps you could describe the problems for which you need far pointers 
in your current design.  I, for one thing, am not sure I understand why 
would you need them to write an OS.

- Raw text -


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