Attention is currently required from: Peter Marheine.
Hello Anastasia Klimchuk, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/82238?usp=email
to look at the new patch set (#2).
Change subject: MAINTAINERS: add Peter Marheine for build system
......................................................................
MAINTAINERS: add Peter Marheine for build system
Change-Id: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Signed-off-by: Peter Marheine <pmarheine(a)chromium.org>
---
M MAINTAINERS
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/38/82238/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/82238?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: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Gerrit-Change-Number: 82238
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nikolai Artemiev, Stefan Reinauer, Victor Lim.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/82190?usp=email )
Change subject: flashchips: Add (or update) chip models
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Thank you providing links to datasheets, this is very useful!
Now, you need to combine the information from your first patch CB:81970 and this one, and split your work into smaller commits.
One important thing is: we are adding model IDs in flashchips.h in the same commit where we add chip definition.
So, you can now try to create a patch with, for example GD25LB128E, GD25LQ128E, GD25LR128E in one patch, together with its IDs in flashchips.h, and then send that patch. I will review it, and when it's ready, you will do the same for the next group of chips, and so on. So we will add all chips, step by step!
Leave you first two patch (this and previous one), don't delete them now, they are still useful since they get all info, it's just need to be split. (We will clean up later).
--
To view, visit https://review.coreboot.org/c/flashrom/+/82190?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: I60b3d3b1cf8890c5d6fb13d76a2fe800b1ffaffc
Gerrit-Change-Number: 82190
Gerrit-PatchSet: 1
Gerrit-Owner: Victor Lim <victorswlim(a)yahoo.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 <victorswlim(a)yahoo.com>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Thu, 09 May 2024 13:14:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: DZ, Nikolai Artemiev, Stefan Reinauer.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/81838?usp=email )
Change subject: flashchips: Add support for MXIC MX25R4035F
......................................................................
Patch Set 5: Code-Review+1
(1 comment)
Patchset:
PS3:
> This is currently in "Merge conflict" state (you can see in the left top corner). […]
So there the other patch CB:81839 is ready, but they both modify the same line 544 in flashchips.h so after CB:81839 is submitted, you will need to rebase this one again.
Other than that it's all good in this patch. Thank you for your work!
--
To view, visit https://review.coreboot.org/c/flashrom/+/81838?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: I91dbc4735bf232e0b1dce72c7f06be967d35ebfb
Gerrit-Change-Number: 81838
Gerrit-PatchSet: 5
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: DZ <danielzhang(a)mxic.com.cn>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Thu, 09 May 2024 11:18:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: DZ, Nikolai Artemiev, Stefan Reinauer.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/81839?usp=email )
Change subject: flashchips: Add support for MXIC MX25R2035F
......................................................................
Patch Set 10: Code-Review+2
(1 comment)
Patchset:
PS6:
> This is currently in "Merge conflict" state (you can see in the left top corner). […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/81839?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: I00e76ef942976e3e102cf71fe695c6287b392b64
Gerrit-Change-Number: 81839
Gerrit-PatchSet: 10
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: DZ <danielzhang(a)mxic.com.cn>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Thu, 09 May 2024 11:13:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Peter Marheine.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/82238?usp=email )
Change subject: MAINTAINERS: add pmarheine for build system
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Thank you! :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/82238?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: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Gerrit-Change-Number: 82238
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Thu, 09 May 2024 10:56:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Peter Marheine.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/82238?usp=email )
Change subject: MAINTAINERS: add pmarheine for build system
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/82238/comment/03bf97a3_e8db46d3 :
PS1, Line 7: pmarheine
Peter Marheine
(we use FirstName LastName for commit titles for this file)
--
To view, visit https://review.coreboot.org/c/flashrom/+/82238?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: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Gerrit-Change-Number: 82238
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Thu, 09 May 2024 10:56:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/82181?usp=email )
Change subject: doc: Add user doc with links to ChromeOS documents
......................................................................
doc: Add user doc with links to ChromeOS documents
Change-Id: If7b06c077b34f73bc6c33f617332dfc32b982c12
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/82181
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Hsuan-ting Chen <roccochen(a)google.com>
---
A doc/user_docs/chromebooks.rst
M doc/user_docs/index.rst
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Hsuan-ting Chen: Looks good to me, approved
diff --git a/doc/user_docs/chromebooks.rst b/doc/user_docs/chromebooks.rst
new file mode 100644
index 0000000..feb333b
--- /dev/null
+++ b/doc/user_docs/chromebooks.rst
@@ -0,0 +1,8 @@
+=============================
+Documentation for Chromebooks
+=============================
+
+Below is the list of documents and pages that can be useful if you use flashrom on ChromeOS.
+Note these documents are external to flashrom and maintained outside of upstream flashrom tree.
+
+* `Write protection <https://www.chromium.org/chromium-os/developer-library/reference/security/w…>`_
diff --git a/doc/user_docs/index.rst b/doc/user_docs/index.rst
index b4cca34..5bc93d1 100644
--- a/doc/user_docs/index.rst
+++ b/doc/user_docs/index.rst
@@ -6,3 +6,4 @@
fw_updates_vs_spi_wp
example_partial_wp
+ chromebooks
--
To view, visit https://review.coreboot.org/c/flashrom/+/82181?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: If7b06c077b34f73bc6c33f617332dfc32b982c12
Gerrit-Change-Number: 82181
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Hsuan-ting Chen <roccochen(a)google.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-MessageType: merged
Peter Marheine has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/82238?usp=email )
Change subject: MAINTAINERS: add pmarheine for build system
......................................................................
MAINTAINERS: add pmarheine for build system
Change-Id: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Signed-off-by: Peter Marheine <pmarheine(a)chromium.org>
---
M MAINTAINERS
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/38/82238/1
diff --git a/MAINTAINERS b/MAINTAINERS
index 97b6038..f4e0c9a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -78,6 +78,7 @@
BUILD SYSTEM
M: Thomas Heijligen <src(a)posteo.de>
+M: Peter Marheine <pmarheine(a)chromium.org>
S: Maintained
F: Makefile*
F: meson*
--
To view, visit https://review.coreboot.org/c/flashrom/+/82238?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: Ibae0c006b293dad85a9571ec8e7081a6396bc7ce
Gerrit-Change-Number: 82238
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newchange
Peter Marheine has submitted this change. ( https://review.coreboot.org/c/flashrom/+/81606?usp=email )
Change subject: Make sleep threshold for delays configurable
......................................................................
Make sleep threshold for delays configurable
This allows the minimum time that default_delay() will choose to sleep
for instead of polling to be configured at build-time. The default
remains unchanged at 100 milliseconds for now.
The test's correctness has been checked by testing with minimum sleep
time left at its default and set to a non-default value smaller than 100
microseconds (both pass without sleeping, verified with strace) and with
the minimum sleep time set to 0 (causing the test to be skipped). The
configured value from the macro needs to be stored in a const to avoid
-Werror=type-limits errors when configured to be zero.
Change-Id: Ida96e0816ac914ed69d6fd82ad90ebe89cdef1cc
Signed-off-by: Peter Marheine <pmarheine(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/81606
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M Makefile
M meson.build
M meson_options.txt
M tests/udelay.c
M udelay.c
M udelay_dos.c
6 files changed, 38 insertions(+), 10 deletions(-)
Approvals:
build bot (Jenkins): Verified
Anastasia Klimchuk: Looks good to me, approved
diff --git a/Makefile b/Makefile
index 9b94e22..97f56b8 100644
--- a/Makefile
+++ b/Makefile
@@ -542,6 +542,11 @@
# Disable wiki printing by default. It is only useful if you have wiki access.
CONFIG_PRINT_WIKI ?= no
+# Minimum time in microseconds to suspend execution for (rather than polling)
+# when a delay is required. Larger values may perform better on machines with
+# low timer resolution, at the cost of increased power.
+CONFIG_DELAY_MINIMUM_SLEEP_US ?= 100000
+
# Disable all features if CONFIG_NOTHING=yes is given unless CONFIG_EVERYTHING was also set
ifeq ($(CONFIG_NOTHING), yes)
ifeq ($(CONFIG_EVERYTHING), yes)
@@ -587,6 +592,7 @@
endif
FEATURE_FLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="$(CONFIG_DEFAULT_PROGRAMMER_ARGS)"'
+FEATURE_FLAGS += -D'CONFIG_DELAY_MINIMUM_SLEEP_US=$(CONFIG_DELAY_MINIMUM_SLEEP_US)'
################################################################################
diff --git a/meson.build b/meson.build
index c4d7717..458b6e8 100644
--- a/meson.build
+++ b/meson.build
@@ -112,6 +112,9 @@
delay_src = files('udelay_dos.c')
endif
srcs += delay_src
+cargs += ['-DCONFIG_DELAY_MINIMUM_SLEEP_US=@0@'.format(
+ get_option('delay_minimum_sleep_us')
+)]
# check for required symbols
if cc.has_function('clock_gettime')
diff --git a/meson_options.txt b/meson_options.txt
index e62deb6..8a04114 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -22,3 +22,6 @@
option('documentation', type : 'feature', value : 'auto', description : 'build the html documentation')
option('ni845x_search_path', type : 'string', value : 'C:\Program Files (x86)\National Instruments\Ni-845x\MS Visual C',
description : 'Path to search for the proprietary ni845x library and header (32-bit Windows only)')
+option('delay_minimum_sleep_us', type : 'integer', min : 0, value : 100000,
+ description : 'Minimum time in microseconds to suspend execution for (rather than polling) when a delay is required.'
+ + ' Larger values may perform better on machines with low timer resolution, at the cost of increased power.')
diff --git a/tests/udelay.c b/tests/udelay.c
index 277a15d..8d24b00 100644
--- a/tests/udelay.c
+++ b/tests/udelay.c
@@ -34,6 +34,8 @@
#endif
}
+static const int64_t min_sleep = CONFIG_DELAY_MINIMUM_SLEEP_US;
+
/*
* A short delay should delay for at least as long as requested,
* and more than 10x as long would be worrisome.
@@ -43,9 +45,21 @@
* test.
*/
void udelay_test_short(void **state) {
+ /*
+ * Delay for 100 microseconds, or short enough that we won't sleep.
+ * It's not useful to test the sleep path because we assume the OS won't
+ * sleep for less time than we ask.
+ */
+ int64_t delay_us = 100;
+ if (delay_us >= min_sleep)
+ delay_us = min_sleep - 1;
+ /* No point in running this test if delay always sleeps. */
+ if (delay_us <= 0)
+ skip();
+
uint64_t start = now_us();
- default_delay(100);
+ default_delay(delay_us);
uint64_t elapsed = now_us() - start;
- assert_in_range(elapsed, 100, 1000);
+ assert_in_range(elapsed, delay_us, 10 * delay_us);
}
diff --git a/udelay.c b/udelay.c
index 453cb34..c43b6e3 100644
--- a/udelay.c
+++ b/udelay.c
@@ -92,14 +92,15 @@
#endif
}
+static const unsigned min_sleep = CONFIG_DELAY_MINIMUM_SLEEP_US;
+
/* Precise delay. */
void default_delay(unsigned int usecs)
{
- /* If the delay is >0.1 s, use internal_sleep because timing does not need to be so precise. */
- if (usecs > 100000) {
- internal_sleep(usecs);
- } else {
+ if (usecs < min_sleep) {
clock_usec_delay(usecs);
+ } else {
+ internal_sleep(usecs);
}
}
diff --git a/udelay_dos.c b/udelay_dos.c
index 61493fc..c3914ea 100644
--- a/udelay_dos.c
+++ b/udelay_dos.c
@@ -153,19 +153,20 @@
usleep(usecs % 1000000);
}
+static const unsigned min_sleep = CONFIG_DELAY_MINIMUM_SLEEP_US;
+
/* Precise delay. */
void default_delay(unsigned int usecs)
{
static bool calibrated = false;
- /* If the delay is >0.1 s, use internal_sleep because timing does not need to be so precise. */
- if (usecs > 100000) {
- internal_sleep(usecs);
- } else {
+ if (usecs < min_sleep) {
if (!calibrated) {
myusec_calibrate_delay();
calibrated = true;
}
myusec_delay(usecs);
+ } else {
+ internal_sleep(usecs);
}
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/81606?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: Ida96e0816ac914ed69d6fd82ad90ebe89cdef1cc
Gerrit-Change-Number: 81606
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged