Attention is currently required from: Furquan Shaikh, Hung-Te Lin, Julius Werner.
Hello Arthur Heymans, Furquan Shaikh, Julius Werner, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37262?usp=email
to look at the new patch set (#12).
The following approvals got outdated and were removed: Code-Review+2 by Furquan Shaikh, Code-Review+2 by Julius Werner, Code-Review-1 by Hung-Te Lin, Verified+1 by build bot (Jenkins)
Change subject: util: cbfstool: Add '%<alignment>' in flashmap descriptor ......................................................................
util: cbfstool: Add '%<alignment>' in flashmap descriptor
Most FMAP sections that need to be updated independently should be aligned to erase block size (e.g., 4k), otherwise power failure during update may corrupt other sections.
Flashmap descriptor (FMD) today allows implicit offset and size, so sometimes the sections may not be properly aligned, causing failure or unexpected results on updating (e.g., erase and write).
Because most sections (especially in chromeos.fmd) do need alignment, the patch is assuming "aligned" as default. For sections that don't need to be aligned (or aligned to different values), use the '%<num>' after section name (or offset) explicitly to change the alignment. For example '%0' means unaligned and '%512' aligns to 512 bytes. For example:
FMAP@0x1000 %0 0x800
Declared FMAP section to be in offset 0x1000, size 0x800, and no need to be aligned.
COREBOOT(CBFS)%0
Declared the CBFS section to be not aligned, using auto offset/size.
Most boards already have CBFS and FMAP being unaligned, so the patch only warns when seeing unaligned sections. Follow up patches will fix FMD files, and eventually change warnings to errors.
TEST=make -j # pass
Change-Id: I26b394590c28667a4afcd521c7caa2009b5b98a9 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M Documentation/lib/flashmap.md M util/cbfstool/default-x86.fmd M util/cbfstool/default.fmd M util/cbfstool/fmap_from_fmd.c M util/cbfstool/fmd.h M util/cbfstool/fmd_parser.c_shipped M util/cbfstool/fmd_parser.h_shipped M util/cbfstool/fmd_parser.y M util/cbfstool/fmd_scanner.c_shipped M util/cbfstool/fmd_scanner.h_shipped M util/cbfstool/fmd_scanner.l 11 files changed, 616 insertions(+), 407 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/37262/12