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/+/55932 )
Change subject: [RFC] spi_master: Add shutdown function in spi_master struct
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> The "few" wasn't meant literally :) […]
Oh and I also can see, for the masters without programmer entry, the entry does not even exist in programmer_table.c.
Maybe then my question doesn't make sense, but initially it was, why two structs are separated, and there is no way to get programmer entry from spi_master. There is for example programmer name and type in programmer_entry, but no way to access this from an instance of spi_master.
Is the answer "it should never be needed" or "it was never needed"?
--
To view, visit https://review.coreboot.org/c/flashrom/+/55932
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2dc80dceca2f8204bcd0dad1f51753d7e79f1af5
Gerrit-Change-Number: 55932
Gerrit-PatchSet: 2
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: Wed, 30 Jun 2021 23:25:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54890 )
Change subject: programmer: Introduce default shutdown function
......................................................................
Patch Set 5:
(1 comment)
Patchset:
PS5:
> I wanted to say: let's not bikeshed, we won't need it for long. […]
There are two reasons why I thought of default shutdown function.
First reason is illustrated in this patch: instead of adding the simplest (and identical code) shutdown function into individual masters, have it added once and reuse. There are ~10 more par masters in the same situation.
I am afraid we may need it for longer, the more I think about it. Strictly speaking, it matters when freeing the data (not allocation) moves to common code. But looking at how it currently works, shutdown function is needed to be registered (even if it does nothing), as a signal to free data. It all can be re-written, but that's what I mean "we may need it for longer".
Second reason, completely independent is that some time ago when we were discussing CB:51676, there was an idea that shutdown function should be required. I think, if it is required, maybe to have default function available? There is `default_spi_send_multicommand` for example.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54890
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8b20717ba549e12edffbc5d1643ff064a4f0c517
Gerrit-Change-Number: 54890
Gerrit-PatchSet: 5
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: 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-Comment-Date: Wed, 30 Jun 2021 21:57:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/55650 )
Change subject: ich_descriptors: Don't base chipset detection on `freq_read`
......................................................................
ich_descriptors: Don't base chipset detection on `freq_read`
Only warn if the `freq_read` setting looks odd but don't override
our previous guess. The `freq_read` check was taken from `ifdtool`
but seems less reliable than our own detection scheme.
Change-Id: I658d76ec2567d1d660a18d0b0ae71c744e603e8f
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55650
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
---
M ich_descriptors.c
1 file changed, 3 insertions(+), 5 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
Michał Żygowski: Looks good to me, approved
diff --git a/ich_descriptors.c b/ich_descriptors.c
index dbc2da4..10355d9 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -984,7 +984,7 @@
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_GEMINI_LAKE:
/* `freq_read` was repurposed, so can't check on it any more. */
- return guess;
+ break;
case CHIPSET_100_SERIES_SUNRISE_POINT:
case CHIPSET_C620_SERIES_LEWISBURG:
case CHIPSET_APOLLO_LAKE:
@@ -993,19 +993,17 @@
"However, the read frequency isn't set to 17MHz (the only valid value).\n"
"Please report this message, the output of `ich_descriptors_tool` for\n"
"your descriptor and the output of `lspci -nn` to flashrom(a)flashrom.org\n\n");
- return CHIPSET_9_SERIES_WILDCAT_POINT;
}
- return guess;
+ break;
default:
if (component->modes.freq_read == 6) {
msg_pwarn("\nThe flash descriptor has the read frequency set to 17MHz. However,\n"
"it doesn't look like a Skylake/Sunrise Point compatible descriptor.\n"
"Please report this message, the output of `ich_descriptors_tool` for\n"
"your descriptor and the output of `lspci -nn` to flashrom(a)flashrom.org\n\n");
- return CHIPSET_100_SERIES_SUNRISE_POINT;
}
- return guess;
}
+ return guess;
}
/* len is the length of dump in bytes */
--
To view, visit https://review.coreboot.org/c/flashrom/+/55650
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I658d76ec2567d1d660a18d0b0ae71c744e603e8f
Gerrit-Change-Number: 55650
Gerrit-PatchSet: 5
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.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
Attention is currently required from: Nico Huber.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55647 )
Change subject: ich_descriptors: Revise detection for chipsets w/ ICCRIBA
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
I guess we just need a rebase here to resolve conflicts
--
To view, visit https://review.coreboot.org/c/flashrom/+/55647
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I587ad1abe390843d4a9e74431b6fc4b63f8ba512
Gerrit-Change-Number: 55647
Gerrit-PatchSet: 4
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
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-Comment-Date: Wed, 30 Jun 2021 12:19:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54890 )
Change subject: programmer: Introduce default shutdown function
......................................................................
Patch Set 5: Code-Review+2
(1 comment)
Patchset:
PS5:
I wanted to say: let's not bikeshed, we won't need it for long.
But then again, do we need it at all? All the candidates for
this function will likely get a shutdown NULL pointer once the
allocation moves into common code. No matter if we introduce
default_shutdown() or not, right?
--
To view, visit https://review.coreboot.org/c/flashrom/+/54890
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8b20717ba549e12edffbc5d1643ff064a4f0c517
Gerrit-Change-Number: 54890
Gerrit-PatchSet: 5
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: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 30 Jun 2021 09:42:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55934 )
Change subject: dediprog: Init-shutdown test for dediprog
......................................................................
Patch Set 3:
(2 comments)
File tests/io_mock.h:
https://review.coreboot.org/c/flashrom/+/55934/comment/bca06c00_85043fb4
PS3, Line 34: /* Define libusb symbols to avoid dependency on libusb.h */
Now that I realized that we don't mock `libusb.h` for the code under
test. I wonder why we should avoid it here? It doesn't hurt so I'm
ok with it. Just wondering.
(I guess it wouldn't be hard to build the tests without libusb,
but that can still be done if anyone ever needs it.)
File tests/io_mock.h:
https://review.coreboot.org/c/flashrom/+/55934/comment/3c357fa5_e8df9617
PS2, Line 52: */
> Done, it works! but I'm not sure I understand how it works... […]
Oh, I missed earlier that you avoid the libusb dependency here while
it's still needed for the tests to build (includes of the code under
test). There are some explanations why this works. Here is why this
is legal in C:
* The typedef is somewhat transparent. You can repeat it whereever you want, as long as it's the same type.
* Just saying `struct libusb_device_handle;` without a member list makes it an incomplete type. That's good enough to declare pointers as long as the compiler doesn't need to know the size of the type, i.e. we don't try to dereference anything. Strictly speaking, the type we use here is not `libusb_device_handle`, it is `pointer to libusb_device_handle`.
* Naturally, if incomplete types are allowed, it must be allowed to mix them with the actual (complete) type in another compilation unit. Otherwise they would be rather useless.
(NB. Incomplete types are a means of information hiding in C.)
Here is my favorite explanation: It all doesn't matter ;) because the
compiler only looks at compilation units individually. And the linker
who stitches the compilation results of the various compilation units
together doesn't know C and its types. It doesn't even have to know
parameters. There's a call to a symbol, it replaces the symbol with
an address. That's about it. To get a working program out of it, the
compiler needs to know the size of the parameters, and the size needs
to match across compilation units. All pointers have the same size in
C which makes it work even if we'd use `int *` here.
--
To view, visit https://review.coreboot.org/c/flashrom/+/55934
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I38508dfb6d7c24d42522f22fcae0c5e410c5f7ea
Gerrit-Change-Number: 55934
Gerrit-PatchSet: 3
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: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 30 Jun 2021 08:53:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment