All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 0/6] Introduce generic relocation feature
Date: Thu, 29 Mar 2012 08:41:47 +0200	[thread overview]
Message-ID: <4F74042B.1000602@aribaud.net> (raw)
In-Reply-To: <CAPnjgZ1HOeRuNUWY832BNs_GMAOJDsmK_oJbM6sohDMuerwXdA@mail.gmail.com>

Hi Simon,

Le 20/02/2012 23:38, Simon Glass a ?crit :

>> You should keep the code that jumps to board_init_r as it is.
>
> I have had a look at this and I don't believe that I can. I need to
> call it from C and so it needs to conform to the C calling standard. I
> will send a new series showing what I mean.

No need to call it from C. The most correct flow should be that the 
start.S code would call board_init_f, relocate_code() and board_init_r, 
so that no C code should call assembly language code, and setting the C 
environment or modifying it would only happen outside of C code.

> Are you saying that you want a start.S in arch/arm/cpu and each
> arch/arch/cpu/*/ ? I would prefer there was only one file named
> start.S.

> OK and I hope that file is not arch/arm/cpu/start.S which would
> introduce confusion I think.

I don't want multiple homonym files either. I want a start.S file 
responsible for the generic ARM startup and another asm or include file 
responsible for the ARM-architecture specifics (i.e. ARM1176, ARM926EJS 
etc) if required. The name of that second file I'll think over, but it 
won't be start.S

>> What is the code size increase of using arch-specific mem ops?
>
> About 800 bytes for me:
>
>     text	   data	    bss	    dec	    hex	filename
>   177653	   3932	 218240	 399825	  619d1	u-boot
>   178429	   3932	 218240	 400601	  61cd9	u-boot

Thanks.

>>>>> One problem remains which causes mx31pdk to fail to build. It doesn't
>>>>> have string.c in its SPL code and the architecture-specific versions of
>>>>> memset()/memcpy() are too large. I propose to add a local change to
>>>>> reloc.c that uses inline code for boards that use the old legacy SPL
>>>>> framework. We can remove it later. This is not included in v2 but I am
>>>>> interested in comments on this approach. An alternative would be just
>>>>> to add simple memset()/memcpy() functions just for this board (and one
>>>>> other affected MX31 board).
>>>>
>>>>
>>>> I am not too fond of the "later removal" approach. In my experience, this
>>>> invariably tends to the "old bloat in the code no one knows the reason
>>>> of"
>>>> situations.
>>>
>>>
>>> Me neither. The only board affected is the tx25. We could let the
>>> maintainer fix it up, I suppose. I have no way of testing it.
>>
>> John: ping?
>
> Since I didn't hear anything I have elected to patch this up a
> different way - basically splitting out memcpy() and memset() from
> string.c. See what you think of the new series. It introduces no
> breakages now, at least.

I'll look this up today.

> Regards,
> Simon

Amicalement,
-- 
Albert.

  reply	other threads:[~2012-03-29  6:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 18:24 [U-Boot] [PATCH v3 0/6] Introduce generic relocation feature Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 1/6] Create reloc.h and include it where needed Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 2/6] define CONFIG_SYS_SKIP_RELOC for all archs Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 3/6] Add generic relocation feature Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 4/6] arm: Add processor function library Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 5/6] arm: Move over to generic relocation Simon Glass
2011-12-26 18:24 ` [U-Boot] [PATCH v3 6/6] arm: Remove unused code in start.S Simon Glass
2012-01-18  7:28 ` [U-Boot] [PATCH v3 0/6] Introduce generic relocation feature Albert ARIBAUD
2012-01-18 19:31   ` Simon Glass
2012-02-03 22:06     ` Albert ARIBAUD
2012-02-20 22:38       ` Simon Glass
2012-03-29  6:41         ` Albert ARIBAUD [this message]
2012-03-31  6:25           ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F74042B.1000602@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.