Attention is currently required from: Nico Huber, Angel Pons, Nikolai Artemiev, Sergii Dmytruk.
Hello build bot (Jenkins), Nico Huber, Angel Pons, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/59072
to look at the new patch set (#15).
Change subject: dummyflasher: add SR2 emulation harness
......................................................................
dummyflasher: add SR2 emulation harness
Prepare everything for emulating SR2 for chips that have it.
This is needed for accessing second SRP bit which is involved in write
protection. The emulated register doesn't affect anything yet and will
be tested by write-protection tests.
Change-Id: I177ae3f068f03380f5b3941d9996a07205672e59
Signed-off-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
---
M dummyflasher.c
M flashrom.8.tmpl
2 files changed, 79 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/72/59072/15
--
To view, visit https://review.coreboot.org/c/flashrom/+/59072
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I177ae3f068f03380f5b3941d9996a07205672e59
Gerrit-Change-Number: 59072
Gerrit-PatchSet: 15
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
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: Maciej Pijanowski <maciej.pijanowski(a)3mdeb.com>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nico Huber, Angel Pons, Sergii Dmytruk.
Hello build bot (Jenkins), Nico Huber, Angel Pons, Nikolai Artemiev, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/59071
to look at the new patch set (#14).
Change subject: flashchips: enable write-protection for W25Q{64,128}.V
......................................................................
flashchips: enable write-protection for W25Q{64,128}.V
Configuration for W25Q64 was tested on hardware.
Emulation of W25Q128 in dummyflasher will be extended to support WP.
Haven't tested this one on hardware, but it's the same configuration as
for W25Q64.
Change-Id: Iccb69a8d3a0dd2192e2c938caddaf07b1889ed35
Signed-off-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
---
M flashchips.c
1 file changed, 22 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/71/59071/14
--
To view, visit https://review.coreboot.org/c/flashrom/+/59071
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iccb69a8d3a0dd2192e2c938caddaf07b1889ed35
Gerrit-Change-Number: 59071
Gerrit-PatchSet: 14
Gerrit-Owner: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Maciej Pijanowski <maciej.pijanowski(a)3mdeb.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Nikolai Artemiev.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58736 )
Change subject: ichspi: Extract handling programmer param into a function
......................................................................
Patch Set 1: Code-Review+2
(3 comments)
Patchset:
PS1:
Tested with Panther Point (7 series PCH).
File ichspi.c:
https://review.coreboot.org/c/flashrom/+/58736/comment/106d0bc0_59cbe342
PS1, Line 1760: *arg
Could be `*const arg`.
https://review.coreboot.org/c/flashrom/+/58736/comment/38374209_19f2ee28
PS1, Line 1776: arg);
Line break :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/58736
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I20e2379a6fd58c9346f0a2d6daf2b8decf1f6976
Gerrit-Change-Number: 58736
Gerrit-PatchSet: 1
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: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
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-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Wed, 15 Dec 2021 13:16:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Peter Marheine.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59278 )
Change subject: programmer.h: Make pacc global state static local
......................................................................
Patch Set 3:
(1 comment)
File programmer.h:
https://review.coreboot.org/c/flashrom/+/59278/comment/e21f2b88_3838eb07
PS3, Line 122: // FIXME: Fix chipset_enable.c usage and remove pcidev_set_pacc().
> Even if `pacc` no longer has global visibility, it's still global state. […]
The alternative would be to place a dedicated shutdown function around everything
that may encounter the naughty Intel spi dev. I originally decided against it,
because that would mean we have to avoid rpci_write* functions in places where
it's not obvious why we do that. For instance, we could end up placing a comment
above every affacted pci_write* call.
However, I'm not even sure if we can get rid of the `pacc` global without adding
parameters (no matter the Intel kludge). Which brings me to another awkward
solution: drop the whole rpci_write* infrastructure. I'm not sure if it solves
more problems than it invites. Eventually these functions would even need a
flashrom context parameter to register their shutdown things (because that's
also a place where we need to get rid of global state).
--
To view, visit https://review.coreboot.org/c/flashrom/+/59278
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3bea1b93a7ca81dd42a64eec1e49a10f1fbda850
Gerrit-Change-Number: 59278
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
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-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 13:06:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk, Nikolai Artemiev.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58735 )
Change subject: ichspi: Split very long init function into two
......................................................................
Patch Set 1: Code-Review+1
(6 comments)
Patchset:
PS1:
Looks quite nice overall, just one nit and a little whitspace.
Tested probe and read on Panther Point (7 series PCH). Data and
verbose logs look the same.
File ichspi.c:
https://review.coreboot.org/c/flashrom/+/58735/comment/ec6e3838_aa515ac0
PS1, Line 1717: msg_pdbg("0x00: 0x%04x (SPIS)\n",
: mmio_readw(spibar + 0));
: msg_pdbg("0x02: 0x%04x (SPIC)\n",
: mmio_readw(spibar + 2));
: msg_pdbg("0x04: 0x%08x (SPIA)\n",
: mmio_readl(spibar + 4));
: ichspi_bbar = mmio_readl(spibar + 0x50);
: msg_pdbg("0x50: 0x%08x (BBAR)\n",
: ichspi_bbar);
: msg_pdbg("0x54: 0x%04x (PREOP)\n",
: mmio_readw(spibar + 0x54));
: msg_pdbg("0x56: 0x%04x (OPTYPE)\n",
: mmio_readw(spibar + 0x56));
: msg_pdbg("0x58: 0x%08x (OPMENU)\n",
: mmio_readl(spibar + 0x58));
: msg_pdbg("0x5c: 0x%08x (OPMENU+4)\n",
: mmio_readl(spibar + 0x5c));
Please remove unnecessary line breaks. If you put tabs after the commas,
it might actually look nice ;)
https://review.coreboot.org/c/flashrom/+/58735/comment/1d39bf50_93feff6e
PS1, Line 1739: mmio_readl(spibar + offs), i);
I guess this also doesn't need a line break.
https://review.coreboot.org/c/flashrom/+/58735/comment/f45726dd_4cd8430c
PS1, Line 1836: arg);
Another unnecessary line break.
https://review.coreboot.org/c/flashrom/+/58735/comment/7d6cdd3a_1da3ce53
PS1, Line 1917: );
Drop line break?
https://review.coreboot.org/c/flashrom/+/58735/comment/90b8becc_bbe3a304
PS1, Line 2068: return 0;
You've replaced the `break` statements above with `return` ones. So this
can't be reached anymore. Would the compiler mind if we drop it?
--
To view, visit https://review.coreboot.org/c/flashrom/+/58735
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6789bc456a4878e6555831ae0b80ecbdbf62938b
Gerrit-Change-Number: 58735
Gerrit-PatchSet: 1
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: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Wed, 15 Dec 2021 12:54:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Peter Marheine.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59275 )
Change subject: pcidev: Avoid internal programmer relying on pacc global
......................................................................
Patch Set 3:
(2 comments)
File internal.c:
https://review.coreboot.org/c/flashrom/+/59275/comment/d5aeccf1_12ee4ee6
PS3, Line 41: temp = pcidev_scandev(&filter, NULL);
: for (; temp; temp = pcidev_scandev(&filter, temp)) {
I guess this could also be written as
while ((temp = pcidev_scandev(&filter, temp))
with `temp` initialized to `NULL`, ofc.
https://review.coreboot.org/c/flashrom/+/59275/comment/85f936f7_86d32eda
PS3, Line 43: if (pci_filter_match(&filter, temp)) {
That's what pcidev_scandev() does, isn't it?
--
To view, visit https://review.coreboot.org/c/flashrom/+/59275
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id83bfd41f785f907e52a65a6689e8c7016fc1b77
Gerrit-Change-Number: 59275
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
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-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 11:52:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59276 )
Change subject: pcidev: Move pci_get_dev() logic into canonical place
......................................................................
Patch Set 2:
(1 comment)
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/59276/comment/045fe97c_d68e8b3e
PS2, Line 162: OLD_PCI_GET_DEV
> Thomas already looked into this and the old version practically pre-dates […]
+1
Would be nice to have an minimum version for the library set in the build system. But that's not for this patch.
--
To view, visit https://review.coreboot.org/c/flashrom/+/59276
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id9ce055d5e5d347520ec5002b8c6548e60eaa0a7
Gerrit-Change-Number: 59276
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 11:46:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59279 )
Change subject: pcidev.c: Move pci_card_find() from internal to canonical place
......................................................................
Patch Set 1:
(2 comments)
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/59279/comment/b39d0a4c_1b37ac33
PS1, Line 188: uint16_t card_vendor, uint16_t card_device)
Please fix indentation.
File programmer.h:
https://review.coreboot.org/c/flashrom/+/59279/comment/a1eee550_feb4dfb7
PS1, Line 131: uint16_t card_vendor, uint16_t card_device);
IIRC, the rule was no line breaks in header files. To ease greppability.
--
To view, visit https://review.coreboot.org/c/flashrom/+/59279
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I026bfbecba114411728d4ad1ed8969b469fa7d2d
Gerrit-Change-Number: 59279
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 11:42:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk, Peter Marheine.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59278 )
Change subject: programmer.h: Make pacc global state static local
......................................................................
Patch Set 3:
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/59278/comment/31534fe5_25c0e780
PS3, Line 17: flow now.
IMO it becomes harder to read. Is there anything in
the queue ahead that follows up on this?
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/59278/comment/c655bd76_b997c0b4
PS3, Line 37: saved_pacc
This is not what one would expect. Usually the result of assignments
and setters is the assigned value.
--
To view, visit https://review.coreboot.org/c/flashrom/+/59278
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3bea1b93a7ca81dd42a64eec1e49a10f1fbda850
Gerrit-Change-Number: 59278
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 11:36:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59276 )
Change subject: pcidev: Move pci_get_dev() logic into canonical place
......................................................................
Patch Set 2:
(2 comments)
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/59276/comment/0471b29c_1a33d9a4
PS2, Line 162: OLD_PCI_GET_DEV
Thomas already looked into this and the old version practically pre-dates
libpci (as a library separate from pciutils). I asked to keep it until the
next release. But given that this won't happen anytime soon, I wouldn't
mind if we drop it right away.
File programmer.h:
https://review.coreboot.org/c/flashrom/+/59276/comment/0487862c_75d55356
PS2, Line 128: struct pci_dev *pcidev_getdev(struct pci_dev *dev);
The signature makes it very obvious that we already have a dev. How
about a more meaningful name, e.g. pcidev_clonedev()?
--
To view, visit https://review.coreboot.org/c/flashrom/+/59276
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id9ce055d5e5d347520ec5002b8c6548e60eaa0a7
Gerrit-Change-Number: 59276
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Dec 2021 11:31:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment