Subject: Re: deciphering rbus_min_start
To: None <tech-kern@NetBSD.org>
From: Bernd Ernesti <netbsd@lists.veego.de>
List: tech-kern
Date: 02/24/2006 15:10:22
On Thu, Feb 23, 2006 at 07:14:21PM -0500, Steven M. Bellovin wrote:
> In message <20060223204421.GX22989@che.ojctech.com>, David Young writes:
> >Last night I found that when I lowered rbus_min_start to 0x10000000,
> >the heretofore useless Cardbus slot on an old HP laptop came to life.
> >Previously, the kernel grumbled, "cbb0: bad Vcc request", and the cardslot
> >would not work.
> >
> >Now, I am trying to understand rbus_min_start does.  Here is what I
> >have figured out so far; tell me if I have it wrong.  It appears there
> >are regions of physical address space that are, roughly speaking,
> >"ineligible" for Cardbus I/O, but the kernel cannot always know what
> >they are.  (Some "phantom" device may be in the region, or the Cardbus
> >controller is behind a bridge that will not pass addresses in the region,
> >so if the Cardbus controller is mapped into that region, it will not
> >work.)  Ordinarily, such ineligible regions are nearer the bottom of
> >the address space than the top.  Usually, they are below 1GB.  Hence the
> >rbus_min_start parameter, and its default, 1GB.  Is that right so far?

See the BUGS section of cardbus(4).

> As far as I know, that's right; note the implication that rbus_min_start
> has to be outside the range of physical memory.  I have
> 
> 	options         RBUS_MIN_START=0x90000000
> 
> because I have 2G of RAM on my machine.
> 
> I wonder if your machine's problem is that it doesn't properly decode 
> all of the address lines, and that it was therefore trying to reference 
> physical memory.

Hmm, could we dynamicaly set RBUS_MIN_START based on the installed memory?
IMHO the current RBUS_MIN_START value of 0x40000000 would fail for systems
with more the 1GB of ram, or at least would case more problems.
What are other operating systems using?

Like setting it to slighly higher value (64, 128 or 256MB) then the currently
installed amount of ram?

Bernd