home *** CD-ROM | disk | FTP | other *** search
- 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
- From: lupe@ukw.uucp (Lupe Christoph)
- Newsgroups: comp.sys.sun.hardware
- Subject: Re: Sun Device Driver HELP, PLEASE
- Keywords: lots-o-meg
- Message-ID: <1992Dec21.041252.19722@ukw.uucp>
- Date: 21 Dec 92 04:12:52 GMT
- References: <Dec.18.11.13.08.1992.17922@caip.rutgers.edu>
- Sender: news@stasys.sta.sub.org
- Organization: cic
- Lines: 31
-
- andre@caip.rutgers.edu (Timothy Andre) writes:
-
-
- >I am working on a loadable device driver under SunOS 4.1.2 on a Sun
- >4/260. The board I am writing the driver for has a couple of control
- >registers and a large chunk of DRAM. Once the control registers are
- >mapped into the driver, I am able to query the board as to the
- >physical address and size of the DRAM. I use this information to then
- >map in the DRAM. With the 4MB DRAM option, I am able to map the
- >entire DRAM with no problems using rmalloc() followed by mapin().
- >However, with the 16MB DRAM option, it seems that rmalloc() fails as
- >it returns 0 (Sun's device driver manual does not specify what
- >rmalloc() returns on failure, so I assume 0 means it failed), which
- >then causes mapin() to panic with "panic: Memory address alignment".
- >However, if I open /dev/vme32d32 and use mmap() to map the entire 16MB
- >DRAM, it succeeds. How can I map in the entire DRAM from my driver?
-
- >The driver itself does not need to see the whole DRAM, only the top
- >1MB. But I think I need to map the whole thing in so that a user
- >program can use mmap() to get at the DRAM.
-
- You ran out of kernel address space.
-
- If your driver maps the top 1 MB, it can still support mmap for
- the user. The cookies it returns are different, though. I can't
- tell you offhand what they must look like, sorry.
- --
- | ...!unido!ukw!lupe (German EUNet, "bang") | Disclaimer: |
- | lupe@ukw.UUCP (German EUNet, domain) | This is an unofficial |
- | suninfo!alanya!lupe (Sun Germany) | opinion of Christoph & |
- | Res non sunt complicanda praeter necessitatem. | Imschweiler Consulting |
-