Mail Archives: djgpp/1999/10/07/13:30:36
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 -