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: Brian Norris.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79060?usp=email )
The change is no longer submittable: All-Comments-Resolved is unsatisfied now.
Change subject: fmap: Update major/minor version check
......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/79060/comment/873dd0ba_d6b35c69 :
PS2, Line 9: It's not valid to separately check the major and minor versions. The
: proper minor check would be something like:
:
: if (fmap->ver_major == FMAP_VER_MAJOR &&
: fmap->ver_minor > FMAP_VER_MINOR)
Brian, I like this idea! Maybe you can move the code from commit message into the code? :)
I looked into the chromiumos patch you linked, it still checks both major and minor versions.
The diff I see is that the check is more strict (both major and minor version expected to be exact equal) while initial fmap.c checks that the versions are not greater than.
I can agree to make the check more strict, but I don't see why checking minor version has to be dropped, I think it can stay?
I admit I haven't looked into cbfstool code, is there a way you can link a relevant piece? (if you think it's useful. if not then not)
Patchset:
PS2:
> Hi Anastasia: […]
Sure, I am having a look! I added one comment.
I didn't realise this patch is hanging without attention, sorry
--
To view, visit https://review.coreboot.org/c/flashrom/+/79060?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: I984835579d3b257a2462906f1f5091b179891bd0
Gerrit-Change-Number: 79060
Gerrit-PatchSet: 2
Gerrit-Owner: Brian Norris <briannorris(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Brian Norris <briannorris(a)chromium.org>
Gerrit-Comment-Date: Wed, 31 Jan 2024 09:37:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Evan Benn, Hsuan-ting Chen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79304?usp=email )
Change subject: flashrom_tester: Fix partial_lock_test on libflashrom
......................................................................
Patch Set 4: Code-Review+2
(2 comments)
Patchset:
PS3:
> Ed, Evan, thank you so much for reviews! Could you please vote on the patch?
Alright, it seems you are busy at the moment.
File util/flashrom_tester/flashrom/src/cmd.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/fb09e840_e2c6053e :
PS3, Line 301: // TODO
> From a syntax perspective: […]
Thank you for detailed explanation, I appreciate so much!
--
To view, visit https://review.coreboot.org/c/flashrom/+/79304?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: I7a8ac0c0984fef3cd9e73ed8d8097ddf429e54b2
Gerrit-Change-Number: 79304
Gerrit-PatchSet: 4
Gerrit-Owner: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: David Wu <david_wu(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Evan Benn <evanbenn(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)chromium.org>
Gerrit-Attention: Evan Benn <evanbenn(a)gmail.com>
Gerrit-Attention: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 31 Jan 2024 07:07:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Hsuan-ting Chen <roccochen(a)google.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk.
Hsuan-ting Chen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79060?usp=email )
Change subject: fmap: Update major/minor version check
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Hi Anastasia:
Could you help check if this is okay to submit?
Thanks!
--
To view, visit https://review.coreboot.org/c/flashrom/+/79060?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: I984835579d3b257a2462906f1f5091b179891bd0
Gerrit-Change-Number: 79060
Gerrit-PatchSet: 2
Gerrit-Owner: Brian Norris <briannorris(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 30 Jan 2024 09:07:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk, Edward O'Callaghan, Evan Benn.
Hsuan-ting Chen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79304?usp=email )
Change subject: flashrom_tester: Fix partial_lock_test on libflashrom
......................................................................
Patch Set 4:
(1 comment)
File util/flashrom_tester/flashrom/src/cmd.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/96ba8561_f2faa87d :
PS3, Line 301: // TODO
From a syntax perspective:
In Rust, `pub trait Flashrom` is an interface that defines method signatures, such as `write_from_file()` and `wp_range()`.
We have two structs, `pub struct FlashromLib` (from `util/flashrom_tester/flashrom/src/flashromlib.rs`) and `pub struct FlashromCmd` (from `util/flashrom_tester/flashrom/src/cmd.rs`), that implement the `Flashrom` trait. This enables polymorphism.
To prevent runtime errors, both `FlashromLib` and `FlashromCmd` must implement the `fn set_flags()` method from the `Flashrom` trait.
---
From the `flashrom_tester`'s perspective:
flashrom_tester supports two execution scenarios: "cmd" and "lib".
lib: In this scenario, a `flashrom_lib` instance is created at the beginning of the test. Its constructor (link to constructor: [gerrit]( https://review.coreboot.org/c/flashrom/+/79304/4/util/flashrom_tester/src/t… should set default flags that will be used by all commands with `set_flags()`.
cmd: Methods are interpreted as sequences of flashrom commands. Each command resets flags to default values (link to cli_classic: [github](https://github.com/flashrom/flashrom/blob/main/cli_classic.c#L1226)). Therefore, no action is needed within set_flags().
---
> I am not sure whether we get votes from Ed and Evan, maybe not, I will try to finish review by myself, so that's why I am having questions :)
Thanks! I am not deeply familiar with `flashrom_tester` or Rust either, but I'll try to answer all the further questions.
--
To view, visit https://review.coreboot.org/c/flashrom/+/79304?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: I7a8ac0c0984fef3cd9e73ed8d8097ddf429e54b2
Gerrit-Change-Number: 79304
Gerrit-PatchSet: 4
Gerrit-Owner: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: David Wu <david_wu(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Evan Benn <evanbenn(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)chromium.org>
Gerrit-Attention: Evan Benn <evanbenn(a)gmail.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 30 Jan 2024 08:27:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hsuan-ting Chen <roccochen(a)google.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk, Angel Pons, David Hendricks.
Kevin Yu has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79340?usp=email )
Change subject: Add Idaville platform into chipset enable list and add update IRC region support
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS6:
> Hi Anastasia […]
Hi Anastasia
Reference documentation
618610_Intel_Xeon_Processor_Family_D-2700_EDSVol_1_Rev2p0.pdf - Section 41.1.6 Firmware Components
631913_Xeon_D-1700_2700_SPI_PG_Rev2_0.pdf - Section 4.3 Region Access Control
intel-sps-5-0-me-bios-interface-575642-rev1-8.pdf - 4.15.2.9 Dual iRC Update Support
iRC – Intelligent Reset Controller
iRC is a regional firmware for the Intel BIOS Firmware for Mehlow, Idaville and Jacobsville platforms.
iRC is stored in Region 13 which is split in two even sections: active image and backup image. On startup higher version is chosen to by applied.
This means that the status of the two region is not fixed. The higher version area will become the active image and the other region will become the backup image.
According to #631913 SPI programming guide and ME 5.0 spec description, in addition to giving Region 13 read and write permissions, updating iRC must also unlock iRC through Host ME Region Flash Protection Override (HMRFPO) HECI commands, otherwise iRC will not be writable.
According to iRC Update Flow, the HMRFPO command will only unlock the backup image and can only update the backup image each time. The active image cannot be written.
So for iRC, the submitted changes are divided into the following two parts:
1. Trigger HMRFPO command before updating iRC. HMRFPO command needs to be executed by BIOS Firmware, and flashrom needs to cooperate with BIOS to trigger the command to unlock before updating.
2. Skip errors caused by active image writing failure and continue updating other regions. Since the active image is not writable, during the erasing, writing and verification processes, an error will occur in the active image, causing the flashrom to end its operation.
The revised commit has put the changes to the erase and write parts into ich_hwseq_wait_for_cycle_complete() of ichspi.c.
But the changes to the validation part are still in flashrom.c's compare_range(), which doesn't seem to be transferable to ichspi.c.
Thanks
KevinYu
--
To view, visit https://review.coreboot.org/c/flashrom/+/79340?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: Icc526b22a9efc8071e972bb1d8cfc51d6a83651b
Gerrit-Change-Number: 79340
Gerrit-PatchSet: 6
Gerrit-Owner: Kevin Yu <ykevin(a)celestica.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 30 Jan 2024 03:20:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Kevin Yu <ykevin(a)celestica.com>
Gerrit-MessageType: comment
Attention is currently required from: Alexander Goncharov, Anastasia Klimchuk, Angel Pons, Nikolai Artemiev, Stefan Reinauer, Thomas Heijligen.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/80205?usp=email )
Change subject: doc: Add docs how to add and update test status of flashchips
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/80205?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: I8dde689f2a0430ae10d3fa68bee727c5a9d70aec
Gerrit-Change-Number: 80205
Gerrit-PatchSet: 4
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
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: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sun, 28 Jan 2024 22:28:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment