Attention is currently required from: Alexander Goncharov.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66690 )
Change subject: nicintel_eeprom: refactor i210 variable into reentrant pattern
......................................................................
Patch Set 5:
(1 comment)
File nicintel_eeprom.c:
https://review.coreboot.org/c/flashrom/+/66690/comment/0d83e76a_929e4dea
PS5, Line 84: done_i20_write
> Hmmm, this was probably meant to be `done_i210_write` ever since it was introduced. […]
Fixed in CB:68582.
--
To view, visit https://review.coreboot.org/c/flashrom/+/66690
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ifda0d8666399ea165bac6378c57720b5560806f1
Gerrit-Change-Number: 66690
Gerrit-PatchSet: 5
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Wed, 19 Oct 2022 18:27:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68479 )
Change subject: cli_classic.c: Make count_max_decode_exceedings() pure
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/68479/comment/e38f2fa8_77806da7
PS1, Line 10: it's
Possessive pronoun `its` doesn't have an apostrophe 😊
--
To view, visit https://review.coreboot.org/c/flashrom/+/68479
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia01f77993deab68e251850008e885828e55b9462
Gerrit-Change-Number: 68479
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 19 Oct 2022 16:56:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68438 )
Change subject: flashrom.c: Move count_max_decode_exceeding() to cli
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
Not sure if moving this to the libflashrom API makes sense. Probably not?
--
To view, visit https://review.coreboot.org/c/flashrom/+/68438
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If050eab7db8560676c03d5005a2b391313a0d642
Gerrit-Change-Number: 68438
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 19 Oct 2022 16:55:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Alexander Goncharov.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66690 )
Change subject: nicintel_eeprom: refactor i210 variable into reentrant pattern
......................................................................
Patch Set 5:
(1 comment)
File nicintel_eeprom.c:
https://review.coreboot.org/c/flashrom/+/66690/comment/f000e458_00daed52
PS5, Line 84: done_i20_write
Hmmm, this was probably meant to be `done_i210_write` ever since it was introduced. Good old typos 😄
--
To view, visit https://review.coreboot.org/c/flashrom/+/66690
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ifda0d8666399ea165bac6378c57720b5560806f1
Gerrit-Change-Number: 66690
Gerrit-PatchSet: 5
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Wed, 19 Oct 2022 16:37:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Artur Kowalski.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68557 )
Change subject: flashrom: add support for MX77L25650F chip
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/68557
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iaea5485f8b59b8538dc47beada2c308376ea027c
Gerrit-Change-Number: 68557
Gerrit-PatchSet: 1
Gerrit-Owner: Artur Kowalski <artur.kowalski(a)3mdeb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Artur Kowalski <artur.kowalski(a)3mdeb.com>
Gerrit-Comment-Date: Wed, 19 Oct 2022 14:53:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Artur Kowalski has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/68557 )
Change subject: flashrom: add support for MX77L25650F chip
......................................................................
flashrom: add support for MX77L25650F chip
Add basic support Macronix MX77L25650F. Can both read and write the chip
as long as write protection is not enabled (WP is not supported at the
moment so can't disable it).
Change-Id: Iaea5485f8b59b8538dc47beada2c308376ea027c
Signed-off-by: Artur Kowalski <artur.kowalski(a)3mdeb.com>
---
M flashchips.c
M include/flashchips.h
2 files changed, 39 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/68557/1
diff --git a/flashchips.c b/flashchips.c
index 47a37ee..874cf19 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -10199,6 +10199,30 @@
.voltage = {2700, 3600},
},
+ {
+ .vendor = "Macronix",
+ .name = "MX77L25650F",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX77L25650F,
+ .total_size = 32768,
+ .page_size = 256,
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
+ .tested = TEST_OK_PR,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers = {
+ // TODO: add 64K block erase
+ {
+ .eraseblocks = { {32 * 1024, 1024} },
+ .block_erase = spi_block_erase_52,
+ },
+ },
+ // TODO: add support for flash protection
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ },
+
/* The ST M25P05 is a bit of a problem. It has the same ID as the
* ST M25P05-A in RES mode, but supports only 128 byte writes instead
* of 256 byte writes. We rely heavily on the fact that probe_spi_res1
diff --git a/include/flashchips.h b/include/flashchips.h
index 5df42dc..c5a9f23 100644
--- a/include/flashchips.h
+++ b/include/flashchips.h
@@ -521,6 +521,7 @@
#define MACRONIX_MX25U51245G 0x253a
#define MACRONIX_MX25L3235D 0x5E16 /* MX25L3225D/MX25L3235D/MX25L3237D */
#define MACRONIX_MX25L6495F 0x9517
+#define MACRONIX_MX77L25650F 0x7519
#define MACRONIX_MX25R3235F 0x2816
#define MACRONIX_MX25R6435F 0x2817
--
To view, visit https://review.coreboot.org/c/flashrom/+/68557
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iaea5485f8b59b8538dc47beada2c308376ea027c
Gerrit-Change-Number: 68557
Gerrit-PatchSet: 1
Gerrit-Owner: Artur Kowalski <artur.kowalski(a)3mdeb.com>
Gerrit-MessageType: newchange
Attention is currently required from: Felix Singer, Nico Huber, Angel Pons, Anastasia Klimchuk, Alexander Goncharov.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67393/comment/686087c0_4eeccae5
PS4, Line 13:
> Folks, can we please retry this review? We (Angel) agree with Nico's concerns regarding technical as […]
These are great questions Angel. I also got told by aklm you would be keen to catch up over chat (this is a great idea) and I would be extremely excited to do that to help clear up understanding! We could summarise after and post here and/or list too so there is visibility for everyone for any conclusions. I'll jump into IRC today and we can perhaps organise some time that is most suitable for you, please no stress whatever suits you.
Let me try to answer the above questions best I can here and if there is more ambiguity left we can further deep dive over chat.
The life-time of a flash ctx is actually between the entry-point of a programmer init function and it's correspond shutdown function as a more precise definition than that of a successful probe of a flash chip. Actually the probing of a flash chip life-time is within the life-time of a programmers duties and that is post init and before shutdown, thus within the life-time of a flash ctx. While it may sound like a programmer_delay is coupled to the life-time of a programmer on the surface, this is actually misdirection because of how the identifiers happen to be named however a deeper inspection of the control flow graph reveals this is not the true case of how things actually work in terms of how the computer is doing its thing.
I will try with a diagram and I hope it renders:
```
+=[=========]=[=======]=+ {programmer life-times}
|---+111111+---+22222+--+ {flash ctx 1 & 2 life-times}
|-----**---------**-----+ {two probe cycles for-each flash ctx master 1 & 2}.
```
The `probe_flash()` function is revealing https://github.com/flashrom/flashrom/blob/master/flashrom.c#L775
where in this function we take a register_master entry {a collection of each different master type which can be thought of a given master at a time for a given dispatch} that takes this master, couples it to the flash ctx and dispatches the chip probe function for-each chip in the database. The probe function you will notice consumes a flash context and this is the same flash context that is coupled to the register master `flash->mst = mst;` within the context. The oddity here is the lack of coupling between `probe_flash()` and `programmer_init()` however that actually slightly an orthogonal issue to the problem of delay and is more a issue of a incomplete realisation of `const struct flashrom_programmer *flashprog` in the libflashrom problem space.
Zooming in this is a lot to take in but zooming out helps further to reveal the simpler structure at play here. The quintessential issue is that `programmer_delay()` is actually in truth `flashctx_delay()` and actually the indirection isn't even needed in the leaf drivers themselves - drivers have two cases, either the default `internal_delay()` or a custom version in the case of `ch341a && serprog`. Each driver can just directly call its own custom delay if it so needs to or in almost every case (modulo those two) just call the sensible default of `internal_delay()`. The core flashrom logic (say, spi25 helpers and so on where `programmer_delay()` is called) does indeed require some indirection to either dispatch a custom driver dependent delay or fall back to the default of `internal_delay()`. However, you will notice all these functions work with the `flash ctx` state machine and that it contains all required state for them to operate correctly due to the above life-time's I outlined above.
This is all perhaps quite a bit to digest in one go however I am more than happy to help explain or go over anything here. Hopefully the above helps answer some of the questions, keen to hear what you think and sorry for all my typos and bad ascii art :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/67393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id059abb58b31a066a408009073912da2b224d40c
Gerrit-Change-Number: 67393
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Wed, 19 Oct 2022 01:02:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Anastasia Klimchuk.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68432 )
Change subject: tests: Add wrap for __fprintf_chk
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
This doesn't seem clang-specific; it looks like glibc does this if `_FORTIFY_SOURCE` is enabled (something around `libio/bits/stdio2.h` in glibc). There are many other similar functions which we would also conceivably need to be wrapped, so I think the alternate option of setting `_FORTIFY_SOURCE` to 0 when building tests is better.
--
To view, visit https://review.coreboot.org/c/flashrom/+/68432
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I70cb1cd90d1f377ff4606acad3c1b514120ae4f7
Gerrit-Change-Number: 68432
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 18 Oct 2022 22:45:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Nico Huber, Edward O'Callaghan, Anastasia Klimchuk, Alexander Goncharov.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine
......................................................................
Patch Set 5:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67393/comment/e669a42a_2b57962c
PS4, Line 13:
> Nico, Can I invite you to attempt to rewrite your wall of text without the condescending^[0] politic […]
Folks, can we please retry this review? We (Angel) agree with Nico's concerns regarding technical aspects of these patches, but we also agree with Edward's view that Nico's "communication style" (for lack of better words) is very unpleasant to work with.
The main problem here seems to be that `flashrom_flashctx` isn't the right structure to handle the state for `programmer_delay`: `flashrom_flashctx` only exists [?] once a chip was successfully probed, and the delay functions are used to probe the chip. From a quick glance, looks like `flashrom_flashctx` contains information regarding the flash chip that was probed: this "chip state" is, in a way, different from the "programmer state" which contains the `programmer_delay` state. This gets even messier when considering that "programmers" and "masters" are different things in flashrom: the former can encompass multiple of the latter.
Hmmm, feral thought: if `flashrom_flashctx` only exists [?] after a flash chip has been successfully probed, why does it contain a pointer to the "master" struct for the programmer? Wouldn't it make more sense to do it the other way around, i.e. have the "master" struct point to the `flashrom_flashctx`?
[?]: `flashrom_flashctx` exists during probing, but the CLI will use a "fresh" structure for subsequent probing after a chip has been successfully probed.
--
To view, visit https://review.coreboot.org/c/flashrom/+/67393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id059abb58b31a066a408009073912da2b224d40c
Gerrit-Change-Number: 67393
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Tue, 18 Oct 2022 20:04:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment