Nico Huber has posted comments on this change. ( https://review.coreboot.org/20505 )
Change subject: 4BA: Flashrom integration for the 4-bytes addressing extensions
......................................................................
Patch Set 3:
> Will write a follow-up, not sure if any line will stay.
Nope, I won't. After reading through all the patches I'm failing to
see the light at the end of the tunnel. IMO, this adds 4BA as an alien
instead of integrating it where plausible.
Doing the whole thing with proper abstractions from the beginning (the
function pointer issue + the 10 times copied implementations with
felt only single bytes changing) seems to be less work for me now than
bringing these patches to a state I could imagine they would have after
a decent reviewing process.
Any thoughts where to go from here? I can start over reviewing the
whole set if somebody wants to adapt these commits.
Alternatively we can submit this to staging (I don't see anything
broken, it's just leaving flashrom in a less maintainable state*).
And I can write my own implementation for stable...
* We already have way too much redundant code and layering violations,
IMHO. If we increase that maintenance burden we'll have to pay
double later during development and reviewing.
--
To view, visit https://review.coreboot.org/20505
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib051cfc93bd4aa7580519e0e6206d025f3ca8049
Gerrit-Change-Number: 20505
Gerrit-PatchSet: 3
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 11 Oct 2017 15:23:38 +0000
Gerrit-HasComments: No
Nico Huber has posted comments on this change. ( https://review.coreboot.org/20505 )
Change subject: 4BA: Flashrom integration for the 4-bytes addressing extensions
......................................................................
Patch Set 2:
The major issue that I see is that the added function pointers are all
for naught. They are redundant information that can already be sta-
tically decided by the feature bits (if we keep the _DIRECT features
in the end).
--
To view, visit https://review.coreboot.org/20505
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib051cfc93bd4aa7580519e0e6206d025f3ca8049
Gerrit-Change-Number: 20505
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 11 Oct 2017 14:25:49 +0000
Gerrit-HasComments: No
Nico Huber has posted comments on this change. ( https://review.coreboot.org/20505 )
Change subject: 4BA: Flashrom integration for the 4-bytes addressing extensions
......................................................................
Patch Set 3:
(6 comments)
Rather clumsy. I don't like to do invasive edits on other people's
commits. Will write a follow-up, not sure if any line will stay.
https://review.coreboot.org/#/c/20505/3/flash.h
File flash.h:
https://review.coreboot.org/#/c/20505/3/flash.h@176
PS3, Line 176: } four_bytes_addr_funcs;
This makes 4BA look like an alien...
https://review.coreboot.org/#/c/20505/3/flashrom.c
File flashrom.c:
https://review.coreboot.org/#/c/20505/3/flashrom.c@2227
PS3, Line 2227: if(flash->chip->feature_bits & FEATURE_4BA_SUPPORT) {
missing space after `if`
https://review.coreboot.org/#/c/20505/3/flashrom.c@2240
PS3, Line 2240: if(flash->chip->four_bytes_addr_funcs.enter_4ba(flash)) {
missing space
https://review.coreboot.org/#/c/20505/3/flashrom.c@2253
PS3, Line 2253: {
Hmmm, what if another master expects the chip to be in 3BA mode?
https://review.coreboot.org/#/c/20505/3/spi.c
File spi.c:
https://review.coreboot.org/#/c/20505/3/spi.c@115
PS3, Line 115: if (!(flash->chip->feature_bits & FEATURE_4BA_SUPPORT) &&
What if 4BA is supported? Shouldn't we do the same check with `1 << 32`?
(I can't tell. The whole `addrbase` thing looks like a layering
violation to me that should be handled by programmers that actually
do map the chip.)
https://review.coreboot.org/#/c/20505/3/spi25.c
File spi25.c:
https://review.coreboot.org/#/c/20505/3/spi25.c@1019
PS3, Line 1019: rc = (flash->chip->feature_bits & FEATURE_4BA_SUPPORT) == 0
The condition should be checked in the called function, IMHO. This
is too ugly...
--
To view, visit https://review.coreboot.org/20505
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib051cfc93bd4aa7580519e0e6206d025f3ca8049
Gerrit-Change-Number: 20505
Gerrit-PatchSet: 3
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 11 Oct 2017 14:01:04 +0000
Gerrit-HasComments: Yes