Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2009 10:39:49 +0100
From:      Rafal Jaworowski <raj@semihalf.com>
To:        Aleksey V Fedorov <alexf@vsi.ru>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: boot process
Message-ID:  <49A511E5.1010705@semihalf.com>
In-Reply-To: <Pine.GSO.4.62.0902241944380.12361@serv1>
References:  <Pine.GSO.4.62.0902212141241.25932@serv1> <49A2704F.4060703@semihalf.com> <Pine.GSO.4.62.0902241839390.12361@serv1> <49A42369.600@freebsd.org> <Pine.GSO.4.62.0902241944380.12361@serv1>

next in thread | previous in thread | raw e-mail | index | archive | help
Aleksey V Fedorov wrote:
> On Tue, 24 Feb 2009, Nathan Whitehorn wrote:
> 
>>> What is regular method to allocate some piece of memory in
>>> e500_init() for unflatten device tree structures? Board loader
>>> provide pointer to to the device-tree block in r3(i.e. void *mdp
>>> argument of e500_init()).
>>> I can parse them, but where to store tree at this point?
>>
>> FreeBSD currently does not support the flattened device trees used by
>> Linux. Instead, it uses a hardcoded set of board information, which
>> will do fine as a temporary solution.
>>
>> If you wish to add support, I would suggest looking at how the PowerPC
>> AIM code uses Open Firmware to obtain boot parameters, and also at the
>> Open Firmware interface layer (as implemented, for example, in
>> sys/dev/ofw/ofw_standard.c). This is something I've been meaning to do
>> for some time in order to facilitate a Cell port.
> 
> I know how to obtain parameters.
> My question is how to store them at early boot?
> For example is it possible to store them in the rest of 16MB page
> after kernel and device-tree block?
> 
> kernel start            = 0xc0000100
> kernel end              = 0xc0528a18
> device-tree block start = 0xc0800800
> device-tree block end   = 0xc080168e
> 
> Is it safe to store unflatten device tree after 0xc080168e ?
> Is the rest of 16MB page retain unchaged or it can be used later?

I'm not sure where these device-tree addresses come from, but in general you
have to be very careful about placing things at this early stage of kernel
initialization. You cannot arbitrarily use some range, but need to carve out
an area from the available region(s), so that it is not used for other purposes.

There is a number of important data located after kernel [ELF] end, see
mmu_booke_bootstrap() for details about the layout.

Rafal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A511E5.1010705>