Skip to content

Commit

Permalink
elfloader: arm: fix alignment of AArch32
Browse files Browse the repository at this point in the history
pagetables.

The 64 kiB alignment is a maximum requirement for a stage2
concatenated pagetable. See Table G5-4 in ARM DDI 0487I.a, page
G5-9186.

Note: Both comments at the top of the file as well as in line 85
say "64 kiB". 2^14 is unfortunately only 16 kiB.

Note2: This code is not executed on AArch64, because the
finish_relocation() function panics on AArch64. The latter always
takes the "shortcut" via continue_boot().

Signed-off-by: Matthias Rosenfelder <[email protected]>
  • Loading branch information
mro-github-12345 authored and Andy Bui committed Feb 25, 2024
1 parent 1aa2fb0 commit c329bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elfloader-tool/src/arch-arm/sys_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define DTB_MAGIC (0xedfe0dd0)

/* Maximum alignment we need to preserve when relocating (64K) */
#define MAX_ALIGN_BITS (14)
#define MAX_ALIGN_BITS (16)

#ifdef CONFIG_IMAGE_EFI
ALIGN(BIT(PAGE_BITS)) VISIBLE
Expand Down

0 comments on commit c329bef

Please sign in to comment.