Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.enteract.com!newsfeed.enteract.com!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!su-news-feed4.bbnplanet.com!news.bbnplanet.com!newsfeed1.uswest.net!news.uswest.net!tera.com!not-for-mail From: Eric McRae <eric@tera.com> Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.bsd.freebsd.misc Subject: Re: Need help with VME memory access Date: Thu, 03 Jul 1997 17:28:35 -0700 Organization: Tera Computer Company Lines: 34 Message-ID: <33BC43B3.59E2B600@tera.com> References: <33BBE2AE.167EB0E7@tera.com> NNTP-Posting-Host: baldr.tera.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 4.1.4 sun4m) Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43889 All it takes to solve a problem is to announce that I can't solve it...:( By adding signal handlers and trying all sorts of addresses, I discovered some clues: If I: int fd = open("/dev/vmel0", O_RDWR, 0); u32 *vmeP = (u32 *)mmap( 0, 0x4000, PROT_READ|PROT_WRITE, MAP_FILE, fd, 0xc0000000 ); then try to access *vmeP I get a bus error. The value returned for vmeP is (usually) 0x0400c000. Access attempts at 0x400bffc cause segmentation violations which is expected. Accesses in 0x400c000 - 0x400fffC cause bus errors. Accesses in 0x40100000 - 0x4010ffc appear to work but are local memory not my VME memory. Looks like the mapping routines add a local memory tail to the end of the requested map. Accesses at 0x04011000 cause segmentation faults. So it appeared that the mapping was at least partially correct in that the failure changed in the requested range. I had been mapping the VME ram card at 0x40000000 because of the message vmel c0000000 pa 40000000 printed on the console. Guess it would have been better if I hadn't seen that message. I shut down the machine and mapped the VME RAM card at 0xC0000000 and now everything works as advertised. I'm still wondering about the little piece of local RAM mapped after the VME mapping. Anyone know what this is for? -- Eric McRae, Electro-Logic Machines, Inc. eric@elmi.com (consultant to:) Tera Computer Company 2815 Eastlake Ave E., Seattle WA, 98102 eric@tera.com, Phone: 206.325.0800x479, FAX: 206.325.2433