Attention is currently required from: Angel Pons.
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 2:
(4 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/55714/comment/9bdc1e09_9fdbec2c
PS1, Line 11: e
> typo: c
Done
File acpi_ec.h:
https://review.coreboot.org/c/flashrom/+/55714/comment/6bc4df46_8be57f0b
PS1, Line 41: bool ec_wait_for_ibuf(uint8_t control_port);
: bool ec_wait_for_obuf(uint8_t control_port, unsigned int max_checks);
> Any reason why only one of these has the `max_checks` parameter?
The erase command required longer timeout on output buffer flag. The input buffer did not require any non-default timeouts so only one had the additional parameters. Added the max_checks to `ec_wait_for_ibuf` too fro consistency.
File acpi_ec.c:
https://review.coreboot.org/c/flashrom/+/55714/comment/a0be26f6_b6586c2c
PS1, Line 84: ec_wait_for_ibuf
> obuf?
Yes, it should be obuf. The reference implementation had ibuf which is probably a bug and we missed it.
https://review.coreboot.org/c/flashrom/+/55714/comment/f949ba5d_3deb2a49
PS1, Line 72:
:
: bool ec_read_reg(uint8_t address, uint8_t *data)
: {
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: OUTB(EC_CMD_READ_REG, EC_CONTROL);
:
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: OUTB(address, EC_DATA);
:
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: *data = INB(EC_DATA);
:
: return true;
: }
:
: bool ec_write_reg(uint8_t address, uint8_t data)
: {
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: OUTB(EC_CMD_WRITE_REG, EC_CONTROL);
:
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: OUTB(address, EC_DATA);
:
: if (!ec_wait_for_ibuf(EC_CONTROL))
: return false;
: OUTB(data, EC_DATA);
:
: return true;
: }
> Why not use the functions you defined above? […]
No idea why we didn't do that ;) Applied the suggestion.
--
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: 2
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-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 21 Jun 2021 10:41:55 +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: Angel Pons.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55713 )
Change subject: flashrom.c: Add 64KiB write granularity
......................................................................
Patch Set 2:
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/55713/comment/a881a8fc_07129b99
PS1, Line 7: KB
> Strictly speaking, this should be `KiB`. […]
Done
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/55713/comment/215a8093_cb22952d
PS1, Line 506: 1024 * 64
> nit: I'd use `64 * 1024` to be in line with `64 kilobytes`.
Done
https://review.coreboot.org/c/flashrom/+/55713/comment/1e2b8fdc_fc61c319
PS1, Line 578: 1024 * 64
> Same here
Done
--
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: 2
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 21 Jun 2021 10:38:29 +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: Michał Żygowski.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/55714
to look at the new patch set (#2).
Change subject: acpi_ec: Implement basic ACPI embedded controller API
......................................................................
acpi_ec: Implement basic ACPI embedded controller API
Implement basic functions to read/write EC registers and send standard
ACPI EC commands. Those may prove useful in possible future
implementations of embedded controllers in flashrom and are required
to support EC firmware flashing on Tuxedo laptops.
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
---
A acpi_ec.c
A acpi_ec.h
2 files changed, 146 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/55714/2
--
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: 2
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-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Michał Żygowski.
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/55713
to look at the new patch set (#2).
Change subject: flashrom.c: Add 64KiB write granularity
......................................................................
flashrom.c: Add 64KiB write granularity
Add 64KiB write granularity for the incoming Embedded Controller of
Tuxedo laptops. These ECs can only operate on 64KiB blocks and any
different operations result in a failure.
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Change-Id: I69801f581d0cb9b85f6596de7e1267ef9317673f
---
M flash.h
M flashrom.c
2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/13/55713/2
--
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: 2
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Alan Green, Samir Ibradžić.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55695 )
Change subject: ft2232_spi: Revise comments about output pin states
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I think I understand what's going on here: the intent of the csgpiol parameter was to specify additional GPIOL pins that should mirror the CS pin. My changes were attempting to use the same machinery as csgpiol, but to control a general GPIO mechanism.
>
> Is that right?
That's how I comprehend it too.
>
> (For unfortunate reasons, this worked fine with the ad-hoc programmer we are using, and I didn't notice the change in behavior it caused for other programmers).
It's probably a very limited issue. There are two programmer entries that
change cs_bits, but it seems they could live with a constant 0 on the GPIO
as well. What definitely broke (already before your patches) was the csgpiol
option.
> It's probably still useful to have a mechanism to set the GPIO pins,
Absolutely, yes. Angel has also already asked for it :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/55695
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2b84ede01759c80f69d5ad17e43783d09ecd1107
Gerrit-Change-Number: 55695
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Samir Ibradžić <sibradzic(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Samir Ibradžić <sibradzic(a)gmail.com>
Gerrit-Comment-Date: Mon, 21 Jun 2021 10:33:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alan Green <avg(a)google.com>
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/+/54887 )
Change subject: buspirate: Add psus option
......................................................................
buspirate: Add psus option
This change adds a 'psus=<on|off>' option, to control the external Vcc
state of the bus pirate, allowing hardware where the SPI flash chip is
powered by the 3V3/5V lines directly.
Change-Id: I8a7d4b40c0f7f04f6976f6757f05b61f2c9958f9
Signed-off-by: Jeremy Kerr <jk(a)codeconstruct.com.au>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54887
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M buspirate_spi.c
M flashrom.8.tmpl
2 files changed, 31 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/buspirate_spi.c b/buspirate_spi.c
index 04b8fde..bfd0e05 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -326,6 +326,7 @@
int serialspeed_index = -1;
int ret = 0;
int pullup = 0;
+ int psu = 0;
unsigned char *bp_commbuf;
int bp_commbufsize;
@@ -377,6 +378,17 @@
}
free(tmp);
+ tmp = extract_programmer_param("psus");
+ if (tmp) {
+ if (strcasecmp("on", tmp) == 0)
+ psu = 1;
+ else if (strcasecmp("off", tmp) == 0)
+ ; // ignore
+ else
+ msg_perr("Invalid psus state, not enabling.\n");
+ }
+ free(tmp);
+
/* Default buffer size is 19: 16 bytes data, 3 bytes control. */
#define DEFAULT_BUFSIZE (16 + 3)
bp_commbuf = malloc(DEFAULT_BUFSIZE);
@@ -638,6 +650,10 @@
bp_commbuf[0] |= (1 << 2);
msg_pdbg("Enabling pull-up resistors.\n");
}
+ if (psu == 1) {
+ bp_commbuf[0] |= (1 << 3);
+ msg_pdbg("Enabling PSUs.\n");
+ }
ret = buspirate_sendrecv(bp_commbuf, 1, 1);
if (ret) {
ret = 1;
diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl
index 4ae7e71..228e17b 100644
--- a/flashrom.8.tmpl
+++ b/flashrom.8.tmpl
@@ -952,7 +952,21 @@
More information about the Bus Pirate pull-up resistors and their purpose is available
.URLB "http://dangerousprototypes.com/docs/Practical_guide_to_Bus_Pirate_pull-up_r…" \
"in a guide by dangerousprototypes" .
-Only the external supply voltage (Vpu) is supported as of this writing.
+.sp
+The state of the Bus Pirate power supply pins is controllable through an optional
+.B psus
+parameter. Syntax is
+.sp
+.B " flashrom -p buspirate_spi:psus=state"
+.sp
+where
+.B state
+can be
+.BR on " or " off .
+This allows the bus pirate to power the ROM chip directly. This may also be used to provide the
+required pullup voltage (when using the
+.B pullups
+option), by connecting the Bus Pirate's Vpu input to the appropriate Vcc pin.
.SS
.BR "pickit2_spi " programmer
.IP
--
To view, visit https://review.coreboot.org/c/flashrom/+/54887
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8a7d4b40c0f7f04f6976f6757f05b61f2c9958f9
Gerrit-Change-Number: 54887
Gerrit-PatchSet: 3
Gerrit-Owner: Jeremy Kerr <jk(a)ozlabs.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-MessageType: merged
Attention is currently required from: Jeremy Kerr.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54887 )
Change subject: buspirate: Add psus option
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Thanks for the quick update!
--
To view, visit https://review.coreboot.org/c/flashrom/+/54887
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8a7d4b40c0f7f04f6976f6757f05b61f2c9958f9
Gerrit-Change-Number: 54887
Gerrit-PatchSet: 2
Gerrit-Owner: Jeremy Kerr <jk(a)ozlabs.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: Jeremy Kerr <jk(a)ozlabs.org>
Gerrit-Comment-Date: Mon, 21 Jun 2021 10:17:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment