Hi Aarya,

On 10.06.22 15:59, Aarya Chaumal wrote:
> Over the last few weeks, my mentors and I worked on the algorithm to be
> implemented for erase function selection, and it's finally complete. Please
> look at this

the depicted strategy looks quite good, IMO :) I originally thought we
could solve the problem without a global view (building the list of
everything that needs to be erased). But having read your flow chart,
I believe it's a very good solution.

I have two remarks on the selection of later erase functions, i.e. the
step

  Are more than half the subsectors within
  the current sector also marked

You already mentioned at the beginning that we might have a problem if
the region is not erase-block aligned. If this is the case, we should
choose the smallest erase block to minimize the risk to hit any read/
write protection, e.g. check

  region start <= current sector start &&
  current sector end <= region end

If not, skip the sector for the current erase function.

And because we have to deal with a non-homogeneous sector selection
(marked subsectors of different sizes) eventually, we shouldn't count
"subsectors" but bytes, I guess.

And many thanks for drawing the picture! its quite helpful. We should
definitely keep a final version in the documentation.

Nico
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org

Reply via email to