Attention is currently required from: Simon Buhrow, Nico Huber, Edward O'Callaghan, Anastasia Klimchuk.
Aarya has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66104 )
Change subject: flashrom.c: Add wrapper function to use the erase algorithm ......................................................................
Patch Set 92:
(9 comments)
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/66104/comment/5d1239da_3226feb6 PS91, Line 165: s
`const s`
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/69d274b5_cd3f5364 PS91, Line 170: old_start_buf
allocation never checked.
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/0c6b856a_48af033c PS91, Line 182: //
add some `\n` to help readability of the function.
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/4356146b_96083abd PS91, Line 188: (
trivial: ` (`
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/99016884_ade85873 PS91, Line 189: (
trivial: ` (`
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/392bd159_c6341e53 PS91, Line 194: if(erase_layout[i].layout_list[j].selected) {
consider identifying more base-cases to early return/continue/break to avoid deep loops and branches […]
Done
https://review.coreboot.org/c/flashrom/+/66104/comment/50998fbf_0c5cfff2 PS91, Line 195: //execute erase : erasefunc_t *erasefn = lookup_erase_func_ptr(erase_layout[i].eraser); : ret = erasefn(flashctx, start_addr, block_len); : if (ret) { : msg_cerr("Failed to execute erase command for offset %#x to %#x.\n", start_addr, start_addr + block_len); : ret = -1; : goto _end; : } : //adjust curcontents : memset(curcontents+start_addr, erased_value, block_len); : //after erase make it unselected again : erase_layout[i].layout_list[j].selected = false; : msg_cdbg("E(%x:%x)", start_addr, start_addr + block_len - 1); : //verify erase : ret = check_erased_range(flashctx, start_addr, block_len); : if (ret) { : msg_cerr("Verifying flash. Erase failed for range %#x : %#x, Abort.\n", start_addr, start_addr + block_len - 1); : goto _end; : }
integrate CB:70517
??
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/66104/comment/e8e49652_4f8388c6 PS72, Line 1349: static int erase_by_layout
Yeah sorry for the delay. I'm starting to move the implementation to a separate file now.
Done
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/66104/comment/1cf011ca_364dd6ae PS78, Line 1422: write_by_layout
in a separate commit before this one, rename as `write_by_layout_legacy()` and, […]
Done