home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sun / hardware / 6361 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.6 KB

  1. Xref: sparky comp.sys.sun.hardware:6361 comp.sys.sun.misc:5914 comp.unix.wizards:5275
  2. Path: sparky!uunet!dziuxsolim.rutgers.edu!caip.rutgers.edu!andre
  3. From: andre@caip.rutgers.edu (Timothy Andre)
  4. Newsgroups: comp.sys.sun.hardware,comp.sys.sun.misc,comp.unix.wizards
  5. Subject: Sun Device Driver HELP, PLEASE
  6. Keywords: lots-o-meg
  7. Message-ID: <Dec.18.11.13.08.1992.17922@caip.rutgers.edu>
  8. Date: 18 Dec 92 16:13:08 GMT
  9. Followup-To: comp.sys.sun.hardware
  10. Organization: Rutgers Univ., New Brunswick, N.J.
  11. Lines: 23
  12.  
  13.  
  14. I am working on a loadable device driver under SunOS 4.1.2 on a Sun
  15. 4/260.  The board I am writing the driver for has a couple of control
  16. registers and a large chunk of DRAM.  Once the control registers are
  17. mapped into the driver, I am able to query the board as to the
  18. physical address and size of the DRAM.  I use this information to then
  19. map in the DRAM.  With the 4MB DRAM option, I am able to map the
  20. entire DRAM with no problems using rmalloc() followed by mapin().
  21. However, with the 16MB DRAM option, it seems that rmalloc() fails as
  22. it returns 0 (Sun's device driver manual does not specify what
  23. rmalloc() returns on failure, so I assume 0 means it failed), which
  24. then causes mapin() to panic with "panic: Memory address alignment".
  25. However, if I open /dev/vme32d32 and use mmap() to map the entire 16MB
  26. DRAM, it succeeds.  How can I map in the entire DRAM from my driver?
  27.  
  28. The driver itself does not need to see the whole DRAM, only the top
  29. 1MB.  But I think I need to map the whole thing in so that a user
  30. program can use mmap() to get at the DRAM.
  31.  
  32. Any help is much appreciated!
  33.  
  34. Timothy Andre
  35. andre@caip.rutgers.edu
  36.