Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2009 15:02:21 +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:  <49A2AC6D.80208@semihalf.com>
In-Reply-To: <Pine.GSO.4.62.0902231359290.10803@serv1>
References:  <Pine.GSO.4.62.0902212141241.25932@serv1> <49A2704F.4060703@semihalf.com> <Pine.GSO.4.62.0902231359290.10803@serv1>

next in thread | previous in thread | raw e-mail | index | archive | help
Aleksey V Fedorov wrote:
> On Mon, 23 Feb 2009, Rafal Jaworowski wrote:
> 
>> 2. Hack e500_init() routine in the kernel to hard code some config
>> data it
>> normally gets from loader, like physical RAM size, memory regions
>> number etc.,
>> CCSR base address, CCB clock frequency, maybe something more, see
>> e500_init()
>> for details.
> 
> 
> I see that CCSRBAR address is hardcoded in vmparam.h
> 
> /*
>  * Kernel CCSRBAR location. We make this the reset location.
>  */
> #define CCSRBAR_VA              0xfef00000

This is the final virtual address the CCSR region gets remapped to by the
kernel initialization code. It shouldn't be altered unless you really need to
lay out the virtual map differently.

> #define CCSRBAR_SIZE            0x00100000
> 
> Who change them: loader(8) or U-boot ?
> In Linux dts it's on another address:
> 
> # grep CCSRBAR *.dts
> mpc8540ads.dts:         reg = <e0000000 00100000>;      // CCSRBAR 1M
> mpc8541cds.dts:         reg = <e0000000 00100000>;      // CCSRBAR 1M
> mpc8544ds.dts:          reg = <e0000000 00100000>;      // CCSRBAR 1M
> mpc8548cds.dts:         reg = <e0000000 00100000>;      // CCSRBAR 1M
> mpc8555cds.dts:         reg = <e0000000 00100000>;      // CCSRBAR 1M

What you have to provide manually for the e500_init() routine is the initial
location of the CCSR range, as left by the firmware at the time it passed
control to the kernel; based on this the init code remaps it into the final
CCSR location (above). I don't recall if DTS exposes exactly this initial
setting or the final, you need to verify how it's used by the Linux code.

Rafal



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