Skip to content

microblaze: Add support for full relocation

Michal Simek u-boot 4 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest23 patches 1 replyApplied
  2. v323 patches 0 repliesSuperseded
  3. v223 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v122 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Revert incorrect m68k merge - wrong patch
- Aligned NEEDS_MANUAL_RELOC for m68k

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/23tools: relocate-rela: Open binary u-boot file latertools/relocate-rela.c+7 -70 replies
2/23Makefile: Fix description for relocate-rela parametersMakefile+1 -10 replies
3/23tools: relocate-rela: Use global variablestools/relocate-rela.c+3 -10 replies
4/23tools: relocate-rela: Read rela start/end directly from ELFMakefile tools/relocate-rela.c+168 -170 replies
5/23microblaze: Switch absolute branches to relativearch/microblaze/cpu/start.S+9 -90 replies
6/23microblaze: Fix stack protection behaviorarch/microblaze/cpu/start.S+3 -20 replies
7/23microblaze: Fix early stack allocationarch/microblaze/cpu/start.S include/configs/microblaze-generic.h+1 -50 replies
8/23microblaze: Remove CONFIG_TEXT_BASE from codearch/microblaze/cpu/start.S+3 -30 replies
9/23microblaze: Fix typo in exception.carch/microblaze/cpu/exception.c+1 -10 replies
10/23mips: Move endianness selection to arch/Kconfigarch/Kconfig arch/mips/Kconfig+22 -180 replies
11/23microblaze: Enable REMAKE_ELFarch/Kconfig arch/microblaze/config.mk configs/microblaze-generic_defconfig+10 -30 replies
12/23microblaze: Separate code end substractionarch/microblaze/cpu/start.S+2 -10 replies
13/23microblaze: Change stack protection address to new stack addressarch/microblaze/cpu/start.S+1 -00 replies
14/23microblaze: Optimize register usage in relocate_codearch/microblaze/cpu/start.S+2 -50 replies
15/23microblaze: Remove code around r20 in relocate_code()arch/microblaze/cpu/start.S+0 -50 replies
16/23microblaze: Remove _start symbol handling at U-Boot startarch/microblaze/cpu/start.S+4 -30 replies
17/23microblaze: Add comment about reset locationarch/microblaze/cpu/start.S+1 -00 replies
18/23microblaze: Create SYM_ADDR macro to deal with symbolsarch/microblaze/cpu/start.S+13 -100 replies
19/23tools: relocate-rela: Extract elf64 reloc to special functiontools/relocate-rela.c+53 -430 replies
20/23tools: relocate-rela: Check that relocation works only for EM_AARCH64tools/relocate-rela.c+5 -00 replies
21/23tools: relocate-rela: Add support for elf32 decodingtools/relocate-rela.c+139 -20 replies
22/23tools: relocate-rela: Add support for 32bit Microblaze relocationtools/relocate-rela.c+166 -00 replies
23/23microblaze: Add support for run time relocationarch/Kconfig arch/m68k/Kconfig arch/microblaze/Kconfig +6 more+216 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 00/23] microblaze: Add support for full relocation

Hi,

this series is adding support for full rela relocation. Origin NEEDS_MANUAL_RELOC option is still there as default.

Code has been tested with multiple configurations on QEMU.
- Origin behavior - u-boot
- Relocated version - u-boot.elf
- Loading u-boot.bin to higher address than TEXT_BASE
- Loading u-boot.bin to lower address than TEXT_BASE

In v2 I fixed Kconfig issue reported in v1 series.

In v3 fix issues reported by gitlab CI.

I incorrectly squashed m68k change to wrong patch. V4 fixes it.

Thanks,
Michal

Changes in v4:
- Revert incorrect m68k merge - wrong patch
- Aligned NEEDS_MANUAL_RELOC for m68k

Changes in v3:
- Move NEEDS_MANUAL_RELOC to m68k Kconfig to avoid Kconfig issues

Changes in v2:
- new patch in series to solve Kconfig warning
- Fix endian selection

Michal Simek (23):
tools: relocate-rela: Open binary u-boot file later
Makefile: Fix description for relocate-rela parameters
tools: relocate-rela: Use global variables
tools: relocate-rela: Read rela start/end directly from ELF
microblaze: Switch absolute branches to relative
microblaze: Fix stack protection behavior
microblaze: Fix early stack allocation
microblaze: Remove CONFIG_TEXT_BASE from code
microblaze: Fix typo in exception.c
mips: Move endianness selection to arch/Kconfig
microblaze: Enable REMAKE_ELF
microblaze: Separate code end substraction
microblaze: Change stack protection address to new stack address
microblaze: Optimize register usage in relocate_code
microblaze: Remove code around r20 in relocate_code()
microblaze: Remove _start symbol handling at U-Boot start
microblaze: Add comment about reset location
microblaze: Create SYM_ADDR macro to deal with symbols
tools: relocate-rela: Extract elf64 reloc to special function
tools: relocate-rela: Check that relocation works only for EM_AARCH64
tools: relocate-rela: Add support for elf32 decoding
tools: relocate-rela: Add support for 32bit Microblaze relocation
microblaze: Add support for run time relocation

 Makefile                             |   6 +-
 arch/Kconfig                         |  26 +-
 arch/m68k/Kconfig                    |   3 +
 arch/microblaze/Kconfig              |  14 +
 arch/microblaze/config.mk            |  11 +
 arch/microblaze/cpu/Makefile         |   1 +
 arch/microblaze/cpu/exception.c      |   2 +-
 arch/microblaze/cpu/relocate.c       | 111 ++++++
 arch/microblaze/cpu/start.S          | 130 +++++--
 arch/microblaze/cpu/u-boot.lds       |  14 +
 arch/mips/Kconfig                    |  18 -
 common/board_f.c                     |   2 +
 configs/microblaze-generic_defconfig |   1 +
 include/configs/microblaze-generic.h |   4 -
 tools/relocate-rela.c                | 545 +++++++++++++++++++++++++--
 15 files changed, 789 insertions(+), 99 deletions(-)
 create mode 100644 arch/microblaze/cpu/relocate.c
Signature · 1 line
2.36.1