Attention is currently required from: Subrata Banik, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63584 )
Change subject: ichspi: Add support for Ice Lake
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/63584/comment/afd2d940_23a77e9a
PS1, Line 7: ichspi: Add support for Ice Lake
> Not sure what you mean by "undone" as those add legitimate new chipset support, seems like hyperbole.
I mean the enum additions should be undone. Not the chipset support that could
have been added with much less changes.
> I believe you mean to say there should be some refactors happening to help consolidate so many enum branches. As you pointed out Nico, you tried a number of times in the past and didn't manage to trivially do it.
Refactoring it might be difficult. Not adding unnecessary clutter is an
orthogonal problem.
>
> In any case, I actually did upload a start towards making progress in that direction in CB:63321 but it has been sitting unreviewed for a few weeks at the moment. I believe the theme of that patch can be applied to a few other places towards a direction of having most of the chipset static details in a lookup table and a switch.
>
> More careful review of SPI Programmer Guides between generations is required to find better common patterns.
Well, let me know if you found something that definitely makes things
better. In the meantime, please avoid unnecessary enum additions.
File chipset_enable.c:
https://review.coreboot.org/c/flashrom/+/63584/comment/e3617614_c50169ff
PS1, Line 2149: 0x34a4
> Subrata, flashrom can be used in "odd" situations when folks are porting coreboot to boards in the community. I think this is what Nico is alluding to here as to make flashrom as robust as possible to allow for flashing.
It's actually much simpler. We can avoid any regression by not removing the
valid LPC ID. Nothing about robustness. Just in case that 0x34a4 is actually
hidden on a system where flashrom already works, we wouldn't break it.
>
> Should DID's in the table used for detection of hidden situations perhaps have
> " (hidden)" suffix and a more detailed code comment explaining so we can avoid confusion? Feel like this is it's own patch.
As mentioned elsewhere, calling the function that deals with hidden devices
when there are no hidden devices can simply be avoided. Then the code would
be self-documenting.
--
To view, visit https://review.coreboot.org/c/flashrom/+/63584
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If000b152c6e454617a7ad0245d16f8b1dea97fa0
Gerrit-Change-Number: 63584
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(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: Subrata Banik <subratabanik(a)google.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-Comment-Date: Thu, 21 Apr 2022 09:17:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk, Peter Marheine.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63724 )
Change subject: [WIP] meson: rework the programmer selection
......................................................................
Patch Set 3:
(4 comments)
File meson.build:
https://review.coreboot.org/c/flashrom/+/63724/comment/d86b9542_d0cda658
PS2, Line 98: # 'deps' : list[dep], # fallback: []
> Could each dep list additional files that it requires? It looks like every programmer that depends o […]
I'll have a deeper look at it. But I don't think so. I would prefer to have all code needed to build a programmer in the programmers `srcs` list. The code in `pcidev.c` is just a bunch of functions that is shared between programmers.
https://review.coreboot.org/c/flashrom/+/63724/comment/48a9fd69_1c9537e8
PS2, Line 418: p_x.get('deps',[])
> deps is already defaulted to [] above, so this doesn't need to specify a fallback.
Done
https://review.coreboot.org/c/flashrom/+/63724/comment/866b8e0e_a2764976
PS2, Line 427: elif selected and available
> Seems clearer to nest these, since it isn't immediately obvious that this is the same condition as a […]
I found non nested if statements easier. We would need more than 2 levels of nesting to get this right.
selected
(y) / \ (n)
available selected_all+available
(y) / \ (n) (y) / \ (n)
deps_found error() deps_found selected_auto+available+deps_found
(y) / \ (no) (y) / \ (n) (y) |
active=true error() active=true error() active=true
https://review.coreboot.org/c/flashrom/+/63724/comment/9e5ad60e_648c3d48
PS2, Line 464: if host_machine.system() in systems_serial_support
> Could we avoid building this if no programmer needs serial? Might need a bit of rework to express it […]
I haven't looked deeply into the serial code how to build it the bust way. But I think there is code shared between the programmer (`serial.c`) and code to support the operating system (`custom_baud/_linux/.c`). For now I've put it to the respective programmer.
--
To view, visit https://review.coreboot.org/c/flashrom/+/63724
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib44b26e3748fc71f116184082b4aed0bb208b4c1
Gerrit-Change-Number: 63724
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-CC: Richard Hughes <richard(a)hughsie.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: Thu, 21 Apr 2022 08:24:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Anastasia Klimchuk.
Hello build bot (Jenkins), Edward O'Callaghan, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/63724
to look at the new patch set (#3).
Change subject: [WIP] meson: rework the programmer selection
......................................................................
[WIP] meson: rework the programmer selection
This is a WIP implementation for a new programmer selection. It should
work by now but has some known and unknown bugs. (see Gerrit Comments)
- Each dependency is optional and get mandetory when the programmer is
selected
- Each programmer is defined through an entry in the programmer
dictionary
- The entry lists systems & cpu_families where the programmer is
supported, dependencies, sources, flags. The group parameter is for
selecting a set of programmer, the default parameter is to include the
programmer to the `all` and `auto` set.
- If the programmer get's selectet the `active` entry is set to true.
The `active` entry can be used afterwards to determin if the
programmer should be included in sources, config, documentation
Change-Id: Ib44b26e3748fc71f116184082b4aed0bb208b4c1
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M meson.build
M meson_options.txt
2 files changed, 404 insertions(+), 338 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/24/63724/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/63724
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib44b26e3748fc71f116184082b4aed0bb208b4c1
Gerrit-Change-Number: 63724
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-CC: Richard Hughes <richard(a)hughsie.com>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Damien Zammit, Subrata Banik.
Hello Damien Zammit, Subrata Banik,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/62983
to look at the new patch set (#2).
Change subject: Prepare for IFD check_access support
......................................................................
Prepare for IFD check_access support
Based off work in collaboration with Damien Zammit.
The following is intended to allow flashrom to query
the spi or opaque master for access permissions before
attempting to access a given region. This comes up in
cases such as the ichspi driver where the CSME can
deny regions access.
Change-Id: If7bdcac2a4109efbc70abc2d6ae0561f39449004
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M chipdrivers.h
M flash.h
M flashrom.c
M opaque.c
M programmer.h
M spi.c
M spi.h
7 files changed, 42 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/62983/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/62983
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If7bdcac2a4109efbc70abc2d6ae0561f39449004
Gerrit-Change-Number: 62983
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Damien Zammit
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newpatchset
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/62909 )
Change subject: raiden_debug_spi: Add more informative error message when WP is enabled
......................................................................
raiden_debug_spi: Add more informative error message when WP is enabled
Current error messages are not very helpful when attempting to flash a
target that has WP enabled. This change checks for the USB_SPI_DISABLED
error that occurs in this case and gives a more informative error
message.
BUG=b:210645611
TEST=Tested with WP enabled and disable to verify that error message is
displayed properly
Signed-off-by: Robert Zieba <robertzieba(a)google.com>
Change-Id: Ib1e8383baa9c3ea41ab1079af12e3dc8cdff90ae
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62909
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M raiden_debug_spi.c
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Edward O'Callaghan: Looks good to me, approved
Anastasia Klimchuk: Looks good to me, approved
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c
index 65ce32b..521539f 100644
--- a/raiden_debug_spi.c
+++ b/raiden_debug_spi.c
@@ -343,6 +343,7 @@
#include "usb_device.h"
#include <libusb.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -983,6 +984,22 @@
return status;
}
+ /*
+ * Check if we received an error from the device. An error will have no
+ * response data, just the packet_id and status_code.
+ */
+ const size_t err_packet_size = sizeof(struct usb_spi_response_v2) -
+ USB_SPI_PAYLOAD_SIZE_V2_RESPONSE;
+ if (rsp_config.packet_size == err_packet_size &&
+ rsp_config.packet_v2.rsp_start.status_code !=
+ USB_SPI_SUCCESS) {
+ status = rsp_config.packet_v2.rsp_start.status_code;
+ if (status == USB_SPI_DISABLED) {
+ msg_perr("Raiden: Target SPI bridge is disabled (is WP enabled?)\n");
+ return status;
+ }
+ }
+
msg_perr("Raiden: Packet is not a valid config\n"
" config attempt = %d\n"
" packet id = %u\n"
--
To view, visit https://review.coreboot.org/c/flashrom/+/62909
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib1e8383baa9c3ea41ab1079af12e3dc8cdff90ae
Gerrit-Change-Number: 62909
Gerrit-PatchSet: 6
Gerrit-Owner: Robert Zieba <robertzieba(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Diana Zigterman <dzigterman(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eric Peers <epeers(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Rob Barnes <robbarnes(a)google.com>
Gerrit-MessageType: merged