Attention is currently required from: Xiang Wang, Stefan Reinauer, Edward O'Callaghan, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49264
to look at the new patch set (#11).
Change subject: bitbang_spi.c: fix spi sequence in time and rename
......................................................................
bitbang_spi.c: fix spi sequence in time and rename
SPI write operation requires the change of mosi before the change of
sck. For this reason, the interface set_sck_set_mosi was rename to
set_mosi_set_sck. And the sequence in time bug was corrected.
Change-Id: I107803afef044996c94ebfaf0b0e0040cea9f8c1
Signed-off-by: Xiang Wang <merle(a)hardenedlinux.org>
---
M bitbang_spi.c
M developerbox_spi.c
M programmer.h
3 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/64/49264/11
--
To view, visit https://review.coreboot.org/c/flashrom/+/49264
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I107803afef044996c94ebfaf0b0e0040cea9f8c1
Gerrit-Change-Number: 49264
Gerrit-PatchSet: 11
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Nikolai Artemiev has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48778 )
Change subject: WIP: spi25_statusreg.c: restore SR contents at flashrom exit
......................................................................
WIP: spi25_statusreg.c: restore SR contents at flashrom exit
spi_disable_blockprotect_generic() now uses
register_chip_restore() to reset the chip's status
register at flashrom exit.
Imported from cros flashrom at `b170dd4e1d5c33b169c5`
Change-Id: If2f0e73518d40519b7569f627c90a34c364df47c
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M spi25_statusreg.c
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/78/48778/1
diff --git a/spi25_statusreg.c b/spi25_statusreg.c
index 34f9ad4..5dda912 100644
--- a/spi25_statusreg.c
+++ b/spi25_statusreg.c
@@ -108,6 +108,12 @@
return readarr[0];
}
+static int spi_restore_status(struct flashctx *flash, uint8_t status)
+{
+ msg_cdbg("restoring chip status (0x%02x)\n", status);
+ return spi_write_status_register(flash, status);
+}
+
/* A generic block protection disable.
* Tests if a protection is enabled with the block protection mask (bp_mask) and returns success otherwise.
* Tests if the register bits are locked with the lock_mask (lock_mask).
@@ -139,6 +145,9 @@
return 0;
}
+ /* restore status register content upon exit */
+ register_chip_restore(spi_restore_status, flash, status);
+
msg_cdbg("Some block protection in effect, disabling... ");
if ((status & lock_mask) != 0) {
msg_cdbg("\n\tNeed to disable the register lock first... ");
--
To view, visit https://review.coreboot.org/c/flashrom/+/48778
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If2f0e73518d40519b7569f627c90a34c364df47c
Gerrit-Change-Number: 48778
Gerrit-PatchSet: 1
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: newchange
Attention is currently required from: Stefan Reinauer, Edward O'Callaghan, Angel Pons.
Xiang Wang has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49255 )
Change subject: bitbang-spi.c: support clock polarity and phase
......................................................................
Patch Set 24:
(1 comment)
File bitbang_spi.c:
https://review.coreboot.org/c/flashrom/+/49255/comment/bc932d06_0172cdf0
PS14, Line 210: ERROR_FLASHROM_BUG
> I am not very clear, the previous code used this to put back the value
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/49255
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I04c1dfe132d756119229b27c3cd611d1be1abc8d
Gerrit-Change-Number: 49255
Gerrit-PatchSet: 24
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 12 Jan 2021 10:52:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Stefan Reinauer, Angel Pons.
Xiang Wang has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49254 )
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
Patch Set 13:
(2 comments)
File sysfsgpio.c:
https://review.coreboot.org/c/flashrom/+/49254/comment/79386348_2c5fbab6
PS4, Line 99: snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/direction", desc->pin);
: desc->fd_direction = open(s, O_WRONLY);
: if (desc->fd_direction < 0) {
: msg_perr("Error: failed to open %s\n", s);
: return -1;
: }
:
: snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/value", desc->pin);
: desc->fd_value = open(s, O_RDONLY);
: if (desc->fd_value < 0) {
: msg_perr("Error: failed to open %s\n", s);
: return -1;
: }
> I want to know why not use snprintf. The changes you hope will make the code messier.
Done
https://review.coreboot.org/c/flashrom/+/49254/comment/c6f7d162_c37a7d4c
PS4, Line 204: static int parse_pins(struct sysfsgpio_pins *pins)
> > if (v < 0 || v > 9999999) […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 13
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 12 Jan 2021 10:51:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Xiang Wang, Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#12).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M meson_options.txt
M programmer.h
A sysfsgpio.c
6 files changed, 286 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/12
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 12
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang, Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#11).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M meson_options.txt
M programmer.h
A sysfsgpio.c
6 files changed, 287 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/11
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 11
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang, Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#10).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M meson_options.txt
M programmer.h
A sysfsgpio.c
6 files changed, 287 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/10
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 10
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang, Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#9).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M meson_options.txt
M programmer.h
A sysfsgpio.c
6 files changed, 285 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/9
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 9
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang, Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#8).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M programmer.h
A sysfsgpio.c
5 files changed, 283 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/8
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 8
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Stefan Reinauer, Angel Pons.
Hello build bot (Jenkins), Stefan Reinauer, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49254
to look at the new patch set (#7).
Change subject: sysfsgpio.c implement spi interface via linux sysfs
......................................................................
sysfsgpio.c implement spi interface via linux sysfs
Linux can operate gpio through sysfs, this patch implements a bitbang
spi interface through sysfs. Through this patch, some SBC can be used
as flash programmers.
TEST=build and run flashrom with sysfsgpio on raspberrypi to read W25Q128.V
Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Signed-off-by: Xiang Wang <merle(a)hardenedliux.org>
---
M Makefile
M flashrom.c
M meson.build
M programmer.h
A sysfsgpio.c
5 files changed, 282 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/49254/7
--
To view, visit https://review.coreboot.org/c/flashrom/+/49254
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1bc47ef8011bba560326b501a80869340bb9f733
Gerrit-Change-Number: 49254
Gerrit-PatchSet: 7
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset