mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Booting PPC Linux
@ 2012-03-01 19:41 Renaud Barbier
  2012-03-01 20:07 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Renaud Barbier @ 2012-03-01 19:41 UTC (permalink / raw)
  To: barebox

I have a uImage + dtb that use to boot on a MPC8544-like system
a few months ago.

After rebasing my code, it did not work.

I notice that in arch/ppc/lib/ppclinux.c the kernel is now called
with the device tree as a parameter.

After investigation, I copied the device tree to within 8MB of the
kernel entry point (0x0). It booted.

Is the DTB relocation a missing step?
Otherwise any suggestions on what I should look at (different kernel image)?

I have already been through the Barebox code and U-boot code (U-boot
does relocate the device tree).


Cheers.





_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Booting PPC Linux
  2012-03-01 19:41 Booting PPC Linux Renaud Barbier
@ 2012-03-01 20:07 ` Sascha Hauer
  2012-03-02 16:28   ` Renaud Barbier
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2012-03-01 20:07 UTC (permalink / raw)
  To: Renaud Barbier; +Cc: barebox

On Thu, Mar 01, 2012 at 07:41:35PM +0000, Renaud Barbier wrote:
> I have a uImage + dtb that use to boot on a MPC8544-like system
> a few months ago.
> 
> After rebasing my code, it did not work.
> 
> I notice that in arch/ppc/lib/ppclinux.c the kernel is now called
> with the device tree as a parameter.
> 
> After investigation, I copied the device tree to within 8MB of the
> kernel entry point (0x0). It booted.
> 
> Is the DTB relocation a missing step?

Yes, it seems so. barebox holds the device tree in malloced space. This
is likely outside 8MB of the kernel entry point. I was not aware of that
restriction.

Sascha



-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Booting PPC Linux
  2012-03-01 20:07 ` Sascha Hauer
@ 2012-03-02 16:28   ` Renaud Barbier
  0 siblings, 0 replies; 3+ messages in thread
From: Renaud Barbier @ 2012-03-02 16:28 UTC (permalink / raw)
  To: barebox



On 01/03/12 20:07, Sascha Hauer wrote:
> On Thu, Mar 01, 2012 at 07:41:35PM +0000, Renaud Barbier wrote:
>> I have a uImage + dtb that use to boot on a MPC8544-like system
>> a few months ago.
>>
>> After rebasing my code, it did not work.
>>
>> I notice that in arch/ppc/lib/ppclinux.c the kernel is now called
>> with the device tree as a parameter.
>>
>> After investigation, I copied the device tree to within 8MB of the
>> kernel entry point (0x0). It booted.
>>
>> Is the DTB relocation a missing step?
> Yes, it seems so. barebox holds the device tree in malloced space. This
> is likely outside 8MB of the kernel entry point. I was not aware of that
> restriction.
I think I found the limitation in Linux.

In arch/powerpc/mm/init_32.c:

/*
  * address of the limit of what is accessible with initial MMU setup -
  * 256MB usually, but only 16MB on 601.
  */
phys_addr_t __initial_memory_limit_addr = (phys_addr_t)0x10000000;


The book E specific code (arch/ppc/mm/fsl_booke_mmu.c) adjusts this variable
  to 256MB but the highest I was able to  put the DTB is below 64MB.
It may be limited by another function call.

The available memory may be limited to 8 or 16MB on other CPUs (601 and 
8xx).

Thanks.

>
> Sascha
>
>
>

-- 
Renaud Barbier
14, Links Place
3/2 great Michael House
Edinburgh, EH67EN
Tel: +44 131 561 3532
--------------------------------------------------------------------------------


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-02 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01 19:41 Booting PPC Linux Renaud Barbier
2012-03-01 20:07 ` Sascha Hauer
2012-03-02 16:28   ` Renaud Barbier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox