DMA above 1MB ?

DMA above 1MB ?

Post by Adam Craig Seyche » Wed, 19 Jan 1994 13:36:16



I have programmed the DMA channles 1,2,3,5,6,7 on my 386 to address
anywhere in the first 16MB and I need to know if all AT and above computers
are capable of it.

Thanks in advance.

 Adam.

 
 
 

DMA above 1MB ?

Post by M. van der La » Wed, 19 Jan 1994 22:39:32



Quote:

> I have programmed the DMA channles 1,2,3,5,6,7 on my 386 to address
> anywhere in the first 16MB and I need to know if all AT and above computers
> are capable of it.

I'm not sure about this, but all books I have say that DMA (usually) doesn't
work when the machine is in protected mode (unless nifty actions are taken
or something.. I've also heard about newer architectures that don't have any
problem at all with it).
Now, since addressing anything in the first 16MB (and above ofcourse), this
requires a few protected mode operations. It's just a matter of when you are
performing the DMA operation: while you're still in real mode or when you're in
protected mode to address the unconvetional ram.

There are lots of devices that use DMA and EMS simply by doing everything
in a sequence (not writing directly to that EMS block!), but if I must
beleive the books I have, not all machines will support what you wrote...

Again, I'm not sure...

Michel.

------------------------------------------------------------------------------
   Michel van der Laan                   |   [ Dutch & Dangerous! ]  



   At BBS Waterland on FidoNet           :   2:280/802.16  
   * BBS Waterland: 12 lines, waterland.wlink.nl, 2:280/802 and 2:280/803 *

 
 
 

DMA above 1MB ?

Post by Bill Atar » Thu, 20 Jan 1994 00:47:43




: >
: >
: >
: > I have programmed the DMA channles 1,2,3,5,6,7 on my 386 to address
: > anywhere in the first 16MB and I need to know if all AT and above computers
: > are capable of it.
: >

: I'm not sure about this, but all books I have say that DMA (usually) doesn't
: work when the machine is in protected mode (unless nifty actions are taken
: or something.. I've also heard about newer architectures that don't have any
: problem at all with it).
: Now, since addressing anything in the first 16MB (and above ofcourse), this
: requires a few protected mode operations. It's just a matter of when you are
: performing the DMA operation: while you're still in real mode or when you're in
: protected mode to address the unconvetional ram.

: There are lots of devices that use DMA and EMS simply by doing everything
: in a sequence (not writing directly to that EMS block!), but if I must
: beleive the books I have, not all machines will support what you wrote...

Should work fine on all machines that claim to be IBM comptible.

The protected mode/real mode thing ain't much of a problem. Long been
solved. DMA of course needs real physical 24 bit addresses. There is a
spec to do this in protected mode where stuff is mapped and floating
around. Check out the VDMA (or VDS, Virtual DMA Services) spec. Virtual
DMA. Also check into the intermediate buffering that Smartdrive and qemm
use where there ain't no vds.

 
 
 

DMA above 1MB ?

Post by Bill Atar » Thu, 20 Jan 1994 00:54:45


Also, I've done DMA above 1 meg to receive satellite data in the
background while running Desqview. I did it without VDS or buffering. The
it worked was:

1. Driven by a TSR that loades somewhere first in the system (before DV)
2. 'Allocate' the DMA buffers from extended memory a keep em allocated.
3. Look into allocating extended memory directly from the BIOS. Its not
that hard. Just trap a vector and report less memory available than there
is. This is one of the recognized ways to reserve extended memory for
your own use without using fancy ems/xms etc specs.
4. That region is yours to dma to your hearts desire.
5. Is running QEMM, there's an option to tell it to stay away from the
first N K of extended because its being used like this.

Just more input

 
 
 

DMA above 1MB ?

Post by Steffen Seeg » Thu, 20 Jan 1994 00:28:26




>> I have programmed the DMA channles 1,2,3,5,6,7 on my 386 to address
>> anywhere in the first 16MB and I need to know if all AT and above computers
>> are capable of it.
>I'm not sure about this, but all books I have say that DMA (usually) doesn't
>work when the machine is in protected mode (unless nifty actions are taken
>or something.. I've also heard about newer architectures that don't have any
>problem at all with it).

If I remember right the problem with DMA and protected mode is that you
have segmentdescriptors which point into a table where the physical
address can be found. But to do an DMA you need the physical address, so
that taking the value in the segment register and converting it into a
physical page address would not work in PM.

Quote:>Now, since addressing anything in the first 16MB (and above ofcourse), this
>requires a few protected mode operations. It's just a matter of when you are
>performing the DMA operation: while you're still in real mode or when you're in
>protected mode to address the unconvetional ram.

Anyhow, DMA works fine also in protected mode if you stay within the
first 16Mb and you can get the physical address of your buffer and you
could make sure that this buffer would not be moved (I think DPMI allows
to change the memory allocation during runtime because the
segment descriptors need not to be changed so that a program would not
notice this action). There might be an exception on EISA machines,
because they have 32 bit DMA adressing instead of 24 bit on ISA.

Quote:>There are lots of devices that use DMA and EMS simply by doing everything
>in a sequence (not writing directly to that EMS block!), but if I must
>beleive the books I have, not all machines will support what you wrote...

Thats because the mentioned limit of 16Mb for DMA access. Because the
buffer could be above 16Mb most 'operation systems' such as WINDOWS
emulate a DMA by transferring the data (via DMA) into a internal buffer
and then, if I/O has finished, moving it (via CPU) to the final buffer.
If that is the sense of a DMA - I believe not.....

                                Anyway, have a good time in 1994

                                        Bye, Steffen.

===========================================================================

 
 
 

1. Accessing memory above 1MB

Hmmm... looks like this FAQ section is a left-over from my misconception
about what `__dpmi_physical_address_mapping' does.  In reality it only
accomplishes step 2 above, you are right.  I will correct this in the
next revision of the FAQ.

2. Beyond Compare

3. Accessing above the 1MB boundary

4. NOVIX and OS/2

5. process above 1mb data use bc++4.5 in dos enviroement

6. Lost connection to MySQL server during query

7. How to access a specific memory location above 1MB

8. GTE-Bell Atlantic

9. Accessing memory above an adress of 1MB

10. memory above 1MB, VPMI and the other way

11. CODE above 1Mb

12. How can I access absolute address above 1MB?

13. Accessing AT-bus card mapped above 1MB