Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37263 )
Change subject: mb/google: Add ALIGNED flag to known sections that need alignment ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37263/5/src/mainboard/google/auron/... File src/mainboard/google/auron/chromeos.fmd:
https://review.coreboot.org/c/coreboot/+/37263/5/src/mainboard/google/auron/... PS5, Line 7: RW_SECTION_A@0x0 0xf0000 {
RW_SECTION_A/B are updated by flashrom, so actually it does not need alignment.
Sorry, I don't understand. The point of this flag (as I understand it) is not just because coreboot cannot read-modify-write blocks to write unaligned sections. If we wanted that support, it would be easy to add. The point is that it is never safe to have a section unaligned when it needs to be updated independently, because a sudden power failure at the wrong moment could always leave the flash in a state where the sections that were supposed to stay unmodified are erased. The RW sections are actually the most important ones that need to be aligned. The whole point of A/B updates is that you will always have a pristine copy of firmware to fall back on while the other is being updated. If erase blocks between the two sections were shared such that erasing RW_SECTION_B and having a power failure immediately afterwards would leave a piece of RW_SECTION_A erased (and thus fail verification), then the device would be forced into recovery mode.
Same justification applies to everything else mentioned below (although some of it is less critical than others).