Attention is currently required from: Patrick Georgi, Rizwan Qureshi, Stefan Reinauer, Sridhar Siricilla, Angel Pons, Alex Levin, YH Lin, Martin Roth, Subrata Banik, Caveh Jalali, Tim Wawrzynczak, Nick Vaccaro, Boris Mittelberg.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/61854 )
Change subject: ichspi.c: Check SPI Cycle In-Progress prior start HW Seq
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS6:
A version of this change that takes the applicable context into account
(e.g. other waiting loops in this driver, implications when multiple
instances would reach this point in the code simultaneously) would be
accepted immediately.
I understand that would be a comprehensive fix across flashrom.
Doesn't need to be. All I'm asking for is to keep the whole code sound
and not just the single spot where a check would be added. This could
for instance be a simple
if (REGREAD8(ICH9_REG_HSFS) & HSFS_SCIP)
return -1;
That would adhere to the datasheet, AFAICT and wouldn't make it look
like we don't know what we are doing (not knowing what we are doing,
for instance, would be writing a program that tries to synchronize
multiple processes but fails to do so properly).
Another solution would be to check the bit once on programmer initiali-
zation and after each transaction.
However that will still not guarantee that another flashrom like program will wait on the same file/mutex to synchronize the access.
This check on H_SCIP OTOH, which should be adhered by all the programs at the least prevents the program from cancelling out another's transaction. So let us make flashrom compliant with the recommendation.
Then check the bit once in programmer init. That should cover another
previously running program. Multiple, concurrently running programs
are out of the scope of SCIP.
--
To view, visit
https://review.coreboot.org/c/flashrom/+/61854
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib9265cc20513fd00f32f8fa22e28c312903ca484
Gerrit-Change-Number: 61854
Gerrit-PatchSet: 6
Gerrit-Owner: Subrata Banik
subratabanik@google.com
Gerrit-Reviewer: Alex Levin
levinale@chromium.org
Gerrit-Reviewer: Boris Mittelberg
bmbm@google.com
Gerrit-Reviewer: Caveh Jalali
caveh@chromium.org
Gerrit-Reviewer: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Nick Vaccaro
nvaccaro@google.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
patrick@coreboot.org
Gerrit-Reviewer: Rizwan Qureshi
rizwan.qureshi@intel.com
Gerrit-Reviewer: Sridhar Siricilla
sridhar.siricilla@intel.com
Gerrit-Reviewer: Stefan Reinauer
stefan.reinauer@coreboot.org
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: YH Lin
yueherngl@chromium.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Angel Pons
th3fanbus@gmail.com
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Patrick Georgi
patrick@coreboot.org
Gerrit-Attention: Rizwan Qureshi
rizwan.qureshi@intel.com
Gerrit-Attention: Stefan Reinauer
stefan.reinauer@coreboot.org
Gerrit-Attention: Sridhar Siricilla
sridhar.siricilla@intel.com
Gerrit-Attention: Angel Pons
th3fanbus@gmail.com
Gerrit-Attention: Alex Levin
levinale@chromium.org
Gerrit-Attention: YH Lin
yueherngl@chromium.org
Gerrit-Attention: Martin Roth
martinroth@google.com
Gerrit-Attention: Subrata Banik
subratabanik@google.com
Gerrit-Attention: Caveh Jalali
caveh@chromium.org
Gerrit-Attention: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Attention: Nick Vaccaro
nvaccaro@google.com
Gerrit-Attention: Boris Mittelberg
bmbm@google.com
Gerrit-Comment-Date: Fri, 25 Feb 2022 15:42:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Subrata Banik
subratabanik@google.com
Comment-In-Reply-To: Rizwan Qureshi
rizwan.qureshi@intel.com
Gerrit-MessageType: comment