Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55452 )
Change subject: arch/x86/walkcbfs.S: Fix the cbfs base addr for some fmap ......................................................................
arch/x86/walkcbfs.S: Fix the cbfs base addr for some fmap
Defining the memory mapped base in fmap for example "FLASH@0xff800000 0x80000" for a 8M flash is optional in fmap files. This will also reflect in the generated fmap_config.h. Fix the assembly cbfs walker walkcbfs.S for fmap lacking a definition of the flash base.
Change-Id: I96b18f675e625abee503648ffdc6031978a4269a Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/55452 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Michał Żygowski michal.zygowski@3mdeb.com --- M src/arch/x86/walkcbfs.S 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Michał Żygowski: Looks good to me, approved
diff --git a/src/arch/x86/walkcbfs.S b/src/arch/x86/walkcbfs.S index 4608e2c..208a128 100644 --- a/src/arch/x86/walkcbfs.S +++ b/src/arch/x86/walkcbfs.S @@ -13,6 +13,12 @@
#define CBFS_FILE_STRUCTSIZE (CBFS_FILE_OFFSET + 4)
+#if FMAP_SECTION_COREBOOT_START < (0xffffffff - CONFIG_ROM_SIZE + 1) +#define COREBOOT_CBFS_START (0xffffffff - CONFIG_ROM_SIZE + 1 + FMAP_SECTION_COREBOOT_START) +#else +#define COREBOOT_CBFS_START FMAP_SECTION_COREBOOT_START +#endif + .code32 .section .init .global walkcbfs_asm @@ -26,7 +32,7 @@ walkcbfs_asm: cld
- movl $FMAP_SECTION_COREBOOT_START, %ebx + movl $COREBOOT_CBFS_START, %ebx
/* determine filename length */ mov $0, %eax