[PATCH 1/2] powerpc: don't pass unused regs around in head_.*.S

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Tue Oct 14 20:08:44 EST 2008


* Benjamin Herrenschmidt | 2008-10-14 10:25:12 [+1100]:

>On Sun, 2008-10-12 at 16:08 +0200, Sebastian Andrzej Siewior wrote:
>> From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
>> 
>> This looks like a relict from arch/ppc. machine_init() is accepting
>> only two parameters (dtb, phys) and is using only the first one.
>
>This isn't 100% correct actually...
>
>First, the base head_32.S (could be called head_6xx.S I suppose)
>supports a few more calling conventions such as the real OF one, with
>added support for initrd and cmdline in registers , and the BootX one.
Yep, those extra register are only used in prom_init() or bootx_init().
In case we called one of those two we end up again in __start(dtb, phys, 0)

>Then, calling convention for the other cases is slightly better defined
>than just having r3 contain a device-tree pointer. The physical address
>is an important part of it, the fact that r5 is NULL to differenciate
>from an OF entry too, and we're moving toward the full ePAPR definition.
Okay. Power_ePAPR_APPROVED_v1.0.pdf says we have r4, r5, r8, r9 = 0, r6 =
magic and r7 size of the initial mapped area. I don't see the physical
address here.

Do you want me to update the comment / patch description or leave
everything as it? I guess we don't have to pass unused register to
machine_init(), do we?

>Cheers,
>Ben.

Sebastian



More information about the Linuxppc-dev mailing list