Chromium Code Reviews
DescriptionAdd flashmap (fmap) support to Flashrom
This adds flashmap parsing to Flashrom. If an fmap data structure is found, entries will be added to flashrom's internal rom layout.
BUG=chromium-os:115
TEST=Tested on Alex
Testing methodology is similar to what was used in the -i argument patch (git hash d0ea9e), except now fmap data was present in the original bios image:
- Partial write test (automated script)
- Manual partial reads test by reading 4K chunks from ROM and comparing against original BIOS image file and also inspecting the chip-sized file.
- Ensure final chip-size image is generated properly by omitting :file from one of the -i arguments.
- Full read if no -i options are used when fmap is present
- Entire chip written if no -i option is specified and fmap is present. Same holds true if a layout file is specified by no regions are included. A command like "flashrom -w bios.bin" or "flashrom -l layout.txt -w bios.bin" will consistently write the full image to ROM.
- Specifying a non-existent region caused flashrom to fail (expected result).
TODO: Automate all of the above.
Patch Set 1 #
Total comments: 16
Patch Set 2 : Fixes as per Louis' comments #Patch Set 3 : add debug statements #
Total comments: 2
Patch Set 4 : added a missing memset() #Patch Set 5 : do not include fmap-specified regions by default #Patch Set 6 : %lx -> 0x%lx #
Total comments: 10
Patch Set 7 : optimize fmap_find #Patch Set 8 : clarify a comment #Patch Set 9 : minor fix for >80 cols #Patch Set 10 : fix a >80col issue #Patch Set 11 : fix a corner case when the area length is zero #Patch Set 12 : fix a stupid typo #
Total comments: 11
Patch Set 13 : respond to comments #
Total comments: 4
Patch Set 14 : move add_fmap_entries() call to doit() and make fmap_find() work without oldcontents #Patch Set 15 : fix a comment #
Total comments: 6
Patch Set 16 : further optimizations to fmap_find #Patch Set 17 : tweak fmap_find() further #Patch Set 18 : inspect include_args[0] instead of romimages counter to check if user wants to read/write full image #Patch Set 19 : remove a superfluous debug message #
Messages
Total messages: 22 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||