Khem Raj has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/43770 )
Change subject: Makefile: Check for last line only from preprocessed output
......................................................................
Makefile: Check for last line only from preprocessed output
This started to fail with glibc 2.32 since glibc added additional
attributes to functions in signal.h therefore existing regexp started to
fail as it is not able to handle these functions e.g.
extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
__attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
grep -v '^\#' | grep '"' | cut -f 2 -d'"'
bit outside of fd_set selected
Use sigaction with SA_RESTART instead
arm
So changing it to
tail -1 | grep '"' | cut -f 2 -d'"'
arm
Produces the expected result, this was hidden until now
Signed-off-by: Khem Raj <raj.khem(a)gmail.com>
Change-Id: I123a046e142d54632f12d54e2aa09b0928c02b91
---
M Makefile
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/70/43770/1
diff --git a/Makefile b/Makefile
index 803529f..3795681 100644
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@
# IMPORTANT: The following line must be placed before TARGET_OS is ever used
# (of course), but should come after any lines setting CC because the line
# below uses CC itself.
-override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
+override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | tail -1 | grep '"' | cut -f 2 -d'"'))
ifeq ($(TARGET_OS), Darwin)
override CPPFLAGS += -I/opt/local/include -I/usr/local/include
@@ -460,8 +460,8 @@
# IMPORTANT: The following line must be placed before ARCH is ever used
# (of course), but should come after any lines setting CC because the line
# below uses CC itself.
-override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
-override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | grep -v '^\#'))
+override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | tail -1 | grep '"' | cut -f 2 -d'"'))
+override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | tail -1))
# Disable the internal programmer on unsupported architectures (everything but x86 and mipsel)
ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN))
--
To view, visit https://review.coreboot.org/c/flashrom/+/43770
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I123a046e142d54632f12d54e2aa09b0928c02b91
Gerrit-Change-Number: 43770
Gerrit-PatchSet: 1
Gerrit-Owner: Khem Raj
Gerrit-MessageType: newchange
Ryan O'Leary has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/37776 )
Change subject: Add -- to make clean
......................................................................
Add -- to make clean
Somehow, I ended up with a file name "-c.d". I probably made it by
mistake. This change lets "make clean" be a bit more resilient to files
such as these.
Change-Id: I2517ffac975f3df75f706350a07f189a98a11b7c
Signed-off-by: Ryan O'Leary <ryanoleary(a)google.com>
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/76/37776/1
diff --git a/Makefile b/Makefile
index 518d41b..fa66910 100644
--- a/Makefile
+++ b/Makefile
@@ -1129,7 +1129,7 @@
# This includes all frontends and libflashrom.
# We don't use EXEC_SUFFIX here because we want to clean everything.
clean:
- rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a *.o *.d $(PROGRAM).8 $(PROGRAM).8.html $(BUILD_DETAILS_FILE)
+ rm -f -- $(PROGRAM) $(PROGRAM).exe libflashrom.a *.o *.d $(PROGRAM).8 $(PROGRAM).8.html $(BUILD_DETAILS_FILE)
@+$(MAKE) -C util/ich_descriptors_tool/ clean
distclean: clean
--
To view, visit https://review.coreboot.org/c/flashrom/+/37776
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2517ffac975f3df75f706350a07f189a98a11b7c
Gerrit-Change-Number: 37776
Gerrit-PatchSet: 1
Gerrit-Owner: Ryan O'Leary <ryanoleary(a)google.com>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/46523 )
Change subject: dummyflasher.c: Use programmer logger functions
......................................................................
dummyflasher.c: Use programmer logger functions
All but three log messages use the programmer logger. Change the three
outliers that were using the chip logger accordingly.
Change-Id: Ia8668e05df2da739e6bb4c7d0fddad86e8d054a3
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M dummyflasher.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/23/46523/1
diff --git a/dummyflasher.c b/dummyflasher.c
index 6426ad2..d233db4 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -610,7 +610,7 @@
}
for (i = 0; i < data->spi_ignorelist_size; i++) {
if (writearr[0] == data->spi_ignorelist[i]) {
- msg_cdbg("Ignoring ignorelisted SPI command 0x%02x\n",
+ msg_pdbg("Ignoring ignorelisted SPI command 0x%02x\n",
data->spi_ignorelist[i]);
/* Return success because the command does not fail,
* it is simply ignored.
@@ -1050,7 +1050,7 @@
* Search "total_size * 1024" in code.
*/
flash->chip->total_size = emu_data->emu_chip_size / 1024;
- msg_cdbg("%s: set flash->total_size to %dK bytes.\n", __func__,
+ msg_pdbg("%s: set flash->total_size to %dK bytes.\n", __func__,
flash->chip->total_size);
/* Update the first count of each of the block_erasers. */
@@ -1061,7 +1061,7 @@
eraser->eraseblocks[0].count = 1;
eraser->eraseblocks[0].size = emu_data->emu_chip_size;
- msg_cdbg("%s: eraser.size=%d, .count=%d\n",
+ msg_pdbg("%s: eraser.size=%d, .count=%d\n",
__func__, eraser->eraseblocks[0].size,
eraser->eraseblocks[0].count);
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/46523
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia8668e05df2da739e6bb4c7d0fddad86e8d054a3
Gerrit-Change-Number: 46523
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Attention is currently required from: Anastasia Klimchuk, Nikolai Artemiev, Stefan Reinauer.
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/+/81562?usp=email
to look at the new patch set (#6).
Change subject: flashchips: Add support for MXIC MX25L3273F
......................................................................
flashchips: Add support for MXIC MX25L3273F
The MX25L3273F has been tested by ch341a programmer : read, write,
erase and wp.
We have tested --wp-enable, --wp-disable, --wp-list and --wp-range
commands for write-protect feature.
MX25L3273F datasheet is available at the following URL:
https://www.mxic.com.tw/Lists/Datasheet/Attachments/8661/MX25L3273F,%203V,%…
Change-Id: I4adaaa796d1db34702e7b0ed8e6fb167a3a5f6d7
Signed-off-by: DanielZhang <danielzhang(a)mxic.com.cn>
---
M flashchips.c
1 file changed, 45 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/81562/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/81562?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I4adaaa796d1db34702e7b0ed8e6fb167a3a5f6d7
Gerrit-Change-Number: 81562
Gerrit-PatchSet: 6
Gerrit-Owner: DZ <danielzhang(a)mxic.com.cn>
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: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Anastasia Klimchuk, Nikolai Artemiev, Stefan Reinauer.
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/+/81563?usp=email
to look at the new patch set (#2).
Change subject: flashchips: Add support for MXIC MX25L3239E
......................................................................
flashchips: Add support for MXIC MX25L3239E
The MX25L3239E has been tested by ch341a programmer : read, write,
erase and wp.
We have tested --wp-enable, --wp-disable, --wp-list and --wp-range
commands for write-protect feature.
MX25L3239E datasheet is available at the following URL:
https://www.mxic.com.tw/Lists/Datasheet/Attachments/8613/MX25L3239E,%203V,%…
Change-Id: Ic7a848028fe937deb1bf83ef2a9dddf1330334b6
Signed-off-by: DanielZhang <danielzhang(a)mxic.com.cn>
---
M flashchips.c
M include/flashchips.h
2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/63/81563/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/81563?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ic7a848028fe937deb1bf83ef2a9dddf1330334b6
Gerrit-Change-Number: 81563
Gerrit-PatchSet: 2
Gerrit-Owner: DZ <danielzhang(a)mxic.com.cn>
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: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newpatchset
Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/81114?usp=email )
Change subject: classic_cli_manpage.rst: Update doc for custom_rst of raiden_debug_spi
......................................................................
classic_cli_manpage.rst: Update doc for custom_rst of raiden_debug_spi
Update technical details for custom_rst of raiden_debug_spi to help
users better understand their configuration options.
BUG=b:161745002
BRANCH=none
TEST=`meson compile -C testdir` and
view ./testdir/doc/html/classic_cli_manpage.html
Change-Id: Ie2b084a3ed9bf40f91bfa81dbc95ec69d99d5ad0
Signed-off-by: Hsuan Ting Chen <roccochen(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/81114
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M doc/classic_cli_manpage.rst
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
Anastasia Klimchuk: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/doc/classic_cli_manpage.rst b/doc/classic_cli_manpage.rst
index c46edf6..f40d19e 100644
--- a/doc/classic_cli_manpage.rst
+++ b/doc/classic_cli_manpage.rst
@@ -899,11 +899,19 @@
The servo device serial number can be found via ``lsusb``.
Raiden will poll the ``ap`` target waiting for the system power to settle on the AP and EC flash devices.
-The optional ``custom_rst=true`` parameter changes the timeout value from 3ms to 10ms::
+The optional ``custom_rst=true`` parameter alters the behavior of the reset process::
flashrom -p raiden_debug_spi:custom_rst=<true|false>
-syntax, where ``custom_rst=false`` is the implicit default timeout of 3ms. More information about the ChromiumOS servo
+syntax, where:
+
+``custom_rst=false`` is the implicit default timeout of 3ms
+
+and ``custom_rst=true`` set ``RAIDEN_DEBUG_SPI_REQ_ENABLE_AP_CUSTOM`` instead of ``RAIDEN_DEBUG_SPI_REQ_ENABLE_AP``.
+This custom reset will modify the timeout from 3ms to 10ms and will not set ``EC_RST_L``, meaning neither the EC nor the AP will be reset. With this setting, it's the user's responsibility to manage the reset signal manually or by configuring the GPIO.
+Failure to handle the reset signal appropriately will likely result in flashing errors.
+
+More information about the ChromiumOS servo
hardware is available at `servos website <https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/HEAD/do…>`_.
--
To view, visit https://review.coreboot.org/c/flashrom/+/81114?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ie2b084a3ed9bf40f91bfa81dbc95ec69d99d5ad0
Gerrit-Change-Number: 81114
Gerrit-PatchSet: 4
Gerrit-Owner: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Aarya, Alexander Goncharov, Nikolai Artemiev.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/81548?usp=email )
Change subject: erasure_layout: do not copy region buffers if they are null
......................................................................
Patch Set 1:
(1 comment)
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/81548/comment/84d5dcf4_1a0fb98d :
PS1, Line 263: old_start_buf = (uint8_t *)malloc(old_start - region_start);
: if (!old_start_buf) {
: msg_cerr("Not enough memory!\n");
: ret = -1;
: goto _end;
: }
: old_end_buf = (uint8_t *)malloc(region_end - old_end);
: if (!old_end_buf) {
: msg_cerr("Not enough memory!\n");
: ret = -1;
: goto _end;
: }
Oh I think this piece is also somewhat relevant to the patch. I remember looking at this code with suspicion few times, but I always forgot to follow up. Thank you for finding time and cleaning that up!
The suspicion I had was that `old_start_buf` and `old_end_buf` are allocated for potentially 0 size (because `old_start - region_start` and `region_end - old_end` are checked later). And when they are 0 size they are not needed!
However allocating for 0 size, while not having any practical purpose, probably prevented `memcpy` below (at the `_end` label) from failing, because malloc linux lan page says
> If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free().
So I think this allocation should go under if conditions
`if (old_start - region_start)`
`if (region_end - old_end)`
because otherwise there is nothing to allocate
Do you think this can go in the same this patch?
--
To view, visit https://review.coreboot.org/c/flashrom/+/81548?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I99aad4119f9c11bea75e3419926cc833bc1f68c5
Gerrit-Change-Number: 81548
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)chromium.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 30 Mar 2024 08:30:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment