Attention is currently required from: Felix Singer, Nico Huber, Michał Żygowski, Paul Menzel, Angel Pons.
Hello Felix Singer, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/55715
to look at the new patch set (#10).
Change subject: ite_ec: Implement support for flashing ITE ECs found on TUXEDO laptops
......................................................................
ite_ec: Implement support for flashing ITE ECs found on TUXEDO laptops
Add a new programmer supporting ITE Embedded Controllers found on
TUXEDO laptops. Tested on TUXEDO InfinityBook S 14 Gen6 and 15 Gen6
with EC firmware updates from IBV, EC versions 1.07.02TR1 and
1.07.04TR4.
Example standard command to update EC firmware on a TUXEDO laptop:
"flashrom -p ite_ec:romsize=128K,autoload=disable -w eL14MU02.TR1"
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Change-Id: I0e42260155ffea38a6f60790871cd8da7b657031
---
M Makefile
M flashrom.8.tmpl
M it87spi.c
A ite_ec.c
A ite_ec.h
M programmer.h
M programmer_table.c
7 files changed, 1,111 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/15/55715/10
--
To view, visit https://review.coreboot.org/c/flashrom/+/55715
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0e42260155ffea38a6f60790871cd8da7b657031
Gerrit-Change-Number: 55715
Gerrit-PatchSet: 10
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Michał Żygowski, Angel Pons, Michael Niewöhner.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55714 )
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
Patch Set 4:
(1 comment)
File acpi_ec.h:
https://review.coreboot.org/c/flashrom/+/55714/comment/a19b8505_83456c91
PS4, Line 44: bool ec_write_cmd(uint8_t control_port, uint8_t cmd, unsigned int max_checks);
: bool ec_read_byte(uint8_t control_port, uint8_t data_port, uint8_t *data,
: unsigned int max_checks);
: bool ec_write_byte(uint8_t control_port, uint8_t data_port, uint8_t data,
: unsigned int max_checks);
:
> The EFI firmware update application talks through multiple port pairs. […]
Hmmm, let me ask this then: Was the `portpair` option of your driver
tested for non-default values? If not, I'd rather not add code for it
until somebody needs it.
Another option to settle this would be to add all this as generic
`ec` code (without the `acpi` prefix) and only rename the two functions
below to something like acpi_ec_read()/acpi_ec_write(). The concept of
the status/command + data ports is older than ACPI anyway. Technically,
also not EC specific, but I think for now we can assume that we'll only
need it for ECs.
--
To view, visit https://review.coreboot.org/c/flashrom/+/55714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Gerrit-Change-Number: 55714
Gerrit-PatchSet: 4
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Comment-Date: Fri, 25 Jun 2021 15:03:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: comment
Attention is currently required from: Michał Żygowski, Angel Pons, Michael Niewöhner.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55714 )
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
Patch Set 4:
(1 comment)
File acpi_ec.c:
https://review.coreboot.org/c/flashrom/+/55714/comment/d63ecd70_b85291e6
PS4, Line 23: ontrol_port
> See EC ACPI spec
You mean the EC chapter in the ACPI spec? Did you read it?
It calls it EC_SC (status & command, I suppose).
--
To view, visit https://review.coreboot.org/c/flashrom/+/55714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Gerrit-Change-Number: 55714
Gerrit-PatchSet: 4
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Comment-Date: Fri, 25 Jun 2021 14:55:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Comment-In-Reply-To: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Nico Huber, Michał Żygowski, Paul Menzel, Angel Pons.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55715 )
Change subject: ite_ec: Implement support for flashing ITE ECs found on TUXEDO laptops
......................................................................
Patch Set 9:
(2 comments)
Patchset:
PS4:
> All other EC drivers were added lately without proper review. That they skip […]
Oh wow, I wasn't aware of board_enable :O Thanks for that hint. Well, then that's the way to go I guess.
File ite_ec.c:
https://review.coreboot.org/c/flashrom/+/55715/comment/191c2602_a0336300
PS9, Line 176: ctx_data->control_port = EC_CONTROL;
CMD,not CONTROL
--
To view, visit https://review.coreboot.org/c/flashrom/+/55715
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0e42260155ffea38a6f60790871cd8da7b657031
Gerrit-Change-Number: 55715
Gerrit-PatchSet: 9
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 25 Jun 2021 14:05:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Michał Żygowski, Angel Pons.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55714 )
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
Patch Set 4:
(1 comment)
File acpi_ec.c:
https://review.coreboot.org/c/flashrom/+/55714/comment/276c5568_985e0337
PS4, Line 23: ontrol_port
> Rather status port
you read the status from that port, but it's still the "cmd port". See EC ACPI spec
--
To view, visit https://review.coreboot.org/c/flashrom/+/55714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Gerrit-Change-Number: 55714
Gerrit-PatchSet: 4
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 25 Jun 2021 14:01:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Comment-In-Reply-To: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Angel Pons, Michael Niewöhner.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55714 )
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
Patch Set 4:
(3 comments)
File acpi_ec.h:
https://review.coreboot.org/c/flashrom/+/55714/comment/5691775f_2466deb9
PS4, Line 41: bool ec_wait_for_ibuf(uint8_t control_port, unsigned int max_checks);
: bool ec_wait_for_obuf(uint8_t control_port, unsigned int max_checks);
> Do these need to be exported?
Actually they don't
https://review.coreboot.org/c/flashrom/+/55714/comment/5ee6f636_1587b041
PS4, Line 44: bool ec_write_cmd(uint8_t control_port, uint8_t cmd, unsigned int max_checks);
: bool ec_read_byte(uint8_t control_port, uint8_t data_port, uint8_t *data,
: unsigned int max_checks);
: bool ec_write_byte(uint8_t control_port, uint8_t data_port, uint8_t data,
: unsigned int max_checks);
:
> If these are part of an `acpi_ec` API and ACPI standardized the ports, […]
The EFI firmware update application talks through multiple port pairs. I have no idea why it is implemented that way. Given the quality of this EFI application which the patches are based on, it may even simply be a bug.
File acpi_ec.c:
https://review.coreboot.org/c/flashrom/+/55714/comment/7d5e9f95_bcb1acbd
PS4, Line 23: ontrol_port
> cmd_port
Rather status port
--
To view, visit https://review.coreboot.org/c/flashrom/+/55714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Gerrit-Change-Number: 55714
Gerrit-PatchSet: 4
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
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: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Comment-Date: Fri, 25 Jun 2021 13:47:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-MessageType: comment
Attention is currently required from: Michał Żygowski, Angel Pons.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55714 )
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
Patch Set 4:
(4 comments)
File acpi_ec.h:
https://review.coreboot.org/c/flashrom/+/55714/comment/3bdd0749_0977fb56
PS4, Line 8: * the Free Software Foundation; version 2 of the License.
It would be nice if you could convince TUXEDO to put it under GPLv2+.
We try to suppress GPLv2-only to make libflashrom more useful.
https://review.coreboot.org/c/flashrom/+/55714/comment/e19e6def_1052951e
PS4, Line 26: /* Standard ports */
: #define EC_DATA 0x62
: #define EC_CONTROL 0x66 /* Read status, write commands */
:
: /* Standard commands */
: #define EC_CMD_READ_REG 0x80 /* Read register's value */
: #define EC_CMD_WRITE_REG 0x81 /* Write register's value */
:
: /* Some of the status bits */
: #define EC_STS_IBF (1 << 1) /* EC's input buffer full (host can't write) */
: #define EC_STS_OBF (1 << 0) /* EC's output buffer full (host can read) */
:
Do these need to be exported?
https://review.coreboot.org/c/flashrom/+/55714/comment/40ca7034_40eeb849
PS4, Line 41: bool ec_wait_for_ibuf(uint8_t control_port, unsigned int max_checks);
: bool ec_wait_for_obuf(uint8_t control_port, unsigned int max_checks);
Do these need to be exported?
https://review.coreboot.org/c/flashrom/+/55714/comment/75e0c4f0_9bf972f1
PS4, Line 44: bool ec_write_cmd(uint8_t control_port, uint8_t cmd, unsigned int max_checks);
: bool ec_read_byte(uint8_t control_port, uint8_t data_port, uint8_t *data,
: unsigned int max_checks);
: bool ec_write_byte(uint8_t control_port, uint8_t data_port, uint8_t data,
: unsigned int max_checks);
:
If these are part of an `acpi_ec` API and ACPI standardized the ports,
why allow to specify the port? Does the ITE driver talk on multiple
interfaces at once?
--
To view, visit https://review.coreboot.org/c/flashrom/+/55714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Gerrit-Change-Number: 55714
Gerrit-PatchSet: 4
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 25 Jun 2021 13:39:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Michał Żygowski, Angel Pons, Michael Niewöhner.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55713 )
Change subject: flashrom.c: Add 64KiB write granularity
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/55713/comment/40e22f8f_77b3f46d
PS1, Line 506: 1024 * 64
> Done
We have a `KiB` macro by now, so this could be `64*KiB`.
--
To view, visit https://review.coreboot.org/c/flashrom/+/55713
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I69801f581d0cb9b85f6596de7e1267ef9317673f
Gerrit-Change-Number: 55713
Gerrit-PatchSet: 3
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
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: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Comment-Date: Fri, 25 Jun 2021 13:20:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment