From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 0/4] Factorize ARM relocate_code instances
Date: Sun, 19 May 2013 13:48:11 +0200 [thread overview]
Message-ID: <1368964095-1003-1-git-send-email-albert.u.boot@aribaud.net> (raw)
In-Reply-To: <1368705777-8789-1-git-send-email-albert.u.boot@aribaud.net>
This series replaces all instances of relocate_code in
various start.S files from the ARM architecture with a
single instance in arch/arm/lib/relocate.S.
This is done in steps, each step keeping the whole of ARM
U-Boot buildable and runnable and touching as little code
as necessary.
1. Drop mx31pdk SPL call to relocate_code
In SPL of mx31pdk, board_init_f calls relocate_code to
move SPL from the NAND read buffer to SRAM. This move
is not a relocation and is thus better implemented as
a simple ad hoc copy loop.
2. Drop tx25 SPL call to relocate_code
Same as mx31pdk.
3. Prevent all SPLs from assembling relocate_code
Now that no SPL uses relocate_code any more, remove
it completely from SPL builds by putting it entirely
between #ifndef CONFIG_SPL_BUILD and #endif preprocessor
conditional.
4. Actual factorization of relocate_code
Remove all instances of relocate_code from start.S and
create a new file, arch/arm/lib/relocate.S, to provide
the new single instance of relocate_code.
The only non-trivial change is that for PXA25X, a call
to unlock (actually disable) dcache is moved from before
relocating to after relocating. As this cache is either
locked-as-RAM or disabled, but never used as actual DDR
cache, this move has no performance effect on relocation
and no functional impact either.
The relocation routine was step-tested on versatileqemu
under gdb. Especially, both relocation offset (from
_start to addr_moni and local offsets (from relocate_code
to several linker script symbols) have been verified.
Changes in v4:
- added blank line after PXA25X conditional code
- fixed typos in relocate_code comments
- brought back 'mov pc,lr' instead of 'bx lr' for ARMv4
Changes in v3:
- fixed bugs in relocation offset computations
- moved and fixed comment regarding linker symbols
- fix missing conditionals on PXA25X dcache code
- replaced FLASH/RAM mentions with SRC/DST ones
Changes in v2:
- dropped relocate_code() call from mx31pdk SPL
- dropped relocate_code() call from tx25 SPL
- dropped all relocate_code instances from SPL builds
Albert ARIBAUD (4):
mx31pdk: copy SPL directly, not using relocate_code.
tx25: copy SPL directly, not using relocate_code.
arm: do not compile relocate_code() for SPL builds
arm: factorize relocate_code routine
arch/arm/cpu/arm1136/start.S | 81 ---------------------------
arch/arm/cpu/arm1176/start.S | 77 -------------------------
arch/arm/cpu/arm720t/start.S | 77 -------------------------
arch/arm/cpu/arm920t/start.S | 77 -------------------------
arch/arm/cpu/arm925t/start.S | 77 -------------------------
arch/arm/cpu/arm926ejs/start.S | 81 ---------------------------
arch/arm/cpu/arm946es/start.S | 77 -------------------------
arch/arm/cpu/arm_intcm/start.S | 77 -------------------------
arch/arm/cpu/armv7/start.S | 78 --------------------------
arch/arm/cpu/ixp/start.S | 77 -------------------------
arch/arm/cpu/pxa/start.S | 96 ++++---------------------------
arch/arm/cpu/s3c44b0/start.S | 77 -------------------------
arch/arm/cpu/sa1100/start.S | 77 -------------------------
arch/arm/lib/Makefile | 1 +
arch/arm/lib/relocate.S | 112 +++++++++++++++++++++++++++++++++++++
board/freescale/mx31pdk/mx31pdk.c | 16 +++++-
board/karo/tx25/tx25.c | 16 +++++-
17 files changed, 154 insertions(+), 1020 deletions(-)
create mode 100644 arch/arm/lib/relocate.S
--
1.7.10.4
next prev parent reply other threads:[~2013-05-19 11:48 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 21:56 [U-Boot] [PATCH 0/4] Factorize ARM relocation code Albert ARIBAUD
2013-05-10 21:56 ` [U-Boot] [PATCH 1/4] Rename arch/arm/lib/bss.c to sections.c Albert ARIBAUD
2013-05-10 21:56 ` [U-Boot] [PATCH 2/4] arm: make __image_copy_{start, end} compiler-generated Albert ARIBAUD
2013-05-10 21:56 ` [U-Boot] [PATCH 3/4] arm: make relocation section symbols compiler-generated Albert ARIBAUD
2013-05-10 21:56 ` [U-Boot] [PATCH 4/4] arm: factorize relocate_code routine Albert ARIBAUD
2013-05-11 2:04 ` Benoît Thébaudeau
2013-05-11 7:40 ` Albert ARIBAUD
2013-05-11 13:40 ` Benoît Thébaudeau
2013-05-11 22:13 ` Simon Glass
2013-05-11 0:25 ` [U-Boot] [PATCH 2/4] arm: make __image_copy_{start, end} compiler-generated Benoît Thébaudeau
2013-05-11 8:02 ` Albert ARIBAUD
2013-05-11 17:52 ` Benoît Thébaudeau
2013-05-11 20:13 ` Albert ARIBAUD
2013-05-12 8:57 ` Albert ARIBAUD
2013-05-14 9:50 ` [U-Boot] [PATCH v2 0/4] Factorize ARM relocate_code instances Albert ARIBAUD
2013-05-14 9:50 ` [U-Boot] [PATCH v2 1/4] mx31pdk: copy SPL directly, not using relocate_code Albert ARIBAUD
2013-05-14 9:50 ` [U-Boot] [PATCH v2 2/4] tx25: " Albert ARIBAUD
2013-05-14 9:50 ` [U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds Albert ARIBAUD
2013-05-14 9:50 ` [U-Boot] [PATCH v2 4/4] arm: factorize relocate_code routine Albert ARIBAUD
2013-05-14 16:01 ` Benoît Thébaudeau
2013-05-14 16:32 ` Albert ARIBAUD
2013-05-14 17:17 ` Benoît Thébaudeau
2013-05-14 18:51 ` Albert ARIBAUD
2013-05-14 18:49 ` Benoît Thébaudeau
2013-05-15 7:31 ` Albert ARIBAUD
2013-05-15 8:30 ` Albert ARIBAUD
2013-05-15 16:36 ` Benoît Thébaudeau
2013-05-15 17:55 ` Albert ARIBAUD
2013-05-16 14:29 ` Albert ARIBAUD
2013-05-16 14:28 ` Benoît Thébaudeau
2013-05-16 14:52 ` Albert ARIBAUD
2013-05-16 14:56 ` Albert ARIBAUD
2013-05-14 15:21 ` [U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds Benoît Thébaudeau
2013-05-14 16:21 ` Albert ARIBAUD
2013-05-14 17:12 ` Benoît Thébaudeau
2013-05-14 15:15 ` [U-Boot] [PATCH v2 2/4] tx25: copy SPL directly, not using relocate_code Benoît Thébaudeau
2013-05-14 15:14 ` [U-Boot] [PATCH v2 1/4] mx31pdk: " Benoît Thébaudeau
2013-05-14 16:13 ` Albert ARIBAUD
2013-05-14 17:10 ` Benoît Thébaudeau
2013-05-14 18:24 ` Albert ARIBAUD
2013-05-14 9:55 ` [U-Boot] [PATCH v2 0/4] Factorize ARM relocate_code instances Albert ARIBAUD
2013-05-16 12:02 ` [U-Boot] [PATCH v3 " Albert ARIBAUD
2013-05-16 12:02 ` [U-Boot] [PATCH v3 1/4] mx31pdk: copy SPL directly, not using relocate_code Albert ARIBAUD
2013-05-16 12:02 ` [U-Boot] [PATCH v3 2/4] tx25: " Albert ARIBAUD
2013-05-16 12:02 ` [U-Boot] [PATCH v3 3/4] arm: do not compile relocate_code() for SPL builds Albert ARIBAUD
2013-05-16 12:02 ` [U-Boot] [PATCH v3 4/4] arm: factorize relocate_code routine Albert ARIBAUD
2013-05-16 15:56 ` Benoît Thébaudeau
2013-05-16 16:57 ` Albert ARIBAUD
2013-05-16 14:53 ` [U-Boot] [PATCH v3 0/4] Factorize ARM relocate_code instances Albert ARIBAUD
2013-05-16 14:55 ` Albert ARIBAUD
2013-05-19 11:48 ` Albert ARIBAUD [this message]
2013-05-19 11:48 ` [U-Boot] [PATCH v4 1/4] mx31pdk: copy SPL directly, not using relocate_code Albert ARIBAUD
2013-05-19 11:48 ` [U-Boot] [PATCH v4 2/4] tx25: " Albert ARIBAUD
2013-05-19 11:48 ` [U-Boot] [PATCH v4 3/4] arm: do not compile relocate_code() for SPL builds Albert ARIBAUD
2013-05-19 11:48 ` [U-Boot] [PATCH v4 4/4] arm: factorize relocate_code routine Albert ARIBAUD
2013-05-19 15:57 ` [U-Boot] [PATCH v4 0/4] Factorize ARM relocate_code instances Benoît Thébaudeau
2013-05-20 9:26 ` Albert ARIBAUD
2013-05-20 15:39 ` Benoît Thébaudeau
2013-05-21 13:24 ` Fabio Estevam
2013-05-28 13:28 ` Albert ARIBAUD
2013-05-29 12:57 ` Fabio Estevam
2013-05-27 14:56 ` Simon Glass
2013-05-27 16:16 ` Albert ARIBAUD
2013-05-27 16:37 ` 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=1368964095-1003-1-git-send-email-albert.u.boot@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.