Skip to content

arm64: Large PIE fixes

Edgar E. Iglesias u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v23 patches 0 repliesSuperseded

Changes in v3 from the cover letter

* Add non-PIE start address (run vs link-time) check
* Move 4K aligment Kconfig help description
* Fix load of __bss_start
* Use x0 rather than x1 in PIE load-address check
* Add missing tabs
* Add load-address check for non-PIE
* U-boot -> U-Boot in a few places
* Tweak commit messages

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm64: Mention 4K aligned load addresses in the PIE Kconfig helparch/arm/Kconfig+2 -20 replies
2/4arm64: Trap PIE builds early if load address is not 4K alignedarch/arm/cpu/armv8/start.S+17 -00 replies
3/4arm64: Add support for larger PIE U-Bootarch/arm/cpu/armv8/start.S arch/arm/lib/crt0_64.S+11 -31 reply
4/4arm64: Trap non-PIE builds early if starting from wrong addressarch/arm/cpu/armv8/start.S+13 -06 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMichal SimekStephen Warren
SeriesR-b
1/4
2/4T-b
3/4T-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] arm64: Large PIE fixes

From: "Edgar E. Iglesias" <[email protected]>

This fixes some build issues with large (> 1MB) PIE U-Boot setups. We also document the 4K aligned load address requirement and add an early run-time check for it.

As requested by reviewers, I've also added a runtime check for non-PIE builds to trap the startup sequence early if the start address doesn't match between run-time and link-time.

Cheers,
Edgar

ChangeLog:
v2 -> v3:
* Add non-PIE start address (run vs link-time) check
* Move 4K aligment Kconfig help description
* Fix load of __bss_start
* Use x0 rather than x1 in PIE load-address check
* Add missing tabs
* Add load-address check for non-PIE
* U-boot -> U-Boot in a few places
* Tweak commit messages

v1 -> v2:
* Fix adr of _start in arch/arm/lib/crt0_64.S
* Add early check and bail out into a WFI loop when not 4K aligned
* Document the 4K alignement requirement in Kconfig

Edgar E. Iglesias (4):
arm64: Mention 4K aligned load addresses in the PIE Kconfig help
arm64: Trap PIE builds early if load address is not 4K aligned
arm64: Add support for larger PIE U-Boot
arm64: Trap non-PIE builds early if starting from wrong address

 arch/arm/Kconfig           |  4 ++--
 arch/arm/cpu/armv8/start.S | 36 ++++++++++++++++++++++++++++++++++--
 arch/arm/lib/crt0_64.S     |  8 +++++++-
 3 files changed, 43 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1