From a4f067c058982ec8fad4af4189b9d05bf0d4b119 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 26 Oct 2025 18:29:40 -0500 Subject: [PATCH] Makefile.mk: Align FMAP COREBOOT region to 4k boundary Ensure FMAP_CBFS_BASE is aligned to 4k (0x1000) to match typical flash sector boundaries. This allows flashrom to read/write only the COREBOOT region using the --fmap layout option without extending the boundaries. Previously, the COREBOOT region would start immediately after the FMAP region (at FMAP_BASE + 0x200), which is not sector-aligned. Most flash chips support a minimum 4k sector size, so flashrom would automatically extend the region boundaries and emit a warning. This eliminates warnings from flashrom such as: Region [0x00c54000 - 0x00c541ff] is not sector aligned! Extending end boundaries by 0x00000e00 bytes, from 0x00c541ff -> 0x00c54fff TEST=build/boot google/gladios, update using --fmap and verify no warnings regarding region alignment. Change-Id: Ie4963bbef546aa23364bb9c1c347c5eb5bfeaf8e Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/89811 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.mk b/Makefile.mk index abc804e99a..62bce6f91c 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -1176,7 +1176,7 @@ FMAP_FMAP_SIZE := 0x200 # X86 COREBOOT default cbfs FMAP region # # position and size of CBFS, relative to BIOS_BASE -FMAP_CBFS_BASE := $(call int-add, $(FMAP_FMAP_BASE) $(FMAP_FMAP_SIZE)) +FMAP_CBFS_BASE := $(call int-align, $(call int-add, $(FMAP_FMAP_BASE) $(FMAP_FMAP_SIZE)), 0x1000) FMAP_CBFS_SIZE := $(call int-subtract, $(FMAP_BIOS_SIZE) $(FMAP_CBFS_BASE)) else # ifeq ($(CONFIG_ARCH_X86),y)