Brian Norris has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/76005?usp=email )
Change subject: libflashrom: Add layout "exclude" API
......................................................................
libflashrom: Add layout "exclude" API
Layouts can be expensive to derive (reading from flash), so we might
want to reuse a layout for different purposes. Today, it's not possible
to undo a flashrom_layout_include_region() operation (to, say, operate
on a different region). Add such an API.
Change-Id: I7ea3e0674f25e34bf2cfc8f464ae7ca1c1a3fbfd
Signed-off-by: Brian Norris <briannorris(a)chromium.org>
---
M include/libflashrom.h
M layout.c
2 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/76005/1
diff --git a/include/libflashrom.h b/include/libflashrom.h
index 490ef03..e87776b 100644
--- a/include/libflashrom.h
+++ b/include/libflashrom.h
@@ -421,6 +421,16 @@
*/
int flashrom_layout_include_region(struct flashrom_layout *layout, const char *name);
/**
+ * @brief Mark given region as not included.
+ *
+ * @param layout The layout to alter.
+ * @param name The name of the region to exclude.
+ *
+ * @return 0 on success,
+ * 1 if the given name can't be found.
+ */
+int flashrom_layout_exclude_region(struct flashrom_layout *layout, const char *name);
+/**
* @brief Get given region's offset and length.
*
* @param[in] layout The existing layout.
diff --git a/layout.c b/layout.c
index cddd908..e46e61a 100644
--- a/layout.c
+++ b/layout.c
@@ -217,6 +217,17 @@
return 1;
}
+/* returns 0 to indicate success, 1 to indicate failure */
+static int exclude_region(struct flashrom_layout *const l, const char *name)
+{
+ struct romentry *const entry = _layout_entry_by_name(l, name);
+ if (entry) {
+ entry->included = false;
+ return 0;
+ }
+ return 1;
+}
+
/* returns -1 if an entry is not found, 0 if found. */
static int romentry_exists(struct flashrom_layout *const l, char *name, char *file)
{
@@ -441,6 +452,11 @@
return include_region(layout, name, NULL);
}
+int flashrom_layout_exclude_region(struct flashrom_layout *const layout, const char *name)
+{
+ return exclude_region(layout, name);
+}
+
int flashrom_layout_get_region_range(struct flashrom_layout *const l, const char *name,
unsigned int *start, unsigned int *len)
{
--
To view, visit https://review.coreboot.org/c/flashrom/+/76005?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7ea3e0674f25e34bf2cfc8f464ae7ca1c1a3fbfd
Gerrit-Change-Number: 76005
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Norris <briannorris(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Alexander Goncharov, Patrick Georgi, Stefan Reinauer, Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/75727?usp=email )
Change subject: doc: Add documentation license
......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS1:
> I have some issues with nested that which do not behave :\ but meanwhile I am looking into nested li […]
As we discussed on the meeting, this page should be sufficient.
Patchset:
PS2:
Finally I made it work, the page is ready.
Nested lists ended up being a combination of formatted lists and just plain raw paragraphs, but that's the only thing I could made work. Since this is legal text, enumerated lists should be exactly as they are, with very specific enumeration sequences.
--
To view, visit https://review.coreboot.org/c/flashrom/+/75727?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ied858b5f1e9c4a83a6eb21dcefb288c4474b08c0
Gerrit-Change-Number: 75727
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Thu, 22 Jun 2023 12:17:07 +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: Alexander Goncharov, Anastasia Klimchuk, Patrick Georgi, Stefan Reinauer, Thomas Heijligen.
Hello Alexander Goncharov, Patrick Georgi, Stefan Reinauer, Thomas Heijligen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/75727?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+2 by Stefan Reinauer, Verified+1 by build bot (Jenkins)
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: doc: Add documentation license
......................................................................
doc: Add documentation license
Change-Id: Ied858b5f1e9c4a83a6eb21dcefb288c4474b08c0
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
A doc/documentation_license.rst
M doc/index.rst
2 files changed, 297 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/27/75727/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/75727?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ied858b5f1e9c4a83a6eb21dcefb288c4474b08c0
Gerrit-Change-Number: 75727
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Angel Pons, Martin L Roth, Martin Roth, Raj Astekar, Ravishankar Sarawadi, Wonkyu Kim.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58025?usp=email )
Change subject: flashchips: Add support for GigaDevice GD25LR256E, GD251R512ME
......................................................................
Patch Set 6:
(5 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/58025/comment/384af535_3ce7dd8d :
PS6, Line 11: https://www.gigadevice.com/datasheet/gd25lr512me/
The links are not working anymore. They probably were working at the moment of patch creation, but not anymore.
I am wondering, Martin maybe you have working links to these datasheets? Then you can replace the links.
In any case, the original ones need to be removed.
https://review.coreboot.org/c/flashrom/+/58025/comment/2cb184bc_45bafcb3 :
PS6, Line 17: sudo dut-control cold_reset:on fw_wp_en:off spi2_buf_en:on spi2_buf_on_flex_en:on spi2_vref:pp1800 spi_hold:off
: sudo flashrom -V -p raiden_debug_spi -w <test_binary>
: sudo dut-control spi2_buf_en:off spi2_buf_on_flex_en:off spi2_vref:off spi_hold:off cold_reset:off
These are probably the commands used by original patch author (which is all good). Maybe if you tested the chip differently, you could add your commands?
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/58025/comment/a166b3ea_e6fa0df6 :
PS4, Line 6415: FEATURE_4BA_WREN
> I don't think that this chip requires WREN before setting 4 bit addressing. […]
Done
https://review.coreboot.org/c/flashrom/+/58025/comment/3f07fbc5_f1afd65b :
PS4, Line 6434: .eraseblocks = { {64 * 1024, 1024} },
> It looks like we lost the .block_erase identifier: […]
Done
https://review.coreboot.org/c/flashrom/+/58025/comment/09626ee9_ba71d47a :
PS4, Line 6450: .voltage = {1600, 2000},
> Maybe add the register bits? I think this is right: […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/58025?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2fe6bc1219cd1ee19b93caabab69de938cfc44b0
Gerrit-Change-Number: 58025
Gerrit-PatchSet: 6
Gerrit-Owner: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Raj Astekar <raj.astekar(a)intel.com>
Gerrit-Reviewer: Sukumar Ghorai <sukumar.ghorai(a)intel.com>
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-CC: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.corp-partner.google.com>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Attention: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Attention: Raj Astekar <raj.astekar(a)intel.com>
Gerrit-Comment-Date: Thu, 22 Jun 2023 09:51:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Nikolai Artemiev.
Brian Norris has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/75991?usp=email )
Change subject: flashrom: only unlock for write/erase operations
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
I couldn't figure out whether this got here for a good reason. It seems to have been added about 13 years ago, to read, write, and erase paths -- which were all separate at the time.
```
commit 1ee293ca95b62813a5208eb2f57fb9dbd6648c70
Author: snelson <snelson@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>
Date: Fri Feb 19 00:52:10 2010 +0000
Here's a very quick patch to fix the missing unlock code.
Fixes missing unlock for certain chips:
* unlock_49lf00x
* Pm49fl002
* Pm49fl004
* unlock_49flxxxc
* SST49LF160C
* unlock_winbond_fwhub
* W39V080FA
* W39V080FA (dual mode)
Fixes missing printlock for certain chip:
* printlock_w39v040c
* W39V040C
Signed-off-by: Sean Nelson <audiohacked(a)gmail.com>
Acked-by: Michael Karcher <flashrom(a)mkarcher.dialup.fu-berlin.de>
git-svn-id: svn://coreboot.org/flashrom/trunk@907 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
```
I also don't know how to validate your claim that flashrom doesn't implement these read-unlock operations at all.
But I'm wholeheartedly in favor of the concept.
--
To view, visit https://review.coreboot.org/c/flashrom/+/75991?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5dc66474a0b7969b51b86ac9f5daa2c95ae968f1
Gerrit-Change-Number: 75991
Gerrit-PatchSet: 1
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Brian Norris <briannorris(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
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: Wed, 21 Jun 2023 22:31:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons, Artur Kowalski.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68557?usp=email )
Change subject: flashchips: add support for MX77L25650F chip
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
Arthur, Maciej, would you have time to finish the remaining comments?
--
To view, visit https://review.coreboot.org/c/flashrom/+/68557?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iaea5485f8b59b8538dc47beada2c308376ea027c
Gerrit-Change-Number: 68557
Gerrit-PatchSet: 4
Gerrit-Owner: Artur Kowalski <artur.kowalski(a)3mdeb.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Maciej Pijanowski <maciej.pijanowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Artur Kowalski <arturkow2000(a)gmail.com>
Gerrit-CC: ServError <admin(a)serverror.com>
Gerrit-Attention: Artur Kowalski <artur.kowalski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Wed, 21 Jun 2023 12:07:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment