home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / ibm / pc / hardware / 24204 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  2.6 KB

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