home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.ibm.pc.hardware:24204 comp.os.msdos.programmer:9343
- Newsgroups: comp.sys.ibm.pc.hardware,comp.os.msdos.programmer
- Path: sparky!uunet!mcrware!adam
- From: adam@microware.com (Adam Goldberg)
- Subject: Re: Is it possible to use correctly DMA in Protected Mode ?
- Message-ID: <1992Sep14.131620.1143@microware.com>
- Sender: news@microware.com
- Nntp-Posting-Host: ren
- Organization: Microware Systems Corp., Des Moines, Iowa
- References: <1992Aug31.152155.2190@brandonu.ca> <ADVS5igm46@sean.tomsk.su>
- Date: Mon, 14 Sep 1992 13:16:20 GMT
- Lines: 45
-
- root@sean.tomsk.su (Alex Povzner) writes:
-
- >> In article <1992Aug26.162928.20891@csqx.cs.rhbnc.ac.uk>, adrian@csqx.cs.rhbnc.ac.uk (A Johnstone) writes:
- >> > Well, my DMA saga continues. Several people told me after my last post that
- >> > vanilla MS-DOS does map virtual to physical as in real mode until you start
- >> > filling memory up (contrary to what I had claimed). I now have basic DMA
- >> > working on a 386, having fixed the timing problem that had been causing the
- >> > virtual DMA to fail.
- >> >
-
- > I have not reached full an understanding of your thought, but
- >have met some words having attracted my attention. My current task is
- >to make working under Protected Mode a library that erlier has been working
- >with DMA under Real Mode. Is there any method to do that, taking into account
- >mixing of addresses in the case of Protected Mode ? If I rightly estimates
- >the situation, sometimes DMA will get requests to fill or read a memory
- >region devided into pieces allocated in different places of the phisical
- >memory. Is this problem generally resolvable ? Is it possible to use
- >DMA in Protected Mode or not ?
-
- Yes, it is possible to use DMA in protected mode. The architecture would
- be MAJORLY brain-damaged if you could not. However, there are some
- issues to be dealt with:
-
- The easiest way would be to guarantee that logical addresses == physical
- addresses. Then you can just program DMA for whatever logical address
- you want (taking into account the normal DMA over boundaries, etc). No
- problem.
-
- If logical addresses are not guaranteed to be the same as physical, you
- must translate the logical addresses into physical, THEN program the DMA.
-
- If logical addresses are not the same as physical, and are NOT GUARANTEED
- to be UNFRAGMENTED (ie, if logical==physical+offset but
- logical+1 <> physical+offset+1), then you need to determine when this is
- occuring and program the DMA for each physical block. A pain, but doable.
-
-
-
-
- --
- Adam G.
- adamg@microware.com, or ...!uunet!mcrware!adamg
- The above is not to be construed in any way as the official or unofficial
- statements of Microware, or any Microware employees.
-