delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/03/13:49:40

From: Doug Otis <dotis AT aponet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Is there a function to convert a pointer to its physical location?
Date: Tue, 03 Mar 1998 10:09:23 -0800
Organization: Association for the Prevention of Polar Bears and Kangaroos
Lines: 46
Message-ID: <34FC4753.E5F3CDF3@aponet.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980303104302 DOT 3192A-100000 AT is>
NNTP-Posting-Host: 192.83.249.18
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:

> On Mon, 2 Mar 1998, Doug Otis wrote:
>
> > Does anyone have a DPMI interface
> > that does not use the MMU so that the translation would be just base +
> > offset?
>
> AFAIK, this is impossible: protected mode always uses the MMU.
>

I have a need for only a single client that works in 32 bit mode.  Although
there is still DOS running in VM mode, I have not reviewed the present DPMI
interface to understand if removal of paging is possible.  I do not need any
extensions for DOS.  You can disable paging by clearing cr0:31 even in
protected mode.  The limitation is from running virtual-8086 mode with more
than one instance.

> > Is there a function that has access to the Page Directory and
> > Page Table to perform the translation under DJGPP?
>
> I'm not sure, but even if it is possible, you will need to run under a
> ring-zero DPMI server, such as CWSDPR0, which allows to use priviledged
> instructions that access the page directory and associated data
> structures.  Using CWSDPR0 means you don't have virtual memory.
>

This is true, and I have tried both the pmode and cwsdpr0 interfaces.  These
two interfaces are very different.  As I am learning these interfaces, I was
looking for someone that has already gone down this path.  I see that pmode
has a assembly flag to remove ring checking but it has a comment to not
remove this for DJGPP.

> > At first blush, it
> > seems possible to disable paging if only one program (DOS) uses the VM
> > mode.

> I'm not sure I follow you.  What does paging have to do with logical-to-
> physical address translation?

The true physical address is mangled by the mmu.  Your linear address is a
function of the descriptor base, offset, and mmu.  The mmu requires a lookup
of two tables to obtain the top 20 bits of the physical address.

Doug

- Raw text -


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