Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58480 )
Change subject: [RFC] flashchips, writeprotect_ranges: add range decoding function
......................................................................
Patch Set 8:
(2 comments)
File writeprotect_ranges.c:
https://review.coreboot.org/c/flashrom/+/58480/comment/a8a45e4e_154f4f85
PS7, Line 20: TODO
> Need new line before TODO.
Done
https://review.coreboot.org/c/flashrom/+/58480/comment/9eb84193_5f71d849
PS7, Line 91:
> Probably can remove empty line at the end? (line 91)
Done
--
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: 8
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 04 Nov 2021 01:27:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58479 )
Change subject: [RFC] writeprotect: add functions to read and write wp_chip_state
......................................................................
Patch Set 7:
(3 comments)
File writeprotect.c:
https://review.coreboot.org/c/flashrom/+/58479/comment/11276b83_372f1b8d
PS6, Line 26: print_wp_chip_state
> You can move print_wp_chip_state here on the top, and avoid forward declaration.
I think it's a bit nicer to keep it with the other printing functions that get added at the bottom of the file.
Alternatively I can change it to a function that writes to a string and declare it in the header since that would be somewhat useful for wp users.
https://review.coreboot.org/c/flashrom/+/58479/comment/32435360_69c2f8c5
PS6, Line 28: static int read_reg_bit(
: const struct flashctx *flash,
: const struct reg_bit_info bit,
: uint8_t *value,
: bool *present)
> Just to check: does this not fit into 112 chars? It really helps to grep when all parameters are on […]
Done
https://review.coreboot.org/c/flashrom/+/58479/comment/7a1d6e9f_42837122
PS6, Line 73: void *suppress_unused_warning_for_read_wp_chip_state = read_wp_chip_state;
> This merely avoids a warning about the `read_wp_chip_state()` function being unused. […]
I can move the read/write functions into another commit if it really would be easier to review them that way, but they are helper functions that get used in several places so they don't really belong with any other change.
They are also quite complicated but do a well defined task so I thought it would be easier to them review them on their own.
--
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: 7
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 04 Nov 2021 01:26:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58477 )
Change subject: [RFC] flashchips: add writeprotect bit layout map to chips
......................................................................
Patch Set 7:
(1 comment)
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/58477/comment/7df246c8_7891c80c
PS6, Line 6902:
> I know it's minor, but there is an empty line between chip definitions, maybe return it back?
Done
--
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: 7
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 04 Nov 2021 01:26:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58475 )
Change subject: [RFC] spi25_statusreg: make register read/write functions generic
......................................................................
Patch Set 7:
(2 comments)
File spi25_statusreg.c:
https://review.coreboot.org/c/flashrom/+/58475/comment/2d100b30_e2c5798c
PS6, Line 2: This file
> Meta-question: does the name of the file "spi25_statusreg. […]
You're right, it should probably be renamed at some point. But it still contains status register specific functions so it's probably best to leave it for now.
https://review.coreboot.org/c/flashrom/+/58475/comment/3581c498_8f9a4036
PS6, Line 32: WRSR
> WRSR is not hard-coded anymore in the second command below (as I understand), is this comment still […]
Done
--
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: 7
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 04 Nov 2021 01:26:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58474 )
Change subject: [RFC] writeprotect, cli_classic: delete old writeprotect code
......................................................................
Patch Set 7:
(6 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/58474/comment/f6d4906d_42d2dd36
PS6, Line 700: complete
> until support is fully implemented?
Done
https://review.coreboot.org/c/flashrom/+/58474/comment/8a5ac1dd_b27ef08f
PS6, Line 702: write protect is not supported on this flash chip
> is it not supported on this flash chip, or not supported in flashrom?
Most but not all chips support write protection, so usually it would be a lack of support in flashrom. I've changed the message a bit.
https://review.coreboot.org/c/flashrom/+/58474/comment/97fd6e4b_e469686e
PS6, Line 762: (void) wp_mode_opt;
: (void) wp_region;
> sorry maybe that's a silly question, but what these two lines are doing?
It's just for avoiding compiler warnings, I've added a comment.
File writeprotect.h:
https://review.coreboot.org/c/flashrom/+/58474/comment/1f2c1b84_a2bc8cb6
PS6, Line 24: WP_MODE_DISABLED,
: WP_MODE_HARDWARE,
: WP_MODE_POWER_CYCLE,
: WP_MODE_PERMANENT,
> Is there a reason the comments on enum values have been removed?
I'm not sure how much they explain what the modes actually do, but I've added them back for now.
File writeprotect.h:
https://review.coreboot.org/c/flashrom/+/58474/comment/72ee23b4_c3589d9a
PS3, Line 31: uint32_t
> Done - through flash.h. I can add explicit #includes for stdint.h and stdbool.h too though.
Marking resolved
File writeprotect.c:
https://review.coreboot.org/c/flashrom/+/58474/comment/b8d7aa22_6d1c8f8d
PS6, Line 18: #include <stdio.h>
: #include <stdlib.h>
: #include <string.h>
:
: #include "flash.h"
: #include "chipdrivers.h"
> Technically, these includes are not needed (since the code has been removed)?
We could get rid of them but they're not really doing any harm. And if I remove them now I'll probably mess up and forget to add them back in the right patches :)
--
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: 7
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 04 Nov 2021 01:25:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: comment
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 (#7).
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 cli_classic.c
M writeprotect.c
M writeprotect.h
3 files changed, 129 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/58483/7
--
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: 7
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Nikolai Artemiev.
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/+/58480
to look at the new patch set (#8).
Change subject: [RFC] flashchips, writeprotect_ranges: add range decoding function
......................................................................
[RFC] flashchips, writeprotect_ranges: add range decoding function
Allow chips to specify functions that map status register bits to
protection ranges. These are used to enumerate available ranges and
determine the protection state of chips. The patch also adds a range
decoding function for the example chips. Many other chips can also be
handled by it, though some will require different functions (e.g.
MX25L6406 and related chips).
Another approach that has been tried in cros flashrom is maintaining
tables of range data, but it quickly becomes error prone and hard to
validate.
Using a function to interpret the ranges allows compact encoding with
most chips and is flexible enough to allow chips with less predictable
ranges to be handled 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
A writeprotect_ranges.c
6 files changed, 111 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/58480/8
--
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: 8
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-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: newpatchset