Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37262 )
Change subject: util: cbfstool: Check alignment at build time ......................................................................
Patch Set 11:
(1 comment)
Reading all the comments my proposal is:
1. Top level FLASH supports specifying alignment by '%alignment'. If not specified default to 4k. 2. All FMAP sections are default aligned to the FLASH alignment. 3. Sections may override alignment by '%alignment', where '%0' implies unaligned. 4. The section flags also support 'UNALIGNED' that implies '%0'.
Does that make sense?
https://review.coreboot.org/c/coreboot/+/37262/11/Documentation/lib/flashmap... File Documentation/lib/flashmap.md:
https://review.coreboot.org/c/coreboot/+/37262/11/Documentation/lib/flashmap... PS11, Line 114: must be aligned to erase block (e.g., 4k).
we could factor out the erase size definitions from src/drivers/spi/$vendor.c
I like the idea but it's not easy because 1. one driver may support multiple flash chipsets with different block size, 2. boards may want to have multiple SPI drivers
Instead I think we may add an "alignment" property to FMAP to override default alignment (4k).