[U-Boot] [PATCH v2 4/6] reboard: arm: Add processor function library
Simon Glass
sjg at chromium.org
Thu Dec 22 07:23:17 CET 2011
Hi Albert,
On Sun, Dec 11, 2011 at 9:24 PM, Simon Glass <sjg at chromium.org> wrote:
> Hi Albert,
>
> On Sun, Dec 11, 2011 at 6:16 AM, Albert ARIBAUD
> <albert.u.boot at aribaud.net> wrote:
>> Hi Simon,
>>
>> Le 10/12/2011 20:16, Simon Glass a écrit :
>>
>>> Add a library to hold ARM assembler code which is generic across all
>>> ARM CPUs. At first it just holds some basic relocation code. The
>>> plan is to move more start.S code here.
>>
>>
>> I still don't see the point in this new file, as this code is common across
>> all ARM boards and start.S already has much of such common code. I'd rather
>> see start.S keeping the common code and moving up the hierarchy, and and the
>> {ISA, core, SoC, board} specific code be moved out of start.S and down into
>> their 'natural' specific location.
>
> If we do this then it would be a separate series focused on
> refactoring start.S. Are you saying that you want that series before
> we address this relocation series? Where specifically should we put
> the new start.S and what should we call it? I assume that all the
> little start.S files will remain or are you wanting to rename all of
> those into some other filename in arch/arm/cpu/... In which case what
> should those be called?
>
> It is good to be really specific so that I know the destination port
> before embarking on a new voyage.
>
> Regards,
> Simon
Thanks for your comments.
Still I am not sure what is needed here. Short of refactoring all of
start.S (which is a separate and larger effort0 I am not sure what to
do. My purpose with this series is to move ARM to generic relocation
which is why I am removing all the repeated relocation code from each
start.S.
I think we need an assembler file shared across all ARM. Since it
cannot be start.S (certainly not now and perhaps not ever if the early
code is too different between different ARM architectures or cannot
easily be tested) then what should it be? I have proposed
arch/arm/lib/proc.S.
(No I really don't want to provide 10 copies of my little
board_init_r()-caller function in each start.S, I hope you are not
suggesting that!)
My idea is that the various start.S files will shrink down with time
as code in there becomes common (IMO the first priority after
relocation would be exception handling). But it is going to break a
few eggs, since there are subtle differences between the different
copies, and some people will ask why we are breaking their chip, or
introducing the possibility of breakage. At least with relocation we
see a real performance benefit and substantial LOC reduction which
helps people stay motivated.
I have the generic board series waiting but would like to get this one
sorted out first. Looking forward to your clarification when you have
time.
Again the main question is where to put the common ARM assembler code.
Regards,
Simon
>
>>
>> Amicalement,
>> --
>> Albert.
More information about the U-Boot
mailing list