Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
Patch Set 16:
(3 comments)
Thanks. Much better than no feedback!
I will work on this when I get time.
May be anyone (Nico?) can give a comment on ft2232_spi.c#497 meanwhile.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@172
PS16, Line 172: .multicommand = default_spi_send_multicommand,
> You just need to implement this and will get both commands passed at once.
I got it. This looks much better than my suggested patch!
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@497
PS16, Line 497: bufsize = max(writecnt + 19, 261 + 19);
> This assumes `i` is at most 10. But there is really no guarantee because […]
The optimization done in this change (to 261+19) was not due to USB-Transfer itself, but due to FTDI-Response time after every ftdi_write_data-call (which in this case is the some number as the number of USB-transfers). So this is a significant optimization.
But with the good idea of implementing spi_send_multicommand for ftdi I have to check what this does with bufsize of (261+19).
What do you want to drop? Just the change from 260+9 to 261+19 or the whole max()-line?
I would drop the whole line (see PS11).
IMHO the easiest and best way would be so set bufsize (to chunksize) to 4096.
Is there any benefit of saving ca. 3.8kByte of space on a PC to the cost of more complex code?
As Angel Pons suggested, this could be done in an extra patch.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@562
PS16, Line 562: if (writearr[0] == JEDEC_WREN) {
> What if the chip isn't JEDEC? 0x06 (WREN) could mean something very different. […]
You are right, I was assuming JEDEC_WREN in any case. Thank´s for that hint!
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 16
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 12 Nov 2020 13:45:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Victor Ding has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/47394 )
Change subject: Disable ENE_LPC and MEC1308 on non-x86 arch
......................................................................
Disable ENE_LPC and MEC1308 on non-x86 arch
Both requires PCI port I/O and hence works only on x86.
TEST=builds on Ubuntu for Raspberry Pi
Signed-off-by: Victor Ding <victording(a)google.com>
Change-Id: I69e1fbd87819b0b6370f31e9ee4c474500fb3759
---
M Makefile
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/47394/1
diff --git a/Makefile b/Makefile
index 225db9d..0498624 100644
--- a/Makefile
+++ b/Makefile
@@ -544,6 +544,16 @@
else
override CONFIG_SATAMV = no
endif
+ifeq ($(CONFIG_ENE_LPC), yes)
+UNSUPPORTED_FEATURES += CONFIG_ENE_LPC=yes
+else
+override CONFIG_ENE_LPC = no
+endif
+ifeq ($(CONFIG_MEC1308), yes)
+UNSUPPORTED_FEATURES += CONFIG_MEC1308=yes
+else
+override CONFIG_MEC1308 = no
+endif
endif
# Disable all drivers needing raw access (memory, PCI, port I/O) on
--
To view, visit https://review.coreboot.org/c/flashrom/+/47394
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I69e1fbd87819b0b6370f31e9ee4c474500fb3759
Gerrit-Change-Number: 47394
Gerrit-PatchSet: 1
Gerrit-Owner: Victor Ding <victording(a)google.com>
Gerrit-MessageType: newchange
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
Patch Set 16:
(5 comments)
> hm... anyone having time to review/merge this? I´d like to get this done...
Sorry to let you know after you went through many cycles already,
but I think this needs a re-write :-/
There is already everything in place in flashrom to avoid such
a layering violation, namely the `.multicommand` member of struct
spi_master. The biggest problem with your current implementation
is that you assume that there is always a JEDEC flash chip, but
that's not generally true.
So, the correct way to do this is to implement `.multicommand`
instead of `.command`. I would roughly do it as follows:
Loop
Put write part of command into buffer.
If not last command and read part is empty,
Continue with next loop iteration.
Execute buffer.
Execute read part if any.
While not last command.
https://review.coreboot.org/c/flashrom/+/40477/16//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/flashrom/+/40477/16//COMMIT_MSG@25
PS16, Line 25: in a similar way.
The infrastructure is already in place. You just have to implement
`.multicommand` instead of `.command` for the programmer.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@172
PS16, Line 172: .multicommand = default_spi_send_multicommand,
You just need to implement this and will get both commands passed at once.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@497
PS16, Line 497: bufsize = max(writecnt + 19, 261 + 19);
This assumes `i` is at most 10. But there is really no guarantee because
we could have been called with WREN multiple times (by accident). Easy
to fix though, replace the assumed 10 in `writecnt + 19` with `i`:
`i + writecnt + 9`.
Btw. this `max(..., 261 + 19)` optimization seems insignificant in the
presence of USB transfers (which probably have 100 times more overhead
than realloc()). I would probably drop it.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@562
PS16, Line 562: if (writearr[0] == JEDEC_WREN) {
What if the chip isn't JEDEC? 0x06 (WREN) could mean something very different.
This is pretty much a blocker. Especially because the proper infrastructure
(.multicommand) is already in place.
https://review.coreboot.org/c/flashrom/+/40477/16/ft2232_spi.c@568
PS16, Line 568: } else {
To "quote" checkpatch from memory: `else` is not needed after a return.
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 16
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Tue, 10 Nov 2020 11:51:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
Patch Set 16:
hm... anyone having time to review/merge this? I´d like to get this done...
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 16
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Tue, 10 Nov 2020 07:34:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Eizan Miyamoto has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/47379 )
Change subject: test patch
......................................................................
test patch
Change-Id: I171ecd540524e4f11859b8b95c2e57cc6941bba0
---
M README
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/79/47379/1
diff --git a/README b/README
index 4e7bd4f..9dd92f9 100644
--- a/README
+++ b/README
@@ -2,6 +2,7 @@
flashrom README
-------------------------------------------------------------------------------
+
flashrom is a utility for detecting, reading, writing, verifying and erasing
flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images
in-system using a supported mainboard, but it also supports flashing of network
--
To view, visit https://review.coreboot.org/c/flashrom/+/47379
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I171ecd540524e4f11859b8b95c2e57cc6941bba0
Gerrit-Change-Number: 47379
Gerrit-PatchSet: 1
Gerrit-Owner: Eizan Miyamoto <eizan(a)chromium.org>
Gerrit-MessageType: newchange
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/46894 )
Change subject: test_build.sh: Move build test procedure to repository
......................................................................
test_build.sh: Move build test procedure to repository
Instead of hard coding the test procedure on qa.coreboot.org, allow
running a script in the repo instead. The server is already adapted
to do that, so once there's a test_build.sh file in the toplevel
directory, it's run in place of the default operation.
The content of this change mirrors the default operation exactly so
should serve as a good starting point.
The script is executed in an encapsulate[0] context with the workspace,
/tmp and $HOME/.ccache writable, everything else read-only and
network disabled.
It should return 0 on success, anything else on failure, as is normal
for UNIX processes.
[0] https://review.coreboot.org/cgit/encapsulate.git
Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
A test_build.sh
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/94/46894/1
diff --git a/test_build.sh b/test_build.sh
new file mode 100755
index 0000000..0e7f37a
--- /dev/null
+++ b/test_build.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+make CONFIG_EVERYTHING=yes WARNERROR=yes
+
+meson -p out
+(cd out && ninja)
+(cd out && ninja test)
--
To view, visit https://review.coreboot.org/c/flashrom/+/46894
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95
Gerrit-Change-Number: 46894
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange