delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/18/11:45:08

From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fw: Using XMS for DMA with DJGPP and CWSDPMI
Date: Wed, 18 Sep 2002 10:23:19 CDT
Organization: Rice University, Houston TX
Lines: 19
Message-ID: <3d889a67.sandmann@clio.rice.edu>
References: <BDD73AE8AEE3EF438E07420C2600E9F65C913D AT qtiexch0 DOT qgraph DOT com>
NNTP-Posting-Host: clio.rice.edu
X-Trace: joe.rice.edu 1032363076 16123 128.42.105.3 (18 Sep 2002 15:31:16 GMT)
X-Complaints-To: abuse AT rice DOT edu
NNTP-Posting-Date: 18 Sep 2002 15:31:16 GMT
X-NewsEditor: ED-1.5.9
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> We are using CWSDPMI as our DPMI server, and I have read how CWSDPMI uses
> all available XMS if there is not an external memory manager running. We are
> running HIMEM alone and have indeed seen the 0x0A return code from our XMS
> call (all available XMS memory is allocated). 

I suggest you look at http://clio.rice.edu/djgpp/cwsdma2.zip

This shows how to get the physical address of a memory buffer you have
allocated using standard DJGPP services.  The technique is well tested.

If you use the XMS approach, there is still the problem that when this
memory is mapped it will be mapped with caching off (since it might be
a device) which will slow access.

If you use the XMS approach, one way is to merely fragment the XMS memory
before calling your program.  Allocate the block you want, allocate a 1K
block after it, lock it, then free the first block.  When CWSDPMI runs
it will take the big block and leave the small block for the program
usage.

- Raw text -


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