delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/25/18:48:18

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: VDS time? [was: Re: Need help]
Date: Sun, 25 Mar 2001 16:37:58
Organization: Aspen Technology, Inc.
Lines: 57
Message-ID: <3abe1ee6.sandmann@clio.rice.edu>
References: <2950-Sat24Mar2001103024+0200-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: dcloan.hou.aspentech.com
X-Trace: selma.aspentech.com 985562343 20420 10.32.115.107 (25 Mar 2001 23:19:03 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 25 Mar 2001 23:19:03 GMT
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> > From: "chris tsui" <candeia99 AT hotmail DOT com>
> > Date: Fri, 23 Mar 2001 13:44:03 -0800
> > 
> > Here's my problem.  I am try to map physical memory for
> > my PCI card so that I can excises the 24bit DMA engine.
> > 
> > So I did some research on the DJ FAQ and found I can
> > use XMS manager to allocate extended for me and map it
> > to linear.
> 
> Eli replied:
> Why didn't you use the method described in section 18.7 of the FAQ?
> ... See section 3.9 of the FAQ, specifically this fragment:

I have a question for DJGPP users - particularly people needing to create 
large memory buffers in the > 1Mb address space, usually for DMA stuff...

There are 3 ways I know of doing this:
 1) Memory manager + XMS allocated block.  Requires a special system
    configuration.
 2) Allocate memory, use CWSDPMI pagetable hack to get physical addresses.
 3) VDS (works on many non-CWSDPMI DPMI providers, code exists in 
    CWSDPMI distribution but is turned off since it's not completely 
    tested).  Need to build custom CWSDPMI or fully test and wait for
    new CWSDPMI release with code enabled (?).

All of these have drawbacks.  Until recently most people have found that
using 640K memory buffers was adequate so we never worried about it much.
But I've seen the question come up more often.

Which of these should be the "standard, recommended" way to do this?

#1 is fine if you always have complete control of the machine environment.
#2 is fine if you are only using CWSDPMI, and you have the example ;-)
#3 would be a real standard for doing this, if testing was completed.

Chris Matrakidis contributed the VDS code, and I enhanced it, but it's
never been tested, and may break the normal CWSDPMI distribution.  I'm
not sure it behaves the same way other VDS implementations do.  If there are
a number of people who want to go the VDS route, and are willing to test
all (or a large subset) of the API on multiple platforms this is probably
the right long term solution.  In particular, I worry that the memory
buffer may often not be in the low 16Mb of memory for example.  I also
worry that one or more DPMI providers won't support it correctly.

The PMODE DPMI provider does not enable paging for raw/XMS environments
which makes it easy to do the 1:1 memory mapping.  But it does not support
VDS in a VCPI environment (and probably never will).  So code would need
to test for certain environments and validate the VDS behavior.

So the question is - does anyone feel strongly enough about this to lead
an investigation into the recommended way of doing it, and do testing to
back it up?

(By the way, please use descriptive subjects.  I don't have time to read
the discussions and usually read just a handful of messages a week based
on interesting subject titles.  That I read this one was a pure mistake ...)

- Raw text -


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