Attention is currently required from: Aaron Durbin, Furquan Shaikh, Julius Werner.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37262?usp=email )
Change subject: util: cbfstool: Add '%<alignment>' in flashmap descriptor ......................................................................
Patch Set 13:
(1 comment)
File util/cbfstool/default.fmd:
https://review.coreboot.org/c/coreboot/+/37262/comment/3cbc7b74_c4696d80 : PS13, Line 18: %0
Do we really want to not enforce alignment for CBFS? After all we do have the -a flag for cbfstool w […]
When I try to build a image (Minimal x86 fake board): ```` # name start end size FMAP 00000000 00000200 00000200 COREBOOT 00000200 00800000 007ffe00 BIOS 00000000 00800000 00800000 ````
And emulation image for QEMU AArch64 (virt): ```` # name start end size -entire flash- 00000000 00800000 00800000 COREBOOT 00020200 00800000 007dfe00 FMAP 00020000 00020200 00000200 00800000 00020000 ff820000 // gap in -entire flash- BIOS 00000000 00800000 00800000 00020000 00000000 fffe0000 // gap in -entire flash- BOOTBLOCK 00000000 00020000 00020000 ````
So COREBOOT is usually not aligned, due to FMAP is not aligned.
To fix that, we have to change the FMAP_SIZE calculation to be aligned, that also takes more space (from 512 bytes to 4K).