Attention is currently required from: Stefan Reinauer, Edward O'Callaghan.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72607 )
Change subject: jedec.c: Move printlock stuff into printlock.c
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/72607
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iacaa16c81e141aac30feb6871700c4fdc9eec8e9
Gerrit-Change-Number: 72607
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Mon, 13 Feb 2023 10:39:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Anastasia Klimchuk.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71578 )
Change subject: internal.c: Factor out laptop alerts into helper func
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/71578
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8eea91012e6539b4fdf5d49a75a9cb48bb8a57ca
Gerrit-Change-Number: 71578
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(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: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Mon, 13 Feb 2023 10:35:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: ChrisEric1 CECL, 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 3 XHCI flashing
......................................................................
Patch Set 3:
(14 comments)
Patchset:
PS3:
Hi Cristopher,
fist of all: Thank you for contributing! This looks already quite good. Nevertheless I've a few thinks (most of them are quite small):
* Can you move the changes in `flashchips.c` into an own commit
* The entry for the meson buildsystem ist missing (meson.build:148ff, in alphabetic order)
```
'vl805' : {
'systems' : systems_hwaccess,
'deps' : [ libpci ],
'groups' : [ group_pci, group_internal ],
'srcs' : files('vl805.c', 'pcidev.c'),
'flags' : [ '-DCONFIG_VL805=1' ],
},
```
* Can you share a little bit about the 'original driver' and the 'logs' you mentioned in the comments?
File flashrom.8.tmpl:
https://review.coreboot.org/c/flashrom/+/72057/comment/dc08e98d_90a1f463
PS3, Line 1371: VL806
Is there a different between VL805 and VL806? This is the only mention of the second chip
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/c7b0fe3b_e32443d1
PS3, Line 4: * Copyright (C) 2019, 2020 Carl-Daniel Hailfinger
This is your copyright
https://review.coreboot.org/c/flashrom/+/72057/comment/cbe1f3cd_9fbc68df
PS3, Line 27: //#include "hwaccess.h"
Please remove this comment.
https://review.coreboot.org/c/flashrom/+/72057/comment/e6bcdfea_568b951f
PS3, Line 28: #include "hwaccess_x86_io.h"
This header is not needed, because the programmer doesn't do anything with I/O ports.
(see line 137)
https://review.coreboot.org/c/flashrom/+/72057/comment/718912f2_570babfc
PS3, Line 31: extern const struct dev_entry devs_vl805[];
This is not needed.
https://review.coreboot.org/c/flashrom/+/72057/comment/ba24dc43_400b35b0
PS3, Line 33: const struct dev_entry devs_vl805[] = {
Make this `static`. It is only used in this file.
https://review.coreboot.org/c/flashrom/+/72057/comment/52f5f643_97b62c1e
PS3, Line 38: static struct pci_dev *dev = NULL;
Can you please move this global into a programmer data struct, like it is done on e.g. the it8212.c programmer.
https://review.coreboot.org/c/flashrom/+/72057/comment/1700ac6a_23201f0d
PS3, Line 53: /* Some of the registers have unknown purpose and are just used inside the init sequence replay. */
Can you put these defines below the includes, ontop of all functions?
https://review.coreboot.org/c/flashrom/+/72057/comment/76a7c3b1_21a76f19
PS3, Line 72: uint32_t indata = 0;
: unsigned int curwritecnt = 0;
: unsigned int curreadcnt = 0;
These variables don't need to be initialized.
https://review.coreboot.org/c/flashrom/+/72057/comment/6b8c3f70_3c5c602b
PS3, Line 107: static const struct spi_master spi_master_vl805 = {
Can this controller handle SPI flashes with 4-byte addresses? Then you should add `.features = SPI_MASTER_4BA`
https://review.coreboot.org/c/flashrom/+/72057/comment/531b4192_a4ffa1d1
PS3, Line 131: int vl805_init(const struct programmer_cfg *cfg);
This prototype is not needed if the function is static.
https://review.coreboot.org/c/flashrom/+/72057/comment/6baa6082_11900120
PS3, Line 133: int vl805_init(const struct programmer_cfg *cfg)
this should be `static`
https://review.coreboot.org/c/flashrom/+/72057/comment/d9f74b91_a1b81306
PS3, Line 137: #if defined(__i386__) || defined(__x86_64__)
: if (rget_io_perms())
: return 1;
: #endif
This can be removed since the programmer doesn't deal with I/O ports
--
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: 3
Gerrit-Owner: ChrisEric1 CECL <christopherericlentocha(a)gmail.com>
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: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Comment-Date: Mon, 13 Feb 2023 10:32:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72657 )
Change subject: meson make: use VERSION file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/72657
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Idc17eadb397b3c579bddfbf9ae6bf1b171f5dfb7
Gerrit-Change-Number: 72657
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Mon, 13 Feb 2023 09:16:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72619 )
Change subject: move manpage to sphinx
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/72619
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iee9f1164c5913e47385e6f7d51dc7775a58b5a67
Gerrit-Change-Number: 72619
Gerrit-PatchSet: 6
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Mon, 13 Feb 2023 09:15:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72408 )
Change subject: dummyflasher: use new API to register shutdown function
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/72408
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0c67c25b0f53cd8c564c4ea0f09f2728e856f6ea
Gerrit-Change-Number: 72408
Gerrit-PatchSet: 4
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Mon, 13 Feb 2023 05:08:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Evan Benn.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71974 )
Change subject: flashrom_tester: Add positive check to verify_fail_test
......................................................................
Patch Set 10:
(1 comment)
File util/flashrom_tester/flashrom/src/cmd.rs:
https://review.coreboot.org/c/flashrom/+/71974/comment/57c43d70_996dd5c8
PS10, Line 274: Some
this doesn't type check.
https://review.coreboot.org/c/flashrom/+/72674
I think the forward fix is to drop the `Some()` constructor but perhaps this patch wasn't tested somehow?
--
To view, visit https://review.coreboot.org/c/flashrom/+/71974
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibbcc97086466b67cfab4f6c32140bb5f2c456beb
Gerrit-Change-Number: 71974
Gerrit-PatchSet: 10
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-Comment-Date: Mon, 13 Feb 2023 05:06:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Edward O'Callaghan has created a revert of this change. ( https://review.coreboot.org/c/flashrom/+/71974 )
Change subject: flashrom_tester: Add positive check to verify_fail_test
......................................................................
--
To view, visit https://review.coreboot.org/c/flashrom/+/71974
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibbcc97086466b67cfab4f6c32140bb5f2c456beb
Gerrit-Change-Number: 71974
Gerrit-PatchSet: 10
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: revert
Attention is currently required from: Peter Marheine, Evan Benn.
Hello build bot (Jenkins), Evan Benn, Peter Marheine,
I'd like you to do a code review.
Please visit
https://review.coreboot.org/c/flashrom/+/72674
to review the following change.
Change subject: Revert "flashrom_tester: Add positive check to verify_fail_test"
......................................................................
Revert "flashrom_tester: Add positive check to verify_fail_test"
This reverts commit 5735529d6209388079340a6fbd55e222a1c4c1b9.
Reason for revert: Fails to type-check in verify_region_from_file().
Change-Id: Ib8c99de7aca672f42b3159082e2e63e0fefef08f
---
M util/flashrom_tester/flashrom/src/cmd.rs
M util/flashrom_tester/flashrom/src/flashromlib.rs
M util/flashrom_tester/flashrom/src/lib.rs
M util/flashrom_tester/src/tests.rs
4 files changed, 15 insertions(+), 50 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/74/72674/1
diff --git a/util/flashrom_tester/flashrom/src/cmd.rs b/util/flashrom_tester/flashrom/src/cmd.rs
index 1f13a8e..85cbb12 100644
--- a/util/flashrom_tester/flashrom/src/cmd.rs
+++ b/util/flashrom_tester/flashrom/src/cmd.rs
@@ -269,18 +269,6 @@
Ok(())
}
- fn verify_region_from_file(&self, path: &Path, region: &str) -> Result<(), FlashromError> {
- let opts = FlashromOpt {
- io_opt: Some(IOOpt::Verify(OperationArgs::RegionFileRegion(
- region, path, None,
- ))),
- ..Default::default()
- };
-
- self.dispatch(opts, "verify_region_from_file")?;
- Ok(())
- }
-
fn erase(&self) -> Result<(), FlashromError> {
let opts = FlashromOpt {
io_opt: Some(IOOpt::Erase),
diff --git a/util/flashrom_tester/flashrom/src/flashromlib.rs b/util/flashrom_tester/flashrom/src/flashromlib.rs
index 5e1747b..bf09e6d 100644
--- a/util/flashrom_tester/flashrom/src/flashromlib.rs
+++ b/util/flashrom_tester/flashrom/src/flashromlib.rs
@@ -152,27 +152,6 @@
Ok(())
}
- fn verify_region_from_file(&self, path: &Path, region: &str) -> Result<(), FlashromError> {
- let mut layout = self.flashrom.borrow_mut().layout_read_fmap_from_rom()?;
- layout.include_region(region)?;
- let range = layout.get_region_range(region)?;
- let region_data = fs::read(path).map_err(|error| error.to_string())?;
- if region_data.len() != range.len() {
- return Err(format!(
- "verify region range ({}) does not match provided file size ({})",
- range.len(),
- region_data.len()
- )
- .into());
- }
- let mut buf = vec![0; self.get_size()? as usize];
- buf[range].copy_from_slice(®ion_data);
- self.flashrom
- .borrow_mut()
- .image_verify(&buf, Some(layout))?;
- Ok(())
- }
-
fn erase(&self) -> Result<(), FlashromError> {
self.flashrom.borrow_mut().erase()?;
Ok(())
diff --git a/util/flashrom_tester/flashrom/src/lib.rs b/util/flashrom_tester/flashrom/src/lib.rs
index 41393e8..7c86649 100644
--- a/util/flashrom_tester/flashrom/src/lib.rs
+++ b/util/flashrom_tester/flashrom/src/lib.rs
@@ -133,8 +133,7 @@
/// Read the whole flash to the file specified by `path`.
fn read_into_file(&self, path: &Path) -> Result<(), FlashromError>;
- /// Read only a region of the flash into the file specified by `path`. Note
- /// the first byte written to the file is the first byte from the region.
+ /// Read only a region of the flash.
fn read_region_into_file(&self, path: &Path, region: &str) -> Result<(), FlashromError>;
/// Write the whole flash to the file specified by `path`.
@@ -153,10 +152,6 @@
/// Verify the whole flash against the file specified by `path`.
fn verify_from_file(&self, path: &Path) -> Result<(), FlashromError>;
- /// Verify only the region against the file specified by `path`.
- /// Note the first byte in the file is matched against the first byte of the region.
- fn verify_region_from_file(&self, path: &Path, region: &str) -> Result<(), FlashromError>;
-
/// Erase the whole flash.
fn erase(&self) -> Result<(), FlashromError>;
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs
index 721a789..847bfec 100644
--- a/util/flashrom_tester/src/tests.rs
+++ b/util/flashrom_tester/src/tests.rs
@@ -44,7 +44,6 @@
use std::sync::atomic::AtomicBool;
const ELOG_FILE: &str = "/tmp/elog.file";
-const FW_MAIN_B_PATH: &str = "/tmp/FW_MAIN_B.bin";
/// Iterate over tests, yielding only those tests with names matching filter_names.
///
@@ -313,16 +312,7 @@
/// Check that flashrom 'verify' will fail if the provided data does not match the chip data.
fn verify_fail_test(env: &mut TestEnv) -> TestResult {
- env.ensure_golden()?;
- // Verify that verify is Ok when the data matches. We verify only a region
- // and not the whole chip because coprocessors or firmware may have written
- // some data in other regions.
- env.cmd
- .read_region_into_file(FW_MAIN_B_PATH.as_ref(), "FW_MAIN_B")?;
- env.cmd
- .verify_region_from_file(FW_MAIN_B_PATH.as_ref(), "FW_MAIN_B")?;
-
- // Verify that verify is false when the data does not match
+ // Comparing the flash contents to random data says they're not the same.
match env.verify(env.random_data_file()) {
Ok(_) => Err("Verification says flash is full of random data".into()),
Err(_) => Ok(()),
--
To view, visit https://review.coreboot.org/c/flashrom/+/72674
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib8c99de7aca672f42b3159082e2e63e0fefef08f
Gerrit-Change-Number: 72674
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-MessageType: newchange