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>
This commit is contained in:
parent
30701763e3
commit
ddbc771524
|
@ -13,6 +13,12 @@
|
||||||
|
|
||||||
#define CBFS_FILE_STRUCTSIZE (CBFS_FILE_OFFSET + 4)
|
#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
|
.code32
|
||||||
.section .init
|
.section .init
|
||||||
.global walkcbfs_asm
|
.global walkcbfs_asm
|
||||||
|
@ -26,7 +32,7 @@
|
||||||
walkcbfs_asm:
|
walkcbfs_asm:
|
||||||
cld
|
cld
|
||||||
|
|
||||||
movl $FMAP_SECTION_COREBOOT_START, %ebx
|
movl $COREBOOT_CBFS_START, %ebx
|
||||||
|
|
||||||
/* determine filename length */
|
/* determine filename length */
|
||||||
mov $0, %eax
|
mov $0, %eax
|
||||||
|
|
Loading…
Reference in New Issue