mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master 0/8] ARM: mmu: fix hang reserving memory after text area
@ 2025-08-05 17:45 Ahmad Fatoum
  2025-08-05 17:45 ` [PATCH master 1/8] partition: rename region_overlap_end to region_overlap_end_inclusive Ahmad Fatoum
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2025-08-05 17:45 UTC (permalink / raw)
  To: barebox

The loop remapping the memory banks looks at reserved memory
regions and then maps everything eXecute Never up to the start of the
region. If the region happens to be in the same bank as the text area
and it comes after it, this means the text area is temporarily mapped
eXecute Never, while barebox is running from it, which results in a
hang.

Fix this by remapping only after both reserved memory regions and text
area have been considered.

This series is a rebase of
https://lore.barebox.org/barebox/aJHagEVHUpHjALa2@pengutronix.de/T/#t

Ahmad Fatoum (8):
  partition: rename region_overlap_end to region_overlap_end_inclusive
  partition: define new region_overlap_end_exclusive helper
  ARM: mmu: skip TLB invalidation if remapping zero bytes
  ARM64: mmu: pass map type not PTE flags to early_remap_range
  ARM: mmu: provide setup_trap_pages for both 32- and 64-bit
  ARM: mmu: setup trap pages before remapping R/O
  ARM: mmu: share common memory bank remapping code
  ARM: mmu: fix hang reserving memory after text area

 arch/arm/cpu/mmu-common.c | 69 +++++++++++++++++++++++++++++++++++++++
 arch/arm/cpu/mmu-common.h |  1 +
 arch/arm/cpu/mmu_32.c     | 44 ++-----------------------
 arch/arm/cpu/mmu_64.c     | 51 +++++++----------------------
 commands/iomemport.c      |  2 +-
 common/partitions.c       |  6 ++--
 include/range.h           | 30 ++++++++++++++---
 7 files changed, 114 insertions(+), 89 deletions(-)

-- 
2.39.5




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-08-06  6:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-05 17:45 [PATCH master 0/8] ARM: mmu: fix hang reserving memory after text area Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 1/8] partition: rename region_overlap_end to region_overlap_end_inclusive Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 2/8] partition: define new region_overlap_end_exclusive helper Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 3/8] ARM: mmu: skip TLB invalidation if remapping zero bytes Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 4/8] ARM64: mmu: pass map type not PTE flags to early_remap_range Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 5/8] ARM: mmu: provide setup_trap_pages for both 32- and 64-bit Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 6/8] ARM: mmu: setup trap pages before remapping R/O Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 7/8] ARM: mmu: share common memory bank remapping code Ahmad Fatoum
2025-08-05 17:45 ` [PATCH master 8/8] ARM: mmu: fix hang reserving memory after text area Ahmad Fatoum
2025-08-06  6:31 ` [PATCH master 0/8] " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox