Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69751 )
Change subject: ichspi: Clear Fast SPI HSFC register before HW seq operation
......................................................................
ichspi: Clear Fast SPI HSFC register before HW seq operation
This patch fixes a regression introduced with
commit 7ed1337309d3fe74f5af09520970f0f1d417399a (ichspi: Factor out
common hwseq_xfer logic into helpers).
The reason for the regression is ignoring the fact that the Fast SPI
controller MMIO register HSFC (0x06) might not hold the default value
aka `0` before initiating the HW sequencing operation.
Having a `1b` value in the HSFC.FDBC (bits 24-29) field would represent
a byte that needs to be transfered.
While debugging the regression, we have observed that the default value
(3) in the HSFC. FDBC offset during `--wp-disable` operation represents
higher numbers of bytes than the actual and eventually results in the
error.
BUG=b:258280679
TEST=Able to build flashrom and perform below operations on Google, Rex
and Google, Kano/Taeko.
Without this patch:
HSFC register value inside ich_start_hwseq_xfer() before initiating
the HW seq operations: 0x300
HSFC register value inside ich_start_hwseq_xfer() during the HW seq
operations (--wp-disable): 0x311
With this patch:
HSFC register value inside ich_start_hwseq_xfer() before initiating
the HW seq operations: 0x0
HSFC register value inside ich_start_hwseq_xfer() during the HW seq
operations (--wp-disable): 0x11
Additionally, verified other HW sequencing operations (like read, write,
erase, read status, write status, read ID) working fine without any
error.
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
Change-Id: I8cffcbc9046b7aa4086ff3049511df034088eb93
---
M ichspi.c
1 file changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/51/69751/1
diff --git a/ichspi.c b/ichspi.c
index d2600ff..7415edc 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1357,6 +1357,8 @@
/* make sure FDONE, FCERR, AEL are cleared by writing 1 to them */
REGWRITE16(ICH9_REG_HSFS, REGREAD16(ICH9_REG_HSFS));
+ /* make sure HSFC register is cleared before initiate any operation */
+ REGWRITE16(ICH9_REG_HSFC, 0);
/* Set up transaction parameters. */
hsfc = REGREAD16(ICH9_REG_HSFC);
--
To view, visit https://review.coreboot.org/c/flashrom/+/69751
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8cffcbc9046b7aa4086ff3049511df034088eb93
Gerrit-Change-Number: 69751
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69750 )
Change subject: ichspi: Fix number of bytes for read, write, flash id, erase operation
......................................................................
ichspi: Fix number of bytes for read, write, flash id, erase operation
This patch fixes a potential issue where the SPI controller register
HSFC.FDBC (bits 24-29) value gets wrongly calculated while passing
the `len` as `0` instead `1`.
As per Intel EDS, `0b` in the FDBC represents 1 byte while `0x3f`
represents 64-bytes to be transferred. The number of bytes
transferred is the value of this field plus 1.
If we would like to transfer 1 byte then we need to set `0b` in
FDBC for operations like read, write, flash id to account the `set
byte count` hence, the `len` argument should be `1`.
Additionally, as per EDS, the FDBC field is ignored for any block
erase command.
Note: `FDBC` field still holds the wrong value (3) before any HW seq
operation which will be fixed with incremental patch in this train.
BUG=b:258280679
TEST=Able to build flashrom and perform below operations on Google,
Rex and Google, Kano/Taeko.
Without this patch:
HSFC register value inside ich_start_hwseq_xfer() before initiating
the HW seq operations: 0x3f00
HSFC register value inside ich_start_hwseq_xfer() during the HW seq
operations (--wp-disable): 0x3f11
With this patch:
HSFC register value inside ich_start_hwseq_xfer() before initiating
the HW seq operations: 0x300
HSFC register value inside ich_start_hwseq_xfer() during the HW seq
operations (--wp-disable): 0x311
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
Change-Id: Ie5de7c5bd9809d146a317df56996f7f8a85ca9a5
---
M ichspi.c
1 file changed, 49 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/50/69750/1
diff --git a/ichspi.c b/ichspi.c
index 4e982f0..d2600ff 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1401,7 +1401,7 @@
}
msg_pdbg("Reading Status register\n");
- if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_RD_STATUS, 0, len, ich_generation,
+ if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_RD_STATUS, 1, len, ich_generation,
hwseq_data->addr_mask)) {
msg_perr("Reading Status register failed\n!!");
return -1;
@@ -1424,7 +1424,7 @@
ich_fill_data(&value, len, ICH9_REG_FDATA0);
- if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_WR_STATUS, 0, len, ich_generation,
+ if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_WR_STATUS, 1, len, ich_generation,
hwseq_data->addr_mask)) {
msg_perr("Writing Status register failed\n!!");
return -1;
@@ -1520,7 +1520,7 @@
msg_pdbg("Erasing %d bytes starting at 0x%06x.\n", len, addr);
- if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_BLOCK_ERASE, addr, 0, ich_generation,
+ if (ich_exec_sync_hwseq_xfer(flash, HSFC_CYCLE_BLOCK_ERASE, addr, 1, ich_generation,
hwseq_data->addr_mask))
return -1;
return 0;
--
To view, visit https://review.coreboot.org/c/flashrom/+/69750
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie5de7c5bd9809d146a317df56996f7f8a85ca9a5
Gerrit-Change-Number: 69750
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newchange
Attention is currently required from: Thomas Heijligen.
Iman Bingi has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69714 )
Change subject: flashrom/gui: Add GUI to Flashrom
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> The api is defined in include/libflashrom.h. […]
Thanks alot. that really helps.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 2
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Thu, 17 Nov 2022 11:56:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Iman Bingi <imanbingy(a)gmail.com>
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Iman Bingi.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69714 )
Change subject: flashrom/gui: Add GUI to Flashrom
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Hi Thomas, […]
The api is defined in include/libflashrom.h.
The classic_cli uses some internal flashrom calls. they are leftovers from times where we haven't has an libflashrom
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 2
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Comment-Date: Thu, 17 Nov 2022 11:32:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Iman Bingi <imanbingy(a)gmail.com>
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Iman Bingi has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69714 )
Change subject: flashrom/gui: Add GUI to Flashrom
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Hi, […]
Hi Thomas,
1. I am not familiar with flashrom api. So i copied those files to find the
the needed functions and delete them later.
2. I have no idea about meson. Every help is welcome.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 2
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Thu, 17 Nov 2022 10:59:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: Iman Bingi.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69714 )
Change subject: flashrom/gui: Add GUI to Flashrom
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Hi,
thanks fr all the work! I'll have a look for the functionality later.
For now I've two Points:
- Why have you copied some of the source files if flashrom? (E.g. cli_classic.c)
- We are migrating to a meson based build process. So gflashrom might migrate also. we can also help you if you are not familaiar with it
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 2
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Comment-Date: Thu, 17 Nov 2022 10:48:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Hello build bot (Jenkins), Thomas Heijligen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/69714
to look at the new patch set (#2).
Change subject: flashrom/gui: Add GUI to Flashrom
......................................................................
flashrom/gui: Add GUI to Flashrom
Flashrom Graphical User Interface
Depends on:
* gtk+ >=4
* adwaita >=1
Shortcomings:
* Untested
TODO:
* Test on as many hardware/platforms as possible
Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Signed-off-by: Ben Adu-Boahen <imanbingy(a)gmail.com>
---
A gflashrom/Makefile
A gflashrom/chartable.c
A gflashrom/chartable.h
A gflashrom/cli_classic.c
A gflashrom/cli_common.c
A gflashrom/cli_output.c
A gflashrom/common_macros.h
A gflashrom/common_ui.c
A gflashrom/common_ui.h
A gflashrom/config.h
A gflashrom/configuration.c
A gflashrom/configuration.h
A gflashrom/context_menu.ui.xml
A gflashrom/converter.c
A gflashrom/converter.h
A gflashrom/coreboot.Gflashrom.gschema.xml
A gflashrom/data_buffer.c
A gflashrom/data_buffer.h
A gflashrom/find_dialog.ui.xml
A gflashrom/find_options.ui.xml
A gflashrom/findreplace.c
A gflashrom/findreplace.h
A gflashrom/flashrom.c
A gflashrom/gflashrom.c
A gflashrom/gflashrom.css
A gflashrom/gflashrom.gresource.xml
A gflashrom/gflashrom.h
A gflashrom/gflashrom_app_win.c
A gflashrom/gflashrom_app_win.h
A gflashrom/gflashrom_app_win.ui.xml
A gflashrom/gflashrom_layout_manager.c
A gflashrom/gflashrom_layout_manager.h
A gflashrom/gflashrom_paste_data.c
A gflashrom/gflashrom_paste_data.h
A gflashrom/gflashrom_resources.c
A gflashrom/gfprint.c
A gflashrom/help_overlay.ui.xml
A gflashrom/hex_dialog.c
A gflashrom/hex_dialog.h
A gflashrom/hex_document.c
A gflashrom/hex_document.h
A gflashrom/hex_statusbar.c
A gflashrom/hex_statusbar.h
A gflashrom/jump_dialog.ui.xml
A gflashrom/libflashrom.c
A gflashrom/main.c
A gflashrom/paste_special.c
A gflashrom/paste_special.h
A gflashrom/paste_special.ui.xml
A gflashrom/preferences.c
A gflashrom/preferences.h
A gflashrom/preferences.ui.xml
A gflashrom/print.c
A gflashrom/print.h
A gflashrom/replace_dialog.ui.xml
55 files changed, 19,486 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/69714/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 2
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newpatchset
Iman Bingi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69714 )
Change subject: flashrom/gflashrom: Add GUI to Flashrom
......................................................................
flashrom/gflashrom: Add GUI to Flashrom
Flashrom Graphical User Interface
Depends on:
* gtk+ >=4
* adwaita >=1
Shortcomings:
* Untested
TODO:
* Test on as many hardware/platforms as possible
Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Signed-off-by: Ben Adu-Boahen <imanbingy(a)gmail.com>
---
A gflashrom/Makefile
A gflashrom/chartable.c
A gflashrom/chartable.h
A gflashrom/cli_classic.c
A gflashrom/cli_common.c
A gflashrom/cli_output.c
A gflashrom/common_macros.h
A gflashrom/common_ui.c
A gflashrom/common_ui.h
A gflashrom/config.h
A gflashrom/configuration.c
A gflashrom/configuration.h
A gflashrom/context_menu.ui.xml
A gflashrom/converter.c
A gflashrom/converter.h
A gflashrom/coreboot.Gflashrom.gschema.xml
A gflashrom/data_buffer.c
A gflashrom/data_buffer.h
A gflashrom/find_dialog.ui.xml
A gflashrom/find_options.ui.xml
A gflashrom/findreplace.c
A gflashrom/findreplace.h
A gflashrom/flashrom.c
A gflashrom/gflashrom.c
A gflashrom/gflashrom.css
A gflashrom/gflashrom.gresource.xml
A gflashrom/gflashrom.h
A gflashrom/gflashrom_app_win.c
A gflashrom/gflashrom_app_win.h
A gflashrom/gflashrom_app_win.ui.xml
A gflashrom/gflashrom_layout_manager.c
A gflashrom/gflashrom_layout_manager.h
A gflashrom/gflashrom_paste_data.c
A gflashrom/gflashrom_paste_data.h
A gflashrom/gflashrom_resources.c
A gflashrom/gfprint.c
A gflashrom/help_overlay.ui.xml
A gflashrom/hex_dialog.c
A gflashrom/hex_dialog.h
A gflashrom/hex_document.c
A gflashrom/hex_document.h
A gflashrom/hex_statusbar.c
A gflashrom/hex_statusbar.h
A gflashrom/jump_dialog.ui.xml
A gflashrom/libflashrom.c
A gflashrom/main.c
A gflashrom/paste_special.c
A gflashrom/paste_special.h
A gflashrom/paste_special.ui.xml
A gflashrom/preferences.c
A gflashrom/preferences.h
A gflashrom/preferences.ui.xml
A gflashrom/print.c
A gflashrom/print.h
A gflashrom/replace_dialog.ui.xml
55 files changed, 19,486 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/69714/1
--
To view, visit https://review.coreboot.org/c/flashrom/+/69714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I130028b07e0465a2c877d5cbbdc2edd9ea5e8266
Gerrit-Change-Number: 69714
Gerrit-PatchSet: 1
Gerrit-Owner: Iman Bingi <imanbingy(a)gmail.com>
Gerrit-MessageType: newchange
Attention is currently required from: Angel Pons, Liam Flaherty.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69713 )
Change subject: flashchips.c: Add 4BA write to XM25Qx256C
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/69713/comment/bf9222f4_516e56c5
PS2, Line 10: command (0x12) according to their datasheets, but the feature flag is not enabled in flashchips.c, so enable it to allow this feature to be used.
Wrap at 72 chars
https://review.coreboot.org/c/flashrom/+/69713/comment/62e2a8c3_ff26241f
PS2, Line 11:
Tested?
--
To view, visit https://review.coreboot.org/c/flashrom/+/69713
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I96c80762fcda2af6028c7a53d8c545b0c6565cbd
Gerrit-Change-Number: 69713
Gerrit-PatchSet: 2
Gerrit-Owner: Liam Flaherty <liamflaherty(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Liam Flaherty <liamflaherty(a)chromium.org>
Gerrit-Comment-Date: Thu, 17 Nov 2022 06:21:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment