[net.unix-wizards] UBA_NEED16 & 4.2BSD in uballoc

david@ukma.UUCP (David Herron, NPR Lover) (08/20/85)

I'm still writing that device driver ...  :-)

I was poking around in uba.c and friends to understand what happens there.
I saw this flag in ubavar.h, UBA_NEED16, which is supposed to be if
you need 16 bit addresses.  But I can't find the code where this is
supported!

I would expect this to return unibus map pointers in the bottom 64k
of the unibus space.  Looking around, I can see three places where
it's used in ../vaxif.  But it just gets passed on down to uballoc()
in the flags argument then promptly ignored.  There's no lower level
routines than uballoc(), so it can't be hiding on me.

How can this work?  Or do the people that do this just serendipitously
get the correct addresses already?  Or what?

	Confusedly yours,
-- 
--- David Herron
--- ARPA-> ukma!david@ANL-MCS.ARPA
--- UUCP-> {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!david
---        {ihnp4,decvax,ucbvax}!cbosgd!ukma!david

Hackin's in me blood.  My mother was known as Miss Hacker before she married!

chris@umcp-cs.UUCP (Chris Torek) (08/22/85)

In my sys/vaxuba/uba.c I find the following:

	if ((flags & UBA_NEED16) && reg + npf > 128) {
		/*
		 * Could hang around and try again (if we can ever succeed).
		 * Won't help any current device...
		 */
		rmfree(uh->uh_map, (long)npf, (long)reg);
		splx(a);
		return (0);
	}

This is in ubasetup(), right after getting map registers; the next
couple of statements are

	bdp = 0;
	if (flags & UBA_NEEDBDP) {
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland