From 6ed0ba1e93f99edef7a62c3670b4ec61103e0ae9 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 29 Apr 2024 10:04:59 +0200 Subject: cbfstool: Read XIP stage alignment requirements from ELF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On x86_64 romstage can contain page tables and a page table pointer which have an larger alignment requirement of 4096. Instead of hardcoding it, read if from the ELF phdrs. Change-Id: I94e4a4209b7441ecb2966a1342c3d46625771bb8 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/82102 Reviewed-by: Shuo Liu Tested-by: build bot (Jenkins) Reviewed-by: Jérémy Compostella Reviewed-by: Julius Werner --- Makefile.mk | 9 --------- 1 file changed, 9 deletions(-) (limited to 'Makefile.mk') diff --git a/Makefile.mk b/Makefile.mk index e642ac7a6e..3cfd97c53e 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -1276,15 +1276,6 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y) $(CONFIG_CBFS_PREFIX)/romstage-options := -b 0 endif ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y) -# Use a 64 byte alignment to provide a minimum alignment -# requirement for the overall romstage. While the first object within -# romstage could have a 4 byte minimum alignment that doesn't mean the linker -# won't decide the entire section should be aligned to a larger value. In the -# future cbfstool should add XIP files proper and honor the alignment -# requirements of the program segment. -# -# Make sure that segment for .car.data is ignored while adding romstage. -$(CONFIG_CBFS_PREFIX)/romstage-align := 64 ifeq ($(CONFIG_NO_XIP_EARLY_STAGES),y) $(CONFIG_CBFS_PREFIX)/romstage-options := -S ".car.data" else -- cgit v1.2.3