Date: Fri, 14 Dec 2001 00:50:31 +0100 From: Thomas Moestl <tmoestl@gmx.net> To: Terry Lambert <tlambert2@mindspring.com> Cc: arch@FreeBSD.org Subject: Re: Please review: changes to MI bus code for sparc64 Message-ID: <20011214005031.B4747@crow.dom2ip.de> In-Reply-To: <3C192C70.9A79B3C5@mindspring.com>; from tlambert2@mindspring.com on Thu, Dec 13, 2001 at 02:32:16PM -0800 References: <20011213192033.A871@crow.dom2ip.de> <3C18F78D.C537D487@mindspring.com> <20011213201213.B871@crow.dom2ip.de> <3C192C70.9A79B3C5@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2001/12/13 at 14:32:16 -0800, Terry Lambert wrote: > > I did this change to support the Sun APB bridge, which does not have > > base and limit registers, but uses a different mechanism to set the > > decoded ranges. So, to check resource allocations correctly, the apb > > driver needs to implement it's own alloc_resource method. The pcib > > functions which need not be 'overridden' can be directly used in the > > method table. > > I still think that the proper way is to call a function to get the > addresses of the static functions. Ideally, you would pass and/or > break out the alloc_resource method, which would make the Sun APB > brige "standard". I'll think about doing that. > > > Also in subr_rman.c, in int_rman_activate_resource(), the change from > > > 32 to 31 is not obvious... should you also change "> 0" to ">= 0"? It's > > > not clear to me what this change fixes. I'm probably just missing > > > something... > > > > 1 << 32 is out of u_int32_t range, so it just would make no sense. In > > addition, it will overflow i (which is an int) on most architectures. > > I was more concerned with the 1 << 0 not being hit at all. I agree > on the overflow fix; I was just curious why the entire range was not > shifted down 1, instead of just avoiding the overflow. If no bit from 31 to 1 was found set, an alignment of 1 (i.e. any address is valid) is assumed. This corresponds to bit 0, so both 1 and zero mean that no alignment needs to be maintained. - thomas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011214005031.B4747>