Bug #365
closed
Added by Anastasia Klimchuk over 2 years ago.
Updated about 2 years ago.
Description
Feature initially introduced in the patch 44879 (see links). Some issues were found after that, see last comment on the patch. As a follow up 46536 was done. However some issues seem to still be present, specifically
1) Broke building with CONFIG_DUMMY=no
2) probe_variable_size() would have to move to a chip driver. It needs access to programmer internals, though. Maybe it should be an opaque master?
3) Casts objects of all programmers to the dummy one. Only bails out by chance.
- Assignee set to Anastasia Klimchuk
Adding some more info here.
"Variable size" means that dummy needs to emulates some chip (exact properties don't matter), the only thing that matter is size. So it like "emulate just some generic chip with size S".
Also for testing, commands to run for testing are:
$ flashrom -p dummy:image=${TMP_FILE},size=, \
emulate=VARIABLE_SIZE -w ${IMG_32MB} -V -f
where size can be 8388608, 16777216, 33554432 (that's 3 different test cases)
After running command line, we need to compare files are the same
diff ${TMP_FILE} ${IMG_32MB}
One more thing I just realised, probe_variable_size
is modifying flashctx.
However, spi infrastructure, specifically spi_send_command
is taking const flashctx.
In general , the "variable size" feature is only used via dummmy programmer and only for emulating. So IMO it should live in dummyflasher.c
However it seems to be wired into spi infra in a wrong way.
I am trying some ideas on how to wire it differently.
I tried several hacks to wire probe_variable_size
via spi infra and couldn't make it work.
So I am gradually coming to a conclusion this needs to be wired via opaque infra (that was a good idea mentioned in bug description!)
Cleanup or bug tracker fit better, I think.
- Tracker changed from Feature to Bug
- Status changed from New to Closed
- Status changed from Closed to Resolved
Closed was a wrong status, actually I should say Resolved. Corrected status to Resolved.
- Status changed from Resolved to Closed
Confirmed building with CONFIG_DUMMY=no
works again, testet write and verify for VARIABLE_SIZE
chip, code in probe_variable_size() looks quite good now.
- Status changed from Closed to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF