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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!seven-up.East.Sun.COM!sungy!stasys!alanya!lupe
  2. From: lupe@ukw.uucp (Lupe Christoph)
  3. Newsgroups: comp.sys.sun.hardware
  4. Subject: Re: Sun Device Driver HELP, PLEASE
  5. Keywords: lots-o-meg
  6. Message-ID: <1992Dec21.041252.19722@ukw.uucp>
  7. Date: 21 Dec 92 04:12:52 GMT
  8. References: <Dec.18.11.13.08.1992.17922@caip.rutgers.edu>
  9. Sender: news@stasys.sta.sub.org
  10. Organization: cic
  11. Lines: 31
  12.  
  13. andre@caip.rutgers.edu (Timothy Andre) writes:
  14.  
  15.  
  16. >I am working on a loadable device driver under SunOS 4.1.2 on a Sun
  17. >4/260.  The board I am writing the driver for has a couple of control
  18. >registers and a large chunk of DRAM.  Once the control registers are
  19. >mapped into the driver, I am able to query the board as to the
  20. >physical address and size of the DRAM.  I use this information to then
  21. >map in the DRAM.  With the 4MB DRAM option, I am able to map the
  22. >entire DRAM with no problems using rmalloc() followed by mapin().
  23. >However, with the 16MB DRAM option, it seems that rmalloc() fails as
  24. >it returns 0 (Sun's device driver manual does not specify what
  25. >rmalloc() returns on failure, so I assume 0 means it failed), which
  26. >then causes mapin() to panic with "panic: Memory address alignment".
  27. >However, if I open /dev/vme32d32 and use mmap() to map the entire 16MB
  28. >DRAM, it succeeds.  How can I map in the entire DRAM from my driver?
  29.  
  30. >The driver itself does not need to see the whole DRAM, only the top
  31. >1MB.  But I think I need to map the whole thing in so that a user
  32. >program can use mmap() to get at the DRAM.
  33.  
  34. You ran out of kernel address space.
  35.  
  36. If your driver maps the top 1 MB, it can still support mmap for
  37. the user. The cookies it returns are different, though. I can't
  38. tell you offhand what they must look like, sorry.
  39. -- 
  40. | ...!unido!ukw!lupe  (German EUNet, "bang")     |  Disclaimer:            |
  41. | lupe@ukw.UUCP       (German EUNet, domain)     |  This is an unofficial  |
  42. | suninfo!alanya!lupe (Sun Germany)              |  opinion of Christoph & |
  43. | Res non sunt complicanda praeter necessitatem. |  Imschweiler Consulting |
  44.