delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/25/20:35:39

Date: Sat, 25 Aug 2001 19:56:05 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Nick <jp_prongs AT yahoo DOT com>
Message-Id: <1190-Sat25Aug2001195605+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <3B877E52.C3AEC6F2@yahoo.com> (message from Nick on Sat, 25 Aug
2001 06:30:42 -0400)
Subject: Re: Thoughts on physical address and DMA
References: <f5c79439 DOT 0108171412 DOT 689b2a6b AT posting DOT google DOT com> <3b8141a5 DOT sandmann AT clio DOT rice DOT edu> <3B8659BB DOT C6CE272 AT student DOT uni-ulm DOT de> <1659-Fri24Aug2001172205+0300-eliz AT is DOT elta DOT co DOT il> <3B877E52 DOT C3AEC6F2 AT yahoo DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Nick <jp_prongs AT yahoo DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sat, 25 Aug 2001 06:30:42 -0400
> 
> Could somebody just tell me: will my way work or not? If not, why?

It will only work for addresses in the first 1MB, i.e. in the
conventional memory.  But for using DMA in the conventional memory,
you don't need this trick at all, since conventional memory is always
mapped 1:1 (i.e. physical and linear addresses are identical).  That's
why the FAQ suggests doing DMA with conventional memory: it's easy.

The reason why it won't work above 1MB is that the mapping between the
physical and linear addresses cannot be computed without accessing the
page tables.  Page tables are data structures which define the mapping
between physical and linear addresses, and their access is a tricky
business.  For ring-0 DPMI servers, somebody posted here code to do
that; similar (but more complicated) code exists for CWSDPMI.
However, for Windows 9X we don't know how to access the page tables.

- Raw text -


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