David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40325 )
Change subject: Add writeprotect support ......................................................................
Patch Set 6:
Patch Set 6:
Did somebody look into Hatim's patches [1]? I didn't but feel like we owe them some attention. They cover more than just write protection. I fear, if we don't look into them now, we never will.
[1] Somewhere amidst https://patchwork.coreboot.org/project/flashrom/list/
I looked into some of them way back when they were first written, but wasn't doing much work with flashrom at the time so I didn't get involved much. IIRC the only issue I had was that some patches were too generalized, i.e. they made assumptions that were true for some chips but not all. Some large Spansion S25FS and FL chips were particularly odd, and there were cases where "don't care" block protect bits could impact generic methods unexpectedly.
Still, he did a lot of good work and it may be useful to revisit those patches to see if we can salvage some of them. And as you mention they cover more than write protection, there might be some OTP-related patches we can use.