Nico Huber has posted comments on this change. ( https://review.coreboot.org/23260 )
Change subject: ENE EDI - add dummy read to ensure proper detection of ENE chips
......................................................................
Patch Set 3: -Code-Review
(2 comments)
https://review.coreboot.org/#/c/23260/3//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23260/3//COMMIT_MSG@7
PS3, Line 7: ENE EDI - add dummy read to ensure proper detection of ENE chips
> Is that the regular way to prefix commits in flashrom? […]
Yep, "edi: " as the file is named and then start in upper-case.
It would also help with the line length (usual limit in git is 50
or 55 chars, iirc).
https://review.coreboot.org/#/c/23260/3/edi.c
File edi.c:
https://review.coreboot.org/#/c/23260/3/edi.c@166
PS3, Line 166: static void edi_wakeup(struct flashctx *flash)
> Nico, I don't really agree here (sorry for the delay in replying): this is really not about waking u […]
No, worries. I also thought about inlining it into edi_probe_kb9012().
That's probably the best. Otherwise, we'd have to keep making names up,
edi_draw_attention()?
--
To view, visit https://review.coreboot.org/23260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Gerrit-Change-Number: 23260
Gerrit-PatchSet: 3
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 20:33:18 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23262 )
Change subject: Add a SPI command class to `struct flashchip`
......................................................................
Patch Set 4:
(1 comment)
Note that naming the field spi_command_set breaks the current tab alignment in the chips declaration, e.g.:
.spi_command_set = EDI,
.probe = edi_probe_kb9012,
I think naming it "command_set" would be enough since SPI25 already has SPI in the name and we could generalize the issue with other protoocls anyway.
Also, I think it would be more convenient to be able to specify the command set to use from the command line instead of specifying the exact chip. One might want to just hook EDI to the keyboard pins for reflashing the EC and let flashrom detect which ENE chip it is.
If you want to pick up that idea, that'd be great, otherwise I'll probably end up writing and submitting something in this direction.
https://review.coreboot.org/#/c/23262/4/flash.h
File flash.h:
https://review.coreboot.org/#/c/23262/4/flash.h@186
PS4, Line 186: /*
By the way, it looks like the dummy structure commented out in the flashchips struct array declaration is out of sync with the structure (missing fields). This adds another field there.
Since it serves as documentation, we might want to keep it in sync with the structure definition, or just get rid of it altogether. Both options are fine with me.
What do you think?
--
To view, visit https://review.coreboot.org/23262
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I89a53ccaef2791a2ac32904d7ab813da7478a6f0
Gerrit-Change-Number: 23262
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Urja Rannikko <urjaman(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 18:27:29 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23261 )
Change subject: ENE EDI - print debug info like others while probing for ENE chips
......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/#/c/23261/5//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23261/5//COMMIT_MSG@12
PS5, Line 12: Probing for ENE KB9012 (EDI), 128 kB: edi_chip_probe: rc1 0, rc2 0; hwversion 0xc3, ediid 0x04
In the end, it should look like:
Probing for ENE KB9012 (EDI), 128 kB: edi_chip_probe: hwversion 0xc3, ediid 0x04
Found ENE flash chip "KB9012 (EDI)" (128 kB, SPI) on ch341a_spi.
So this should be updated accordingly.
https://review.coreboot.org/#/c/23261/5/edi.c
File edi.c:
https://review.coreboot.org/#/c/23261/5/edi.c@164
PS5, Line 164: if (chip->hwversion == hwversion && chip->ediid == ediid) {
After a closer look, it looks like this is not consistent with the way it's done for spi25 chips.
I suggest adding the the following line here (note that it has to be msg_cdbg, not msg_cdbg2):
msg_cdbg("%s: hwversion 0x%02x, ediid 0x%02x\n", __func__, hwversion, ediid);
And dropping the changes below.
More specifically, we don't want to highlight the mismatch, that will necessarily happen when adding more ENE chips.
--
To view, visit https://review.coreboot.org/23261
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4
Gerrit-Change-Number: 23261
Gerrit-PatchSet: 5
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 18:12:12 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23263 )
Change subject: Add support for reading the current flash contents from a file
......................................................................
Patch Set 6:
(4 comments)
Oh well, I did have a few more suggestions in the end.
https://review.coreboot.org/#/c/23263/6/cli_classic.c
File cli_classic.c:
https://review.coreboot.org/#/c/23263/6/cli_classic.c@130
PS6, Line 130: {"ifd", 0, NULL, 0x0100},
wouldn't it make more sense to use the values from the enum here?
https://review.coreboot.org/#/c/23263/6/cli_classic.c@132
PS6, Line 132: {"flash-contents", 1, NULL, 0x0101},
ditto
https://review.coreboot.org/#/c/23263/6/cli_classic.c@253
PS6, Line 253: case 0x0101:
ditto, and there's probably a 0x0100 that's around but not shown in the context that should also be changed.
https://review.coreboot.org/#/c/23263/6/flashrom.c
File flashrom.c:
https://review.coreboot.org/#/c/23263/6/flashrom.c@2395
PS6, Line 2395: if (refcontents && oldcontents) {
Extra padding should be removed.
--
To view, visit https://review.coreboot.org/23263
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf153b6955f37779ae9bfb228a434ed10c304947
Gerrit-Change-Number: 23263
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:16:38 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23263 )
Change subject: Add support for reading the current flash contents from a file
......................................................................
Patch Set 6:
(1 comment)
Thanks for the great work! One small change left as far as I can see.
https://review.coreboot.org/#/c/23263/6//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23263/6//COMMIT_MSG@21
PS6, Line 21: Now it has been ported to the latest source code of flashrom master branch
Just like with other commits, I think we can drop this block now.
--
To view, visit https://review.coreboot.org/23263
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf153b6955f37779ae9bfb228a434ed10c304947
Gerrit-Change-Number: 23263
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:12:16 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23261 )
Change subject: ENE EDI - print debug info like others while probing for ENE chips
......................................................................
Patch Set 5:
(3 comments)
Thanks for the work! We're getting there :)
https://review.coreboot.org/#/c/23261/5//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23261/5//COMMIT_MSG@7
PS5, Line 7: ENE EDI - print debug info like others while probing for ENE chips
Like with the other commit, is that the regular way to prefix commits in flashrom?
I suggest "edi: Print debug info like others while probing for ENE chips" instead.
https://review.coreboot.org/#/c/23261/5/edi.c
File edi.c:
https://review.coreboot.org/#/c/23261/5/edi.c@154
PS5, Line 154: msg_cdbg("%s: reading HWVERSION failed\n", __func__);
Please use lowercase so that it's consistent with the message printed on success.
https://review.coreboot.org/#/c/23261/5/edi.c@160
PS5, Line 160: msg_cdbg("%s: reading EDIID failed\n", __func__);
ditto
--
To view, visit https://review.coreboot.org/23261
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4
Gerrit-Change-Number: 23261
Gerrit-PatchSet: 5
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:09:39 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23260 )
Change subject: ENE EDI - add dummy read to ensure proper detection of ENE chips
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/23260/3//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23260/3//COMMIT_MSG@7
PS3, Line 7: ENE EDI - add dummy read to ensure proper detection of ENE chips
Is that the regular way to prefix commits in flashrom?
I think making the title: "edi: Add dummy read to ensure proper detection of ENE chips" would be more consistent with the rest.
--
To view, visit https://review.coreboot.org/23260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Gerrit-Change-Number: 23260
Gerrit-PatchSet: 3
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:06:50 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23260 )
Change subject: ENE EDI - add dummy read to ensure proper detection of ENE chips
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/23260/3/edi.c
File edi.c:
https://review.coreboot.org/#/c/23260/3/edi.c@166
PS3, Line 166: static void edi_wakeup(struct flashctx *flash)
Nico, I don't really agree here (sorry for the delay in replying): this is really not about waking up the chip but about the chip detecting that there is activity and enabling EDI. This is why "detect" felt like a good fit: the chip detects activity, but I agree that it's not very good since it can also be understood as "flashrom detecting the chip" which is not what's happening.
What about moving this read to edi_probe_kb9012 directly (under the comment block)? I guess it doesn't need its own function anyway.
--
To view, visit https://review.coreboot.org/23260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Gerrit-Change-Number: 23260
Gerrit-PatchSet: 3
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:05:42 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23259 )
Change subject: ENE Embedded Debug Interface EDI and ENE KB9012 EC flashing support
......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/23259/4//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/23259/4//COMMIT_MSG@7
PS4, Line 7: ENE Embedded Debug Interface EDI and ENE KB9012 EC flashing support
Oh by the way, if you like it better, this can be changed to:
"Add support for the ENE Embedded Debug Interface EDI and KB9012 EC"
I stopped using non-verbal phrases for git commits and use imperative forms nowadays.
--
To view, visit https://review.coreboot.org/23259
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854
Gerrit-Change-Number: 23259
Gerrit-PatchSet: 4
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 05 Feb 2018 13:01:27 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Mike Banon has posted comments on this change. ( https://review.coreboot.org/23263 )
Change subject: Add support for reading the current flash contents from a file
......................................................................
Patch Set 6:
> (7 comments)
>
> We are close :) though, flashrom_image_write() seems to be too
> convoluted to be extended easily and needs some more attention.
Sorry for double patch commits (forgot to add enum the first time)
--
To view, visit https://review.coreboot.org/23263
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf153b6955f37779ae9bfb228a434ed10c304947
Gerrit-Change-Number: 23263
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 04 Feb 2018 17:52:04 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No