www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/20/12:15:59

From: bgleich AT blitz DOT chemie DOT uni-ulm DOT de (Bernhard Gleich)
Subject: Re: physical memory location
Newsgroups: comp.os.msdos.djgpp
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980618094230 DOT 23552B-100000 AT is>
NNTP-Posting-Host: 134.60.34.6
Message-ID: <358bd212.0@news.uni-ulm.de>
Date: 20 Jun 1998 17:15:30 +0100
Lines: 54
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote:

: On 17 Jun 1998, Bernhard Gleich wrote:

: > This question should be in the FAQ, but I didn't find it.

: The FAQ, by its very definition, is the list of FREQUENTLY-asked
: questions.  I don't invent the questions that go into it, I only
: gather them from this forum.  And the question you asked is not a
: frequent one, so it's not there.

I thought more people had similar problems as I. 

: > I'm trying to do some PCI DMA transfer. For this I need to know where
: > the physical address of my allocated memory is. But I could not find
: > any function that returns me this value. Could anyone point me to this
: > type of information?

: You could do one of these:

:     - Use a buffer in low memory (below 1MB mark).  This part of
:       memory is usually mapped 1:1, so the linear address is also the
:       physical address.  You can allocate a buffer there using
:       __dpmi_allocate_dos_memory.

I tried this. It works fine except I get a maximum usable rate for the
data transfer of 8MB/s. (intel P-II 233, LX, 64MB SDRAM) At this rate
half of my system is occupied with transfering the data from DOS
memory to linear memory. (Using _movedatal. Is there a faster
method?). For my application this rate would be sufficient (at least
as long as i do not improve the analog electronics), but it is not
satisfying to waste most of the theoretical 40Mb/s of the AD card
capability.


:     - Use the VDS (Virtual DMA Services) API, which is implemented as
:       a bunch of functions of Interrupt 4Bh.  See Ralf Brown's
:       Interrupt List for details.  This has a drawback that your
:       program won't work without a real memory manager, like EMM386,
:       QEMM or Windows, since CWSDPMI itself doesn't provide the VDS.

I am using Caldera (DR)DOS with its EMM386 but DPMI=OFF. DPMI
services are provided by CWSDPR0. Dose this configuration allow VDS
services?

As an alternative I was thinking of restricting CWSDPMI to the first
e.g. 16 MB of the RAM. The rest could be savely used as DMA
buffer. The data could be accessed by __djgpp_map_physical_memory. So
is there a method to do this restriction to CWSDPMI?  (This method
might also solve my additional problem that CWSDPMI can only adress
128MB of RAM.)

                                      Gru"s
                                       Bernhard Gleich

- Raw text -


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