pdb@sei.cmu.edu (Patrick Barron) (03/30/89)
Has anyone successfully gotten ACC's ACP5250 driver working under 4.3-tahoe? I'm having a problem in which the kernel panics when turning the ACP5250 board on (using acpconfig); the proximate cause of the crashes is that, when the driver is trying to write to Unibus map registers (or what passes for such on a Q-bus...), the pointer it's using contains garbage, and it goes off and tries to poke at non-existent memory. This very same driver works just fine under Wisconsin 4.3BSD+NFS - did something change in the way I/O mapping is handled in the kernel? ACC *is* working on the problem, but I was just curious to know if anyone had seen it before. The sooner I can get this fixed, the better.... --Pat.
chris@mimsy.UUCP (Chris Torek) (03/30/89)
In article <3104@ci.sei.cmu.edu> pdb@sei.cmu.edu (Patrick Barron) writes: >Has anyone successfully gotten ACC's ACP5250 driver working under >4.3-tahoe? ... the kernel panics when turning the ACP5250 board on ... >... when the driver is trying to write to Unibus map registers ... the pointer >it's using contains garbage, and it goes off and tries to poke at >non-existent memory. Easy: Between 4.3BSD and 4.3-tahoe, Mike fixed the Unibus code so that it understands having map registers at a different location from Unibus adapter registers (if any), and to catch bugs, set the `adapter' register address to 0xc0000000. That one got caught. The map registers are now at uhp->uh_mr, rather than &uhp->uh_uba->uba_map[0]. This does not affect well-behaved vaxif drivers, as they all go through vaxif/if_uba.c. (The ACC drivers are not well-behaved.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
bar@dptcdc.datapoint.com (Brian Ruptash) (04/17/89)
In article <3104@ci.sei.cmu.edu> pdb@sei.cmu.edu (Patrick Barron) writes: >Has anyone successfully gotten ACC's ACP5250 driver working under >4.3-tahoe? ... the kernel panics when turning the ACP5250 board on ... >... when the driver is trying to write to Unibus map registers ... the pointer >it's using contains garbage, and it goes off and tries to poke at >non-existent memory. and in article <16626@mimsy.UUCP> chris@mimsy.umd.edu (Chris Torek) replies: > Between 4.3BSD and 4.3-tahoe, Mike fixed the Unibus code so that it > understands having map registers at a different location from Unibus > adapter registers (if any), and to catch bugs, set the `adapter' > register address to 0xc0000000. That one got caught. > > The map registers are now at uhp->uh_mr, rather than > &uhp->uh_uba->uba_map[0]. > > This does not affect well-behaved vaxif drivers, as they all go > through vaxif/if_uba.c. (The ACC drivers are not well-behaved.) I encountered the same problem in using the CSNET XNI and ACP5250 drivers under 4.3-tahoe. In an attempt to make them more "well behaved" (it took much more than this, for lots of unrelated reasons, but this answers your specific query...), I modified the XNI driver as follows. All the ACC-derived drivers (of which the CSNET XNI is one - change the dda_'s to as_'s in this fix) have the same problem, including the latest ACC beta version. This should work under 4.3 as well, although I never tried it as I had already moved to 4.3-tahoe at this point. *** if_dda.c Mon Mar 6 18:09:21 1989 --- if_dda.c.fix Sun Apr 16 23:56:51 1989 *************** *** 1175,1181 **** return; } /* leave the UNIBUS mapping register */ ! ds->dda_mapreg = (ds->dda_mapreg >> PGSHIFT) & 0x1ff; ds->dda_sioq.sq_head = (struct hdx_chan *) 0; ds->dda_sioq.sq_tail = (struct hdx_chan *) 0; --- 1175,1181 ---- return; } /* leave the UNIBUS mapping register */ ! ds->dda_mapreg = UBAI_MR (ds->dda_mapreg); ds->dda_sioq.sq_head = (struct hdx_chan *) 0; ds->dda_sioq.sq_tail = (struct hdx_chan *) 0; *************** *** 2404,2411 **** #endif MULTINET #else not VAXVMS /* System page table entry for UNIX 4.2 BSD */ ! pte = &Sysmap[btop ((int) hc->hc_addr & ~PG_V)]; ! io = &uh->uh_uba->uba_map[ds->dda_mapreg]; #endif VAXVMS --- 2404,2411 ---- #endif MULTINET #else not VAXVMS /* System page table entry for UNIX 4.2 BSD */ ! pte = kvtopte (hc->hc_addr); ! io = &uh->uh_mr[ds->dda_mapreg]; #endif VAXVMS -- Brian Ruptash | Internet: bar@datapoint.com Principal Architect | UUCP: {uunet, utzoo}!dptcdc!bar Datapoint Corporation | Phone: (416) 222-8005