Factorize ARM relocate_code instances
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest posting 2/20 of 4 patches 0 repliesNew
- v4 posting 1/24 patches 0 repliesSuperseded
- v31 of 4 patches 0 repliesSuperseded
Patches in v4 posting 2/2 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [U-Boot] [PATCH v4 0/4] Factorize ARM relocate_code instances
Hi Fabio, Stefano,
Quoted 61 lines · Albert ARIBAUD
Hi Beno?t,
Quoted 56 lines · Beno?t Th?baudeau
Hi Albert,
Quoted 44 lines · Albert ARIBAUD
This series replaces all instances of
relocate_codein variousstart.Sfiles from the ARM architecture with a single instance inarch/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_codeIn SPL of mx31pdk,
board_init_fcallsrelocate_codeto 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_codeSame as mx31pdk.
3. Prevent all SPLs from assembling
relocate_codeNow that no SPL uses
relocate_codeany more, remove it completely from SPL builds by putting it entirely between #ifndefCONFIG_SPL_BUILDand #endif preprocessor conditional.4. Actual factorization of
relocate_codeRemove all instances of
relocate_codefromstart.Sand create a new file,arch/arm/lib/relocate.S, to provide the new single instance ofrelocate_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
_starttoaddr_moniand local offsets (fromrelocate_codeto several linker script symbols) have been verified.Quoted 4 lines
Changes in v4:
- added blank line after PXA25X conditional code
- fixed typos inrelocate_codecomments
- brought back 'mov pc,lr' instead of 'bx lr' for ARMv4[...]
Perfect!
Quoted 7 lines
Quoted 2 lines
For this v4 series:
Reviewed-by Beno?t Th?baudeau <[email protected]>Thanks Beno?t!
Now I need some people to regression-test it on their HW, both ARM and non-ARM just in case.
Can you test this series on mx31pdk (directly changed by this series), and some other i.MX EVK (e.g. ARMv7, so mx51evk or mx53*) board please? That should be enough for ARM.
Best regards,
Beno?t