Attention is currently required from: Nikolai Artemiev, Stefan Reinauer, Victor Lim.
Hello Anastasia Klimchuk, Nikolai Artemiev, Stefan Reinauer, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/84705?usp=email
to look at the new patch set (#2).
Change subject: flashchips: add GD25F64F
......................................................................
flashchips: add GD25F64F
GD25F64F: 3V 64Mbit, high performance
Tested on ch347 with erase, write, read, and protection
Change-Id: I07005f1589b76c8a61a1a744b16dc6b0c9020e11
Signed-off-by: Victor Lim <vlim(a)gigadevice.com>
---
M flashchips.c
M include/flashchips.h
2 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/84705/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/84705?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I07005f1589b76c8a61a1a744b16dc6b0c9020e11
Gerrit-Change-Number: 84705
Gerrit-PatchSet: 2
Gerrit-Owner: Victor Lim <vlim(a)gigadevice.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Victor Lim <vlim(a)gigadevice.com>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Attention is currently required from: Anastasia Klimchuk, Nikolai Artemiev, Stefan Reinauer.
Victor Lim has posted comments on this change by Victor Lim. ( https://review.coreboot.org/c/flashrom/+/84090?usp=email )
Change subject: flashchips: add GD25F256F
......................................................................
Patch Set 2:
(1 comment)
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/84090/comment/8d108056_3421be22?us… :
PS2, Line 8056: reg_bits
> The exact definition in the datasheet for STATUS1 bit 7 is "Reserved". […]
Since it is now a "reserved" bit, that means this bit is no longer meaningful. When reading it, it will give value 0.
It can still do SW protection; just no HW protection.
Below is the message when reading the --wp-status.
> Found GigaDevice flash chip "GD25F256F" (32768 kB, SPI) on ch347_spi.
> Protection range: start=0x01e00000 length=0x00200000 (upper 1/16)
> Protection mode: disabled
--
To view, visit https://review.coreboot.org/c/flashrom/+/84090?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ibbbbb8a55adbcbc2ee1785782c4eb3771d50c167
Gerrit-Change-Number: 84090
Gerrit-PatchSet: 2
Gerrit-Owner: Victor Lim <vlim(a)gigadevice.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Sat, 12 Oct 2024 16:12:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Nikolai Artemiev <nartemiev(a)google.com>
Attention is currently required from: Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/84439?usp=email )
Change subject: Display progress for what is actually erased/written
......................................................................
Patch Set 9:
(1 comment)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/84439/comment/79da4579_69079e41?us… :
PS7, Line 1265: // TODO: take FEATURE_NO_ERASE into account?
> I found something to fix for FEATURE_NO_ERASE, although not here. […]
How it looks to me now, there can be two possible workarounds for FEATURE_NO_ERASE:
Either hacking spi_write_chunked so that it knows when it's erase instead of write
or re-init progress in between erase and write, then it would looks like WRITE 0...100 and then once more WRITE 0...100
It seem to me the latter it more realistic.
--
To view, visit https://review.coreboot.org/c/flashrom/+/84439?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I88ac4d40f1b6ccc1636b1efb690d8d68bdebec08
Gerrit-Change-Number: 84439
Gerrit-PatchSet: 9
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Comment-Date: Sat, 12 Oct 2024 09:49:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Attention is currently required from: Alexandru Stan, Nikolai Artemiev, Stefan Reinauer.
Anastasia Klimchuk has posted comments on this change by Alexandru Stan. ( https://review.coreboot.org/c/flashrom/+/84752?usp=email )
Change subject: WIP: flashchips: add Winbond W25R512NWEIQ
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/84752/comment/fc65cc45_4bc0b1a2?us… :
PS1, Line 8:
: I don't actually have a datasheet for this (so feel free to reject this
: CL)
Thank you for contribution! No I won't reject it so easily, my first reaction is to try and find the datasheet.
It doesn't have to be fully public datasheet, could be someone who has datasheet reviewing this patch. This does not necessarily mean that the person has to share the datasheet with the whole world.
Please keep the patch... let's try to find the reviewer.
https://review.coreboot.org/c/flashrom/+/84752/comment/428c0d54_3ff9a47e?us… :
PS1, Line 10: I just bruteforced it
This is so cool! :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/84752?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ibf670e4014a22e4636789768b759cb51f75cd046
Gerrit-Change-Number: 84752
Gerrit-PatchSet: 1
Gerrit-Owner: Alexandru Stan <ams(a)frame.work>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alexandru Stan <ams(a)frame.work>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Sat, 12 Oct 2024 07:18:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Aarya.
Hello Aarya, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/84721?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: erasure_layout: Add an option to sacrifice unchanged blocks for speed
......................................................................
erasure_layout: Add an option to sacrifice unchanged blocks for speed
Someone may prefer to sacrifice sub-blocks needless to change within a
larger erase block for programming speed. These people who are okay to
fry their chip sooner can set this option. If the percentage of
sub-blocks needless to change within a larger erase block is lower
than the given value, the whole larger erase block will be erased.
Change-Id: I154e8a713f626c37dbbe118db700055b96d24803
Signed-off-by: persmule <persmule(a)hardenedlinux.org>
---
M cli_classic.c
M erasure_layout.c
M include/flash.h
3 files changed, 25 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/84721/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/84721?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I154e8a713f626c37dbbe118db700055b96d24803
Gerrit-Change-Number: 84721
Gerrit-PatchSet: 2
Gerrit-Owner: Bill XIE <persmule(a)hardenedlinux.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Attention is currently required from: Aarya, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change by Sergii Dmytruk. ( https://review.coreboot.org/c/flashrom/+/84102?usp=email )
Change subject: Complete and fix progress feature implementation for all operations
......................................................................
Patch Set 9:
(7 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/84102/comment/d4f2fa6b_9142155a?us… :
PS7, Line 42: The progress doesn't just dump lots of stuff on the screen which
: probably won't fly because of CB:64668, but it's not hard to adjust
: this.
> ```suggestion […]
Done
File cli_output.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/29613789_74bdf5df?us… :
PS4, Line 119: 16 * FLASHROM_PROGRESS_NR
> Just saw that "..." is also printed below which needs to be erased as well.
Maybe this is where your extra 3 chars went! (you said: it will be 13 chars which I rounded to 16). Because, when running, `...` does not multiply, it seems to be erased as well.
File cli_output.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/10e17709_05349c1f?us… :
PS7, Line 157: progress_printed = false;
> Those extra newlines are quite annoying. I think most of them can be deal with quite easily. […]
Yes that's a good improvement. I re-wrote, and did the same tests with dummy (with normal level of verbosity and -VVV), seems to work.
File libflashrom.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/452e1f9a_e15a1294?us… :
PS7, Line 82: update_progress(flashctx, stage, 0);
> Probably worth commenting that this is used to trigger callback invocation.
Done
File realtek_mst_i2c_spi.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/6f5378d1_657ce56e?us… :
PS7, Line 400: RTK_PAGE_SIZE
> Looks like this should actually be `page_len`.
Done
File spi25.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/88215ffc_4b229a2a?us… :
PS7, Line 733: chunksize
> This should be `towrite`.
Done
File tests/chip.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/aa31decd_fbe8fefe?us… :
PS7, Line 84: }
> Doesn't look like this can catch progress going backward. […]
Yeah this does not assert anything, just prints for a human to read in the logs.
I meant this test as a starting point, to at least run the code (which is a bit better than just compiling). It checks that there are no segfaults or infinite loops, memory leaks, things like that - but no asserting for logic.
I would do it later (perhaps in the next patch), what do you think?
--
To view, visit https://review.coreboot.org/c/flashrom/+/84102?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Gerrit-Change-Number: 84102
Gerrit-PatchSet: 9
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Comment-Date: Fri, 11 Oct 2024 11:52:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Attention is currently required from: Aarya, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has uploaded a new patch set (#9) to the change originally created by Sergii Dmytruk. ( https://review.coreboot.org/c/flashrom/+/84102?usp=email )
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: Complete and fix progress feature implementation for all operations
......................................................................
Complete and fix progress feature implementation for all operations
Original progress reporting implemented in CB:49643 and it has some
issues, for example:
size_t start_address = start;
size_t end_address = len - start;
End address is anything but length minus start address.
update_progress(flash,
FLASHROM_PROGRESS_READ,
/*current*/ start - start_address + to_read,
/*total*/ end_address);
Total should just be length if that's how current value is computed.
---
libflashrom needs to know total size ahead of time.
That's init_progress() and changed update_progress().
It also needs to store the last current value to be able to update it.
That's stage_progress in flashrom_flashctx.
Measuring accurately amount of data which will be read/erased/written
isn't easy because things can be skipped as optimizations. The next
patch in the chain aims to address this, there are TODO/FIXME
comments there.
---
CLI shares terminal with the rest of the code and has to maintain more
state to handle that reasonably well.
Similar to CB:64668, an effort is made to keep the progress on a
single line. Non-progress output is kept track of to know when
moving to a new line cannot be avoided.
---
A script to test the CLI:
\#!/bin/bash
t=${1:-rewW}
shift
if [[ $t =~ r ]]; then
echo ">>> READ"
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -r dump.rom --progress "$@"
echo
fi
if [[ $t =~ e ]]; then
echo ">>> ERASE"
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -E --progress "$@"
echo
fi
if [[ $t =~ w ]]; then
echo ">>> WRITE (without erase)"
dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -w zero.rom --progress "$@"
echo
fi
if [[ $t =~ W ]]; then
echo ">>> WRITE (with erase)"
dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
dd if=/dev/random of=random.rom bs=1M count=16 2> /dev/null
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz,image=random.rom -w zero.rom --progress "$@"
echo
fi
Co-developed-by: Anastasia Klimchuk <aklm(a)flashrom.org>
Co-developed-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Signed-off-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
M 82802ab.c
M at45db.c
M cli_classic.c
M cli_output.c
M dediprog.c
M doc/release_notes/devel.rst
M en29lv640b.c
M erasure_layout.c
M flashrom.c
M include/flash.h
M it87spi.c
M jedec.c
M libflashrom.c
M linux_mtd.c
M parade_lspcon.c
M realtek_mst_i2c_spi.c
M spi.c
M spi25.c
M sst28sf040.c
M tests/chip.c
M tests/spi25.c
M tests/tests.c
M tests/tests.h
23 files changed, 304 insertions(+), 50 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/02/84102/9
--
To view, visit https://review.coreboot.org/c/flashrom/+/84102?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Gerrit-Change-Number: 84102
Gerrit-PatchSet: 9
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Attention is currently required from: Aarya, Nikolai Artemiev, Sergii Dmytruk.
Anastasia Klimchuk has posted comments on this change by Sergii Dmytruk. ( https://review.coreboot.org/c/flashrom/+/84102?usp=email )
Change subject: Complete and fix progress feature implementation for all operations
......................................................................
Patch Set 8:
(1 comment)
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/84102/comment/0b1b701a_4a865fee?us… :
PS7, Line 275: msg_cerr("ERASE FAILED!\n");
> Not added here, but this line is unreachable.
Oh yes, I made CB:84725
--
To view, visit https://review.coreboot.org/c/flashrom/+/84102?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Gerrit-Change-Number: 84102
Gerrit-PatchSet: 8
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Comment-Date: Fri, 11 Oct 2024 08:23:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>