Skip to content

Ensure 16 alignment of reserved memory in board_f.c

Patrick Delaunay u-boot 10 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 0 repliesNew
  2. v3 posting 7/74 patches 0 repliesSuperseded
  3. v3 posting 6/71 patch 0 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v24 patches0 repliesSuperseded
v3 posting 5/71 patch0 repliesSuperseded
v3 posting 4/71 patch0 repliesSuperseded
v3 posting 3/71 patch0 repliesSuperseded
v3 posting 2/71 patch0 repliesSuperseded
v3 posting 1/71 patch0 repliesSuperseded
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

- replace insure by ensure in comment
- replace insure by ensure

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4board_f.c: Ensure gd->new_bootstage alignmentcommon/board_f.c+5 -01 reply
2/4Revert "stm32mp1: remove the imply BOOTSTAGE"arch/arm/mach-stm32mp/Kconfig+2 -01 reply
3/4arm: set the relocated gd with gd->new_gdarch/arm/lib/crt0.S+1 -21 reply
4/4board_f.c: Ensure 16 alignment of start_addr_sp and reserved memorycommon/board_f.c+18 -141 reply

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchVikas MANOCHAPatrick DelaunayStephen Warren
1/4R-b R-b T-b
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/4] Ensure 16 alignment of reserved memory in board_f.c

Hi,

It is a V4 with only cosmetics udpate (s/insure/ensure) for the V3 serie:
http://patchwork.ozlabs.org/project/uboot/list/?series=162918&state=*

V2 was:
http://patchwork.ozlabs.org/project/uboot/list/?series=154685&state=*

After the first correction, only for bootstage alignment, I remove the stm32mp1 workaround in the 2nd patch.

The 4th patch is a complete solution to alignment (proposed in comment 5 of
http://patchwork.ozlabs.org/patch/1201452/#2327366)
I always align the reserved memory to 16 bytes with a new function reserve_stack_aligned().

But this patch causes an issue on ARM 32 bits, as the relocated gd pointer is not initialized with gd->new_gd as expected now in reserve_global_data() but is hard-coded with:
relocated gd = gd->bd - GD_SIZE
{with GD_SIZE = sizeof(struct global_data)}

After the 4rd patch, this assumption in not more true as sizeof(struct global_data) is not always 16 bytes aligned.

This issue is solved with the 3rd patch of the serie
arm: set the relocated gd with gd->new_gd

Only tested on STM32MP157C-EV1 board (ARM32 architecture).

Changes in v4:
- replace insure by ensure in comment
- replace insure by ensure

Changes in v3:
- rename reserve_sp to reserve_stack_aligned

Changes in v2:
- import: [U-Boot,v3] board_f.c: Insure gd->new_bootstage alignment
- fix commit message s/bits/bytes/

Patrice Chotard (1):
board_f.c: Ensure gd->new_bootstage alignment

Patrick Delaunay (3):
Revert "stm32mp1: remove the imply BOOTSTAGE"
arm: set the relocated gd with gd->new_gd
board_f.c: Ensure 16 alignment of start_addr_sp and reserved memory

 arch/arm/lib/crt0.S           |  3 +--
 arch/arm/mach-stm32mp/Kconfig |  2 ++
 common/board_f.c              | 27 ++++++++++++++++++---------
 3 files changed, 21 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.1