Attention is currently required from: Nico Huber, Edward O'Callaghan, Nikolai Artemiev, Anastasia Klimchuk.
Hello build bot (Jenkins), Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58474
to look at the new patch set (#4).
Change subject: [RFC] writeprotect, cli_classic: create writeprotect foundation
......................................................................
[RFC] writeprotect, cli_classic: create 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 reused.
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/4
--
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: 4
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: 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: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.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: Nico Huber, Edward O'Callaghan, Nikolai Artemiev, Anastasia Klimchuk.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58474 )
Change subject: [RFC] writeprotect, cli_classic: create new writeprotect foundation
......................................................................
Patch Set 3:
(7 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/58474/comment/82cec5c7_98313ad8
PS3, Line 691: bool
const bool
https://review.coreboot.org/c/flashrom/+/58474/comment/aec7d380_20132477
PS3, Line 695: |
nit: missing space before `|`
For another patch: Shouldn't these be short-circuiting logical OR `||` instead? The `|` is a bit-wise OR.
File writeprotect.h:
https://review.coreboot.org/c/flashrom/+/58474/comment/1a1c8be6_23a423db
PS3, Line 21: #define MAX_WP_RANGES 128
Why 128?
https://review.coreboot.org/c/flashrom/+/58474/comment/b002f482_20525797
PS3, Line 31: uint32_t
Missing header include
https://review.coreboot.org/c/flashrom/+/58474/comment/0cdc4625_85f25602
PS3, Line 36: bool
Missing header include
https://review.coreboot.org/c/flashrom/+/58474/comment/04361dc1_7ea9eb1f
PS3, Line 38: size_t
Missing header include
File writeprotect.c:
PS3:
I find it hard to evaluate an interface without seeing its implementation. I think it would be better to remove everything in one commit, then gradually (re)implement the write-protect functionality in subsequent patches.
I imagine the reason to go with this approach is to minimize changes in cli_classic.c code, especially if the CLI remains the same. I understand that removing and re-adding the CLI code is cumbersome, but I don't think it's that much effort to do.
I'd like to know what others think about this.
--
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: 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: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Mon, 25 Oct 2021 10:13:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58518 )
Change subject: Makefile: remove NEED_LIBUSB1 from FEATURE_CFLAGS
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/58518
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie7cb3df39daf22cb954186d38ba32812b05d92f9
Gerrit-Change-Number: 58518
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Mon, 25 Oct 2021 09:31:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/58451 )
Change subject: Makefile: unify the use of filter
......................................................................
Makefile: unify the use of filter
Make a filter statement easier to read and fix some cosmetics.
Change-Id: I6cd1e169b435cadb06423836cd9d64cdd2f51a94
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58451
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M Makefile
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/Makefile b/Makefile
index 18651bc..e8bf8fc 100644
--- a/Makefile
+++ b/Makefile
@@ -235,7 +235,7 @@
endif
# Android is handled internally as separate OS, but it supports about the same drivers as Linux.
-ifeq ($(filter $(TARGET_OS),Linux Android), )
+ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Linux Android))
$(call mark_unsupported,CONFIG_LINUX_MTD CONFIG_LINUX_SPI)
$(call mark_unsupported,CONFIG_MSTARDDC_SPI CONFIG_LSPCON_I2C_SPI CONFIG_REALTEK_MST_I2C_SPI)
endif
@@ -250,7 +250,7 @@
endif
# Disable the internal programmer on unsupported architectures (everything but x86 and mipsel)
-ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN))
+ifneq ($(ARCH)-little, $(filter $(ARCH), x86 mips)-$(ENDIAN))
$(call mark_unsupported,CONFIG_INTERNAL)
endif
@@ -272,7 +272,7 @@
# Additionally disable all drivers needing raw access (memory, PCI, port I/O)
# on architectures with unknown raw access properties.
# Right now those architectures are alpha hppa m68k sh s390
-ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc))
+ifneq ($(ARCH), $(filter $(ARCH), x86 mips ppc arm sparc arc))
$(call mark_unsupported,CONFIG_GFXNVIDIA CONFIG_SATASII CONFIG_ATAVIA)
$(call mark_unsupported,CONFIG_DRKAISER CONFIG_NICINTEL CONFIG_NICINTEL_SPI)
$(call mark_unsupported,CONFIG_NICINTEL_EEPROM CONFIG_OGP_SPI CONFIG_IT8212)
@@ -805,7 +805,7 @@
FEATURE_CFLAGS += -D'NEED_LIBUSB1=1'
PROGRAMMER_OBJS += usbdev.o usb_device.o
# FreeBSD and DragonflyBSD use a reimplementation of libusb-1.0 that is simply called libusb
-ifeq ($(TARGET_OS),$(filter $(TARGET_OS),FreeBSD DragonFlyBSD))
+ifeq ($(TARGET_OS), $(filter $(TARGET_OS), FreeBSD DragonFlyBSD))
USB1LIBS += -lusb
else
ifeq ($(TARGET_OS),NetBSD)
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/flashrom/+/58451
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6cd1e169b435cadb06423836cd9d64cdd2f51a94
Gerrit-Change-Number: 58451
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/58484
to look at the new patch set (#3).
Change subject: [RFC] writeprotect: implement wp_print_status() and wp_list_ranges()
......................................................................
[RFC] writeprotect: implement wp_print_status() and wp_list_ranges()
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{list,status}
BRANCH=none
Change-Id: I82441c60c239a5b947b5a2a87b61e7bdf60bee89
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M writeprotect.c
1 file changed, 72 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/84/58484/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58484
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I82441c60c239a5b947b5a2a87b61e7bdf60bee89
Gerrit-Change-Number: 58484
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/+/58483
to look at the new patch set (#3).
Change subject: [RFC] writeprotect: implement wp_get_mode() and wp_set_mode()
......................................................................
[RFC] writeprotect: implement wp_get_mode() and wp_set_mode()
BUG=b:195381327,b:153800563
TEST=flashrom --wp-{enable,disable,status}
BRANCH=none
Change-Id: I7b68e940f0e1359281806c98e1da119b4caf8405
Signed-off-by: Nikolai Artemiev <nartemiev(a)google.com>
---
M writeprotect.c
1 file changed, 77 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/58483/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/58483
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7b68e940f0e1359281806c98e1da119b4caf8405
Gerrit-Change-Number: 58483
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset