Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Nicholas Chin.
ChrisEric1 CECL has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72057 )
Change subject: Add support for VIA VL805 USB Controller flashing
......................................................................
Patch Set 16:
(3 comments)
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/5def3b1f_63ae27dd
PS15, Line 154: msg_pdbg("VL805 firmware version 0x%08x\n", val);
> On some compilers we have problems with printing fixed size integers. […]
Done
https://review.coreboot.org/c/flashrom/+/72057/comment/72bdfb62_7fa62970
PS15, Line 175: register_spi_master(&spi_master_vl805, dev);
> This `register_master` musst be removed.
Done
https://review.coreboot.org/c/flashrom/+/72057/comment/cad06811_5d9d0076
PS15, Line 177: return 0;
> return the result of register_spi_master() […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/72057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I71435afcacdf97e14d627e35bce3d29de9657f38
Gerrit-Change-Number: 72057
Gerrit-PatchSet: 16
Gerrit-Owner: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Comment-Date: Wed, 15 Feb 2023 13:29:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment
Attention is currently required from: ChrisEric1 CECL, Edward O'Callaghan, Nicholas Chin.
Hello build bot (Jenkins), Thomas Heijligen, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/72057
to look at the new patch set (#16).
Change subject: Add support for VIA VL805 USB Controller flashing
......................................................................
Add support for VIA VL805 USB Controller flashing
It works fine for me on my Raspberry Pi 4 Model B. Was able read read,
erase, write, verify. Only thing is the WP with the W25X10 gives a
untested warning.
Change-Id: I71435afcacdf97e14d627e35bce3d29de9657f38
Signed-off-by: Christopher Lentocha <christopherericlentocha(a)gmail.com>
---
M Makefile
M flashrom.8.tmpl
M include/programmer.h
M meson.build
M meson_options.txt
M programmer_table.c
A vl805.c
7 files changed, 229 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/72057/16
--
To view, visit https://review.coreboot.org/c/flashrom/+/72057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I71435afcacdf97e14d627e35bce3d29de9657f38
Gerrit-Change-Number: 72057
Gerrit-PatchSet: 16
Gerrit-Owner: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Attention: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-MessageType: newpatchset
Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/73041 )
Change subject: erasure_layout.c: Test erasefn_count before using it to allocate memory
......................................................................
erasure_layout.c: Test erasefn_count before using it to allocate memory
In erasure_layout.c:create_erase_layout() the layout will be allocated
based on erasefn_count, But calling calloc with 0 is unspecified
behavior. Also it is not freed when erasefn_count is 0.
So test first if erasefn_count is 0, and only when not allocate the
memory for *layout.
Reported by Coverty Scan:
*** CID 1505171: Resource leaks (RESOURCE_LEAK)
/erasure_layout.c: 105 in create_erase_layout()
98 if(!layout) {
99 msg_gerr("Out of memory!\n");
100 return -1;
101 }
102
103 if (!erasefn_count) {
104 msg_gerr("No erase functions supported\n");
>>> CID 1505171: Resource leaks (RESOURCE_LEAK)
>>> Variable "layout" going out of scope leaks the storage it points to.
105 return 0;
106 }
Change-Id: If13b050ac8525fee44d3f3bf74a9c9b6a8d38399
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
---
M erasure_layout.c
1 file changed, 37 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/41/73041/1
diff --git a/erasure_layout.c b/erasure_layout.c
index 05376de..2097b33 100644
--- a/erasure_layout.c
+++ b/erasure_layout.c
@@ -93,18 +93,17 @@
{
const struct flashchip *chip = flashctx->chip;
const size_t erasefn_count = count_usable_erasers(flashctx);
- struct erase_layout *layout = calloc(erasefn_count, sizeof(struct erase_layout));
-
- if (!layout) {
- msg_gerr("Out of memory!\n");
- return -1;
- }
-
if (!erasefn_count) {
msg_gerr("No erase functions supported\n");
return 0;
}
+ struct erase_layout *layout = calloc(erasefn_count, sizeof(struct erase_layout));
+ if (!layout) {
+ msg_gerr("Out of memory!\n");
+ return -1;
+ }
+
size_t layout_idx = 0;
for (size_t eraser_idx = 0; eraser_idx < NUM_ERASEFUNCTIONS; eraser_idx++) {
if (check_block_eraser(flashctx, eraser_idx, 0))
--
To view, visit https://review.coreboot.org/c/flashrom/+/73041
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If13b050ac8525fee44d3f3bf74a9c9b6a8d38399
Gerrit-Change-Number: 73041
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newchange
Attention is currently required from: ChrisEric1 CECL, Edward O'Callaghan, Nicholas Chin.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72057 )
Change subject: Add support for VIA VL805 USB Controller flashing
......................................................................
Patch Set 15:
(5 comments)
Patchset:
PS15:
One or two more rounds and we are good to go
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/33746cd0_16fbaaa1
PS15, Line 43:
> "No, as this is just a type declaration and thus static doesn't have an effect […]
Correct
https://review.coreboot.org/c/flashrom/+/72057/comment/882dd457_43e2b8fb
PS15, Line 154: msg_pdbg("VL805 firmware version 0x%08x\n", val);
On some compilers we have problems with printing fixed size integers. So we must use the macros from `inttypes.h` Replace the line with:
```
msg_pdbg("VL805 firmware version %#08"PRIx32"\n", val)
```
and we are fine.
https://review.coreboot.org/c/flashrom/+/72057/comment/af3c1a5a_99460a1e
PS15, Line 175: register_spi_master(&spi_master_vl805, dev);
This `register_master` musst be removed.
https://review.coreboot.org/c/flashrom/+/72057/comment/9406e660_13d61b38
PS15, Line 177: return 0;
return the result of register_spi_master()
```
data->dev = dev;
return register_spi_master(&spi_master_vl805, data);
}
```
--
To view, visit https://review.coreboot.org/c/flashrom/+/72057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I71435afcacdf97e14d627e35bce3d29de9657f38
Gerrit-Change-Number: 72057
Gerrit-PatchSet: 15
Gerrit-Owner: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Attention: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Comment-Date: Wed, 15 Feb 2023 11:08:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Alex Badea.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73037 )
Change subject: asm106x: add programmer for ASM106x SATA controllers
......................................................................
Patch Set 5: Code-Review+2
(6 comments)
Patchset:
PS5:
Thanks for the detailed answers. From my side it looks nearly fine. I've added a few nits.
Beside that I've ordered one of those controllers and will test it in the next days.
Edward, do you see something missing?
File asm106x.c:
https://review.coreboot.org/c/flashrom/+/73037/comment/b11e9d7b_379b19ef
PS3, Line 35: {PCI_VENDOR_ID_ASMEDIA, 0x0612, OK, "ASMedia", "ASM106x"},
> Ack
Ok, I'm fine with it. If someone has a chip with the other PCI-Id we can clarify it then.
File asm106x.c:
https://review.coreboot.org/c/flashrom/+/73037/comment/ceda25b2_76854e05
PS5, Line 47: x
Please use `inttype.h` macros here for fixed length integer. We have problems with those on some compilers and a proper syntax for them comes first with c23. So for uint8_t as hex it gets
```
msg_pdbg2("asm106x status %#02"PRIx8" tries %d\n", val, timeout);
```
https://review.coreboot.org/c/flashrom/+/73037/comment/0bbecbdf_161cd28d
PS5, Line 57: msg_pdbg("asm106x timed out, ctrl 0x%02x\n", val);
Same here `... ctrl %#02"PRIx8"\n"`
https://review.coreboot.org/c/flashrom/+/73037/comment/e9288783_f380cfe1
PS5, Line 81: msg_pdbg2("asm106x write 0x%08x chunk %u\n", val, chunk);
`write %#08"PRIx32" chunk`
https://review.coreboot.org/c/flashrom/+/73037/comment/838c006a_c83343a9
PS5, Line 99: msg_pdbg2("asm106x read 0x%08x chunk %u\n", val, chunk);
`read %#08"PRIx32" chunk`
--
To view, visit https://review.coreboot.org/c/flashrom/+/73037
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Gerrit-Change-Number: 73037
Gerrit-PatchSet: 5
Gerrit-Owner: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-Comment-Date: Wed, 15 Feb 2023 10:49:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Stefan Reinauer, Anastasia Klimchuk.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72691 )
Change subject: jedec.c: Fold up dst into toggle_ready_jedec()
......................................................................
Patch Set 1:
(1 comment)
File jedec.c:
https://review.coreboot.org/c/flashrom/+/72691/comment/71954a72_fddba77f
PS1, Line 72: const chipaddr dst = flash->virtual_memory;
> Just wondering, I see that all existing callsites have dst as `flash->virtual_memory` but is this al […]
Not according to the current code. Either way it already has flashctx as a operand to the function.
--
To view, visit https://review.coreboot.org/c/flashrom/+/72691
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib7a3fdbc6e0a888093dc8da6f5567a7301ec5040
Gerrit-Change-Number: 72691
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 15 Feb 2023 06:34:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen.
Hello Felix Singer, build bot (Jenkins), Thomas Heijligen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/73037
to look at the new patch set (#5).
Change subject: asm106x: add programmer for ASM106x SATA controllers
......................................................................
asm106x: add programmer for ASM106x SATA controllers
The ASMedia ASM106x series is a PCIe-SATA controller chip. It supports
an attached SPI flash chip that can contain configuration and PCI option
ROM. The interface is a simple shifter accessed via PCI config space,
up to 4 bytes at a time. Add a programmer driver for it.
Tested on a G536PCE1061V11 IO-PCE1061-V1.1 PCIe card, and
a MPCE2ST-A01 VER006S mini-PCIe card, both with chips marked ASM1061,
both enumerate as:
01:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02) (prog-if 01 [AHCI 1.0])
Subsystem: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:1060]
Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Signed-off-by: Alex Badea <vamposdecampos(a)gmail.com>
---
M Makefile
A asm106x.c
M flashrom.8.tmpl
M include/programmer.h
M meson.build
M meson_options.txt
M programmer_table.c
M test_build.sh
8 files changed, 213 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/73037/5
--
To view, visit https://review.coreboot.org/c/flashrom/+/73037
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Gerrit-Change-Number: 73037
Gerrit-PatchSet: 5
Gerrit-Owner: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: Felix Singer, Thomas Heijligen.
Alex Badea has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73037 )
Change subject: asm106x: add programmer for ASM106x SATA controllers
......................................................................
Patch Set 4:
(1 comment)
File asm106x.c:
https://review.coreboot.org/c/flashrom/+/73037/comment/bd6e9a0f_a9dca2a8
PS3, Line 35: {PCI_VENDOR_ID_ASMEDIA, 0x0612, OK, "ASMedia", "ASM106x"},
> Well, it's interesting. […]
Ack
--
To view, visit https://review.coreboot.org/c/flashrom/+/73037
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Gerrit-Change-Number: 73037
Gerrit-PatchSet: 4
Gerrit-Owner: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Wed, 15 Feb 2023 02:49:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen.
Alex Badea has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73037 )
Change subject: asm106x: add programmer for ASM106x SATA controllers
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS3:
> Ack
Not sure if product URLs should go in commit message. For posterity, these two:
https://www.ebay.com/itm/204081736637https://www.amazon.com/gp/product/B09B257HW6
--
To view, visit https://review.coreboot.org/c/flashrom/+/73037
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Gerrit-Change-Number: 73037
Gerrit-PatchSet: 4
Gerrit-Owner: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Wed, 15 Feb 2023 02:48:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Alex Badea <vamposdecampos(a)gmail.com>
Gerrit-MessageType: comment