Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58481
to look at the new patch set (#3).
Change subject: [RFC] writeprotect: implement wp_get_ranges()
......................................................................
[RFC] writeprotect: implement wp_get_ranges()
Add a function that generates a list of available ranges by enumerating
all possible values for bits that can affect the range and using the
chip's range decoding function to get the associated ranges.
The range list is sorted deterministically and deduplicated, ensuring
that only one wp_chip_state is associated with each supported range.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-list
BRANCH=none
Change-Id: Id51f038f03305c8536d80313e52f77d27835f34d
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M writeprotect.c
1 file changed, 112 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/81/58481/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58481
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id51f038f03305c8536d80313e52f77d27835f34d
Gerrit-Change-Number: 58481
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58480
to look at the new patch set (#4).
Change subject: [RFC] writeprotect: add range decoding functions
......................................................................
[RFC] writeprotect: add range decoding functions
This patch adds a pointer to `struct flashchip` for a function that maps
`struct wp_chip_state` to a `struct wp_range`. This provides the ability
to determine what protection ranges will be activated by particular
status register values.
The patch also implements a range decoding function for the example
chips. Many other chips can also be handled by it, though some will
require new additional functions (e.g. MX25L6406).
Another approach that has been tried in cros flashrom is to maintain
tables of range data for each chip, but it is very error prone and
quickly becomes hard to validate. Using functions to interpret the
ranges allows compact encoding for most chips and is flexible enough to
handle chips without predictable ranges as well.
BUG=b:195381327,b:153800563
TEST=dumped range tables, checked against datasheets
BRANCH=none
Change-Id: Id163ed80938a946a502ed116e48e8236e36eb203
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M Makefile
M chipdrivers.h
M flash.h
M flashchips.c
M meson.build
M writeprotect.c
A writeprotect_ranges.c
7 files changed, 111 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/58480/4
--
To view, visit https://review.coreboot.org/c/flashrom/+/58480
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id163ed80938a946a502ed116e48e8236e36eb203
Gerrit-Change-Number: 58480
Gerrit-PatchSet: 4
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58479
to look at the new patch set (#3).
Change subject: [RFC] writeprotect: add functions to read and write wp_chip_state
......................................................................
[RFC] writeprotect: add functions to read and write wp_chip_state
The functions map between register values and `struct wp_chip_state`
using the chip's register bit map. All currently supported chips can be
handled with a single pair of read/write functions, though an option for
chips to override them might be necessary in the future.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
BRANCH=none
Change-Id: I3ad25708c3321b8fb0216c3eaf6ffc07616537ad
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M writeprotect.c
1 file changed, 132 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/79/58479/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58479
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3ad25708c3321b8fb0216c3eaf6ffc07616537ad
Gerrit-Change-Number: 58479
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58478
to look at the new patch set (#3).
Change subject: [RFC] writeprotect: add structure to represent chip wp state
......................................................................
[RFC] writeprotect: add structure to represent chip wp state
This patch adds `struct wp_chip_state` to represent the writeprotect
configuration of a chip. It will be used as a common representation
throughout wp code for the current state of a chip as well as the
modifications that should be written back to a chip.
This allows operations that query a chip's wp configuration to reuse the
read function and operations that modify the wp configuration to reuse
the read and write functions.
Supporting other chips may require additional fields to be added to the
structure.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
BRANCH=none
Change-Id: I17dee630248ce7b51e624a6e46d7097d5d0de809
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M writeprotect.c
M writeprotect.h
2 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/78/58478/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58478
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I17dee630248ce7b51e624a6e46d7097d5d0de809
Gerrit-Change-Number: 58478
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58477
to look at the new patch set (#3).
Change subject: [RFC] flashchips: add writeprotect bit layout map to chips
......................................................................
[RFC] flashchips: add writeprotect bit layout map to chips
This patch adds a register bit map `struct flashchip`, with fields for
storing the register, bit index, and writability of each bit that
affects the chip's write protection. This allows writeprotect code to be
independent of the register layout of any specific chip. The new fields
have been filled out for example chips.
The representation is centered around describing how bits can be
accessed and modified, rather than the layout of registers. This is
generally easier to work with in code that needs to access specific bits
and typically requires specifying the locations of fewer bits overall.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
BRANCH=none
Change-Id: Id08d77e6d4ca5109c0d698271146d026dbc21284
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M flash.h
M flashchips.c
2 files changed, 71 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/77/58477/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id08d77e6d4ca5109c0d698271146d026dbc21284
Gerrit-Change-Number: 58477
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58475
to look at the new patch set (#3).
Change subject: [RFC] spi25_statusreg: make register read/write functions generic
......................................................................
[RFC] spi25_statusreg: make register read/write functions generic
This patch adds new spi_{read,write}_register() functions that take the
source/destination register as an argument. Currently they can only
access SR1, support for other registers will be added in another patch.
Since we're refactoring things, this commit also makes
spi_read_register() return an error code, making it possible to identify
error conditions that spi_read_status_register() concealed.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
BRANCH=none
Change-Id: I0a3951bbf993f2d8d830143b29d3ce16cc6901d7
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M chipdrivers.h
M flash.h
M spi25_statusreg.c
3 files changed, 80 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/75/58475/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58475
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0a3951bbf993f2d8d830143b29d3ce16cc6901d7
Gerrit-Change-Number: 58475
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58474
to look at the new patch set (#3).
Change subject: [RFC] writeprotect, cli_classic: create new writeprotect foundation
......................................................................
[RFC] writeprotect, cli_classic: create new writeprotect foundation
This is the first of a series of commits that adds working writeprotect
support to flashrom. It deletes most writeprotect code previously
extracted from the cros tree as not much of it can be adapted to the
new implementation.
This commit also revises the writeprotect interface to reduce
duplication and make writeprotect functionality easier to expose through
libflashrom. Call sites in cli_classic have been updated.
The patch series initially adds support for a small set of chips as
examples. These are: GD25LQ128, GD25Q32, GD25Q64, GD25Q256, MX25L2006E,
and W25X40. Writeprotect commands have been tested with all chips.
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series
BRANCH=none
Change-Id: I67e9b31f86465e5a8f7d3def637198671ee818a8
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M cli_classic.c
M flash.h
M writeprotect.c
M writeprotect.h
4 files changed, 80 insertions(+), 420 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/74/58474/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58474
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I67e9b31f86465e5a8f7d3def637198671ee818a8
Gerrit-Change-Number: 58474
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nico Huber, Thomas Heijligen, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/57918 )
Change subject: tests: Add init-shutdown test for raiden_debug_spi
......................................................................
Patch Set 7:
(1 comment)
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/57918/comment/13cdc391_311da288
PS6, Line 57: ss
Thanks so much for explanations! Things are now more clear in my head.
> If we want to use Meson for the tests, it might be better if
> somebody took over maintenance for it right now.
Yes. This can be me! (unless someone else disagrees)
I fully agree warning options should be the same. I created an experiment CB:58561. It does not build of course, because it uncovered a hundred of warnings, and they are treated as errors. I need to gradually fix all those warning in separate patches, it will take a while, but CB:58561 is convenient way to describe what I am thinking.
> The `Makefile` also has a switch `WARNERROR` that defaults to `yes`. We
> could have something similar for the tests that may default to `no` if
> you prefer but would be enable by `test_build.sh` for the CI?
I thought about it, and I thought it's better to treat warnings as errors by default, same way as makefile is doing (less error-prone). I can disable the flag locally if needed.
It's really good this topic came up.
Speaking about this patch (raiden test), let me know if there is anything else to do. I am brewing something interesting for init-shutdown! :) but I want to have this one be completed/merged first.
--
To view, visit https://review.coreboot.org/c/flashrom/+/57918
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I880a8637ab02de179df9169c1898230bce4dc1c7
Gerrit-Change-Number: 57918
Gerrit-PatchSet: 7
Gerrit-Owner: 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: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 25 Oct 2021 04:51:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/58561 )
Change subject: [WIP] Add -W options from Makefile into meson warning_flags
......................................................................
[WIP] Add -W options from Makefile into meson warning_flags
Lots of new warnings in tests/ and ich_descriptors_tool, and since
warnings are now treated as errors, the patch does not build. Which
is totally as expected.
EXPERIMENTAL, WORK IN PROGRESS
Change-Id: Id401bfd642dc3c13d85bd9a2dba56ada38714c25
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M meson.build
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/61/58561/1
diff --git a/meson.build b/meson.build
index 86657ce..965e905 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,11 @@
'-Wno-address-of-packed-member',
'-Wno-enum-conversion',
'-Wno-missing-braces',
+ '-Werror',
+ '-Wall',
+ '-Wextra',
+ '-Wshadow',
+ '-Wmissing-prototypes',
]
conf = configuration_data()
--
To view, visit https://review.coreboot.org/c/flashrom/+/58561
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id401bfd642dc3c13d85bd9a2dba56ada38714c25
Gerrit-Change-Number: 58561
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange