Attention is currently required from: Felix Singer, Angel Pons.
Liam Flaherty has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69713 )
Change subject: flashchips.c: Add 4BA write to XM25Qx256C
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/69713/comment/c89afefe_aa1afb81
PS2, Line 11:
> I don't have access to these chips, so I have left the `tested` field as `TEST_UNTESTED`. […]
Done
--
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: 3
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: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sun, 27 Nov 2022 23:18:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Liam Flaherty <liamflaherty(a)chromium.org>
Gerrit-MessageType: comment
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69518 )
Change subject: linux_mtd: Mark Opaque chip as tested for WP
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/69518/comment/075da238_fe4ef79a
PS2, Line 9: Since linux_mtd supports write-protect, its probe function needs
Yes, I spent some time thinking about this, before producing this patch and CB:69842.
> What happens if the chip doesn't support write-protect?
Not entirely sure, I will check. But I don't see programmer code ever returning errors like "wp unsuported". Perhaps this is handled at a different level, or maybe everything that goes through linux_mtd can support wp.
The programmer (and all the other opaque master) do not check whether any of the operations are supported. They just set the chip as "everything tested". I guess, by design of opaque masters?
So this is why I made CB:69842 too. Similar motivation, although I made a different commit message for CB:69842 , to be very specific.
In any case, showing to the user "your Opaque chip is not tested, please report on the mailing list" is not much help: what do they report, "Opaque chip"? My understanding this is also by design, that users do not [need to] know which exacty chip that is.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69518
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Icc0521c28555a93f26ce66bdbeaa68590f10c358
Gerrit-Change-Number: 69518
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
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-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Sun, 27 Nov 2022 22:22:53 +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: Felix Singer.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/70025 )
Change subject: flashrom.c: Factor out setup_curcontents() from flashrom_image_write()
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
RFC?
--
To view, visit https://review.coreboot.org/c/flashrom/+/70025
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4baf09700d7efcbca3a6ba0cfda3231837e0a34a
Gerrit-Change-Number: 70025
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Sun, 27 Nov 2022 10:15:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/70025 )
Change subject: flashrom.c: Factor out setup_curcontents() from flashrom_image_write()
......................................................................
flashrom.c: Factor out setup_curcontents() from flashrom_image_write()
The CrOS tree factored this functionality into its
own function, seems reasonable.
Change-Id: I4baf09700d7efcbca3a6ba0cfda3231837e0a34a
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M flashrom.c
1 file changed, 54 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/25/70025/1
diff --git a/flashrom.c b/flashrom.c
index 51a6b64..48ac687 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1800,6 +1800,44 @@
memcpy(newcontents + start, oldcontents + start, copy_len);
}
+static int setup_curcontents(struct flashctx *const flashctx,
+ void *curcontents, const void *const refcontents)
+{
+ const size_t flash_size = flashctx->chip->total_size * 1024;
+ const bool verify_all = flashctx->flags.verify_whole_chip;
+
+ memset(curcontents, UNERASED_VALUE(flashctx), flash_size);
+
+ /* If given, assume flash chip contains same data as `refcontents`. */
+ if (refcontents) {
+ msg_cinfo("Assuming old flash chip contents as ref-file...\n");
+ memcpy(curcontents, refcontents, flash_size);
+ } else {
+ /*
+ * Read the whole chip to be able to check whether regions need to be
+ * erased and to give better diagnostics in case write fails.
+ * The alternative is to read only the regions which are to be
+ * preserved, but in that case we might perform unneeded erase which
+ * takes time as well.
+ */
+ msg_cinfo("Reading old flash chip contents... ");
+ if (verify_all) {
+ if (read_flash(flashctx, curcontents, 0, flash_size)) {
+ msg_cinfo("FAILED.\n");
+ return -1;
+ }
+ } else {
+ if (read_by_layout(flashctx, curcontents)) {
+ msg_cinfo("FAILED.\n");
+ return -1;
+ }
+ }
+ msg_cinfo("done.\n");
+ }
+
+ return 0;
+}
+
int flashrom_image_write(struct flashctx *const flashctx, void *const buffer, const size_t buffer_len,
const void *const refbuffer)
{
@@ -1840,34 +1878,12 @@
if (prepare_flash_access(flashctx, false, true, false, verify))
goto _free_ret;
- /* If given, assume flash chip contains same data as `refcontents`. */
+ if (setup_curcontents(flashctx, curcontents, refcontents) < 0)
+ goto _finalize_ret;
+
if (refcontents) {
- msg_cinfo("Assuming old flash chip contents as ref-file...\n");
- memcpy(curcontents, refcontents, flash_size);
if (oldcontents)
memcpy(oldcontents, refcontents, flash_size);
- } else {
- /*
- * Read the whole chip to be able to check whether regions need to be
- * erased and to give better diagnostics in case write fails.
- * The alternative is to read only the regions which are to be
- * preserved, but in that case we might perform unneeded erase which
- * takes time as well.
- */
- msg_cinfo("Reading old flash chip contents... ");
- if (verify_all) {
- if (read_flash(flashctx, oldcontents, 0, flash_size)) {
- msg_cinfo("FAILED.\n");
- goto _finalize_ret;
- }
- memcpy(curcontents, oldcontents, flash_size);
- } else {
- if (read_by_layout(flashctx, curcontents)) {
- msg_cinfo("FAILED.\n");
- goto _finalize_ret;
- }
- }
- msg_cinfo("done.\n");
}
if (write_by_layout(flashctx, curcontents, newcontents)) {
--
To view, visit https://review.coreboot.org/c/flashrom/+/70025
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4baf09700d7efcbca3a6ba0cfda3231837e0a34a
Gerrit-Change-Number: 70025
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newchange
Felix Singer has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/69988 )
Change subject: libpayload: Fix compiling bugs
......................................................................
Abandoned
See CB:70040. Repushed the patches so that they are shown as cherry-picks. Sorry for the noise.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69988
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: Iad4435ccf3ff4a665755b353fc2b75ffb51c9cc2
Gerrit-Change-Number: 69988
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: abandon
Felix Singer has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/69987 )
Change subject: ichspi: Fix number of bytes for HW seq operations
......................................................................
Abandoned
See CB:70039. Repushed the patches so that they are shown as cherry-picks. Sorry for the noise.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69987
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: Id54cb06bc66e86f95ea652ee604715e8969bcb02
Gerrit-Change-Number: 69987
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: abandon
Felix Singer has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/69986 )
Change subject: ichspi: Clear Fast SPI HSFC register before HW seq operation
......................................................................
Abandoned
See CB:69998. Repushed the patches so that they are shown as cherry-picks. Sorry for the noise.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69986
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: I1b77e563f67ad2793983b65e694be60c85f126c0
Gerrit-Change-Number: 69986
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: abandon
Felix Singer has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/69985 )
Change subject: opaque_master: Mark Opaque chip as tested for WP
......................................................................
Abandoned
See CB:69997. Repushed the patches so that they are shown as cherry-picks. Sorry for the noise.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69985
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: Iaef2026a9e06a823ab481853b520022ba83b1ca1
Gerrit-Change-Number: 69985
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
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-MessageType: abandon
Felix Singer has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/69984 )
Change subject: linux_mtd: Mark Opaque chip as tested for WP
......................................................................
Abandoned
See CB:69996. Repushed the patches so that they are shown as cherry-picks. Sorry for the noise.
--
To view, visit https://review.coreboot.org/c/flashrom/+/69984
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: I2740e75c974538ddae9f5b17dc4fba9a3101cbb3
Gerrit-Change-Number: 69984
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
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-MessageType: abandon