Attention is currently required from: Thomas Heijligen, Angel Pons, Steve Markgraf.
Hello build bot (Jenkins), Thomas Heijligen, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/71801
to look at the new patch set (#2).
Change subject: programmer: Add bitbanging programmer driver for Linux libgpiod
......................................................................
programmer: Add bitbanging programmer driver for Linux libgpiod
With this driver, any single board computer, old smartphone, etc. with
a few spare GPIOs can be used for flashrom.
An example invocation looks like this:
flashrom -p linux_gpiod:gpiochip=0,cs=18,sck=19,mosi=13,miso=56
This uses /dev/gpiochip0 with the specified GPIO numbers for the SPI
lines. All arguments are required.
Reading of a 2048 kB flash chip on a Qualcomm MSM8916 SoC @800 MHz:
Found GigaDevice flash chip "GD25LQ16" (2048 kB, SPI) on linux_gpiod.
real 1m 33.96s
Change-Id: Icad3eb7764f28feaea51bda3a7893da724c86d06
Signed-off-by: Steve Markgraf <steve(a)steve-m.de>
---
M MAINTAINERS
M Makefile
M flashrom.8.tmpl
M include/programmer.h
A linux_gpiod.c
M programmer_table.c
6 files changed, 254 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/01/71801/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/71801
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Icad3eb7764f28feaea51bda3a7893da724c86d06
Gerrit-Change-Number: 71801
Gerrit-PatchSet: 2
Gerrit-Owner: Steve Markgraf <steve(a)steve-m.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Steve Markgraf <steve(a)steve-m.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Thomas Heijligen, Angel Pons, Steve Markgraf.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71801 )
Change subject: programmer: Add bitbanging programmer driver for Linux libgpiod
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Sorry I missed in the first go: I think this new programmer needs to be mentioned in the man page.
forgot to mark unresolved :\
--
To view, visit https://review.coreboot.org/c/flashrom/+/71801
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Icad3eb7764f28feaea51bda3a7893da724c86d06
Gerrit-Change-Number: 71801
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Markgraf <steve(a)steve-m.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Steve Markgraf <steve(a)steve-m.de>
Gerrit-Comment-Date: Thu, 12 Jan 2023 21:04:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Angel Pons, Steve Markgraf.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71801 )
Change subject: programmer: Add bitbanging programmer driver for Linux libgpiod
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
Sorry I missed in the first go: I think this new programmer needs to be mentioned in the man page.
File linux_gpiod.c:
https://review.coreboot.org/c/flashrom/+/71801/comment/e2e51c67_e3a73c5e
PS1, Line 148: if (data) {
: if (gpiod_line_bulk_num_lines(&data->bulk) > 0)
: gpiod_line_release_bulk(&data->bulk);
:
: free(data);
: }
:
: if (chip)
: gpiod_chip_close(chip);
> At some point we decided to register the shutdown function early so that it does the cleanup in case […]
Registering shutdown function early was in the old times :) During 2020, shutdown functions were moved as late as possible, and then eventually hidden under register master API. Almost all of the programmers now are migrated to the new API. If you look at linux_spi for example, it does not do register shutdown anymore. Now programmers only need to add `.shutdown = linux_spi_shutdown,` into spi_master struct and that's it.
However, bitbang family of programmers (which this new one belongs to) has one more layer of abstraction, so it needs to be migrated separately. Which hopefully will happen sooner or later!
TLDR: register shutdown as late as possible, just before registering master. This part is correct in this patch.
My initial 2 questions are still valid.
--
To view, visit https://review.coreboot.org/c/flashrom/+/71801
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Icad3eb7764f28feaea51bda3a7893da724c86d06
Gerrit-Change-Number: 71801
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Markgraf <steve(a)steve-m.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Steve Markgraf <steve(a)steve-m.de>
Gerrit-Comment-Date: Thu, 12 Jan 2023 21:03:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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: Edward O'Callaghan, Nikolai Artemiev.
Sergii Dmytruk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69517 )
Change subject: flashrom.c: Supplement `chip->unlock()` calls with wp unlocking
......................................................................
Patch Set 9: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/69517
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I74b3f5d3a17749ea60485b916b2d87467a5d8b2f
Gerrit-Change-Number: 69517
Gerrit-PatchSet: 9
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Thu, 12 Jan 2023 17:03:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nikolai Artemiev.
Sergii Dmytruk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/70349 )
Change subject: tree/: Change chip restore data type from uint8_t to void ptr
......................................................................
Patch Set 7: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/70349
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I311b468a4b0349f4da9584c12b36af6ec2394527
Gerrit-Change-Number: 70349
Gerrit-PatchSet: 7
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Thu, 12 Jan 2023 17:03:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
eshankelkar(a)galorithm.com has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/71872 )
Change subject: ichspi.c: Bug fix for ich_hwseq_get_flash_id
......................................................................
ichspi.c: Bug fix for ich_hwseq_get_flash_id
In ich_hwseq_get_flash_id, flash_id_to_entry would return
address of a structure present in flashchips array
corresponding to provided manufacture_id and model_id.
If this function returns NULL and if we don't return
after printing the warning using msg_pwarn, we'll be
dereferencing a NULL pointer, hence the return in that
if is provided.
Change-Id: I35c112cd032e3b94e30c347766764392d5bbfe3d
Signed-off-by: Eshan Kelkar <eshangalorithm(a)gmail.com>
---
M ichspi.c
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/72/71872/1
diff --git a/ichspi.c b/ichspi.c
index 1522d2b..a1c9a70 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1565,6 +1565,7 @@
if (!entry) {
msg_pwarn("Unable to identify chip, mfg_id: 0x%02x, "
"model_id: 0x%02x\n", mfg_id, model_id);
+ return;
}
msg_pdbg("Chip identified: %s\n", entry->name);
--
To view, visit https://review.coreboot.org/c/flashrom/+/71872
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I35c112cd032e3b94e30c347766764392d5bbfe3d
Gerrit-Change-Number: 71872
Gerrit-PatchSet: 1
Gerrit-Owner: eshankelkar(a)galorithm.com
Gerrit-MessageType: newchange
Attention is currently required from: Jonathan Zhang, Thomas Heijligen, Edward O'Callaghan, Arthur Heymans.
Hello Varshit Pandya, build bot (Jenkins), Jonathan Zhang, Thomas Heijligen, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/71565
to look at the new patch set (#4).
Change subject: sb600spi.c: Move promontory code into a mmap_read=yes mode
......................................................................
sb600spi.c: Move promontory code into a mmap_read=yes mode
The only reason promontory code is handled differently is because memory
mapped reads can be faster than manual SPI sequencing. This is not
hardware specific so move it to an option 'mmap_read=yes'.
Tested on an amd picasso and genoa board.
Change-Id: I13eb5a646d3569170b3911ae7b3127cd3e6022aa
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M flashrom.8.tmpl
M sb600spi.c
2 files changed, 70 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/65/71565/4
--
To view, visit https://review.coreboot.org/c/flashrom/+/71565
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I13eb5a646d3569170b3911ae7b3127cd3e6022aa
Gerrit-Change-Number: 71565
Gerrit-PatchSet: 4
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Varshit Pandya <pandyavarshit(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur.heymans(a)9elements.com>
Gerrit-Attention: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newpatchset