Subject: Re: [PATCH 07/17] bootwrapper: Add dt_set_memory(), to fill in the /memory node.

From: David Gibson <[email-masked]>
Date: Fri, 23 Mar 2007 14:24:40 +1100

On Thu, Mar 22, 2007 at 12:02:56PM +0100, Segher Boessenkool wrote:
> >>> However, #address-cells=2, #size-cells=1 is common enough that we
> >>> really need to support that case.
> >>
> >> On the root node?!?  Who would do such a strange thing?
> >
> > Ebony, for one, it works nicely for a 32-bit system with >32-bit bus.
> 
> It means you cannot have a 4GB-or-bigger region below your
> root node.  Dunno if Ebony ever needs one, for I/O mapping
> perhaps?

Nope.  0-4GB is RAM, 4-8 is in-built IO, 8-12 is PCI IO, and I forget
what 12-16 is, if anything.

> > Apple G5s do it too.
> 
> And they do a an awful workaround for their memory node
> because of this.
> 
> Is their any reason why you couldn't use #a=#s=2 on 32-bit
> systems?  The root node is one contiguous hunk of address
> space, so the biggest (theoretically) possible size is equal
> to the biggest address (+1).  It's not hard to come up with
> an example where you need a size of 4GB or more.

Well, yes, we could.  I believe the only reason Apple does it is to
make the tree a little more compact.  But the point is that trees are
out there with #a=2 #s=1, so the fixup code ought to be able to handle
them.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson