David Hendricks has posted comments on this change. ( https://review.coreboot.org/25706 )
Change subject: linux_mtd: Import driver from ChromiumOS
......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/#/c/25706/10/linux_mtd.c
File linux_mtd.c:
https://review.coreboot.org/#/c/25706/10/linux_mtd.c@56
PS10, Line 56: msg_perr("Cannot open %s\n", path);
> Hmmp, this is on the default path for `-p internal` now... […]
Darn. The easy workaround just buries the issue. I also think we should avoid heuristics in try_mtd() since that part of the code should not assume to know which MTD device to test.
I think the best place to check this is in linux_mtd_init(). For now we can do a simple check with the assumption that we should not print errors unless the user intentionally specifies a bad sysfs node. Patch here: https://review.coreboot.org/c/flashrom/+/26500
--
To view, visit https://review.coreboot.org/25706
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3d6bb282863a5cf69909e28a1fc752b35f1b9599
Gerrit-Change-Number: 25706
Gerrit-PatchSet: 10
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Brian Norris <briannorris(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 24 May 2018 05:00:38 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/26500 )
Change subject: linux_mtd: Bail out early if sysfs node doesn't exist
......................................................................
Patch Set 2: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1303/ : SUCCESS
--
To view, visit https://review.coreboot.org/26500
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8dc965eecc68cd305a989016869c688fe1a3921f
Gerrit-Change-Number: 26500
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 24 May 2018 04:54:07 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/26500
to look at the new patch set (#2).
Change subject: linux_mtd: Bail out early if sysfs node doesn't exist
......................................................................
linux_mtd: Bail out early if sysfs node doesn't exist
This checks that the MTD sysfs node we will use actually exists prior
to calling setup code. Although the setup code will eventually catch
such an error, we need to think about the use case before printing a
possibly irrelevant/confusing error message to the terminal.
This patch makes it so that we only print an error message if the
user specifies a non-existent MTD device. Otherwise, the failure is
considered benign and we only print a debug message prior to bailing
out.
Change-Id: I8dc965eecc68cd305a989016869c688fe1a3921f
Signed-off-by: David Hendricks <dhendricks(a)fb.com>
---
M linux_mtd.c
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/26500/2
--
To view, visit https://review.coreboot.org/26500
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8dc965eecc68cd305a989016869c688fe1a3921f
Gerrit-Change-Number: 26500
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
David Hendricks has uploaded this change for review. ( https://review.coreboot.org/26500
Change subject: linux_mtd: Bail out early if sysfs node doesn't exist
......................................................................
linux_mtd: Bail out early if sysfs node doesn't exist
This checks that the MTD sysfs node we will use actually exists prior
to calling setup code. Although the setup code will eventually catch
such an error, we need to think about the use case before printing
possibly irrelevant/confusing error message to the terminal.
This patch makes it so that we only print an error message if the
user specifies a non-existent MTD device. Otherwise, the failure is
considered benign and we only print a debug message prior to bailing
out.
Change-Id: I8dc965eecc68cd305a989016869c688fe1a3921f
Signed-off-by: David Hendricks <dhendricks(a)fb.com>
---
M linux_mtd.c
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/26500/1
diff --git a/linux_mtd.c b/linux_mtd.c
index e65f093..ae8bef2 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -376,6 +376,24 @@
}
}
+ /*
+ * If user specified the MTD device number then error out if it doesn't
+ * appear to exist. Otherwise assume the error is benign and print a
+ * debug message. Bail out in either case.
+ */
+ char sysfs_path[32];
+ if (snprintf(sysfs_path, sizeof(sysfs_path), "%s/mtd%d", LINUX_MTD_SYSFS_ROOT, dev_num) < 0)
+ goto linux_mtd_init_exit;
+
+ struct stat s;
+ if (stat(sysfs_path, &s) < 0) {
+ if (param)
+ msg_perr("%s does not exist\n", sysfs_path);
+ else
+ msg_pdbg("%s does not exist\n", sysfs_path);
+ goto linux_mtd_init_exit;
+ }
+
if (linux_mtd_setup(dev_num))
goto linux_mtd_init_exit;
--
To view, visit https://review.coreboot.org/26500
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dc965eecc68cd305a989016869c688fe1a3921f
Gerrit-Change-Number: 26500
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Nico Huber has posted comments on this change. ( https://review.coreboot.org/25706 )
Change subject: linux_mtd: Import driver from ChromiumOS
......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/#/c/25706/10/linux_mtd.c
File linux_mtd.c:
https://review.coreboot.org/#/c/25706/10/linux_mtd.c@56
PS10, Line 56: msg_perr("Cannot open %s\n", path);
Hmmp, this is on the default path for `-p internal` now...
Easy workaround: Make it msg_pdbg(). Better: Check in advance
if the file exists in try_mtd() case.
--
To view, visit https://review.coreboot.org/25706
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3d6bb282863a5cf69909e28a1fc752b35f1b9599
Gerrit-Change-Number: 25706
Gerrit-PatchSet: 10
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Brian Norris <briannorris(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 23 May 2018 12:10:59 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Hello Arthur Heymans, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/26261
to look at the new patch set (#4).
Change subject: Enable writes with active ME
......................................................................
Enable writes with active ME
Replace the `ich_spi_force` logic with more helpful warnings. These can
be hidden later, in case the necessary switches are detected. Also,
demote some warnings about settings that are the default nowadays (e.g.
SPI configuration lock, inaccessible ME region).
Change-Id: I94a5e7074b845c227e43d76d04dd1a71082a1cef
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M flashrom.8.tmpl
M ichspi.c
2 files changed, 39 insertions(+), 54 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/61/26261/4
--
To view, visit https://review.coreboot.org/26261
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I94a5e7074b845c227e43d76d04dd1a71082a1cef
Gerrit-Change-Number: 26261
Gerrit-PatchSet: 4
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has posted comments on this change. ( https://review.coreboot.org/26261 )
Change subject: Enable writes with active ME
......................................................................
Patch Set 3:
(4 comments)
https://review.coreboot.org/#/c/26261/2/ichspi.c
File ichspi.c:
https://review.coreboot.org/#/c/26261/2/ichspi.c@1591
PS2, Line 1591:
> NO_PROT, same for below.
Done
https://review.coreboot.org/#/c/26261/2/ichspi.c@1607
PS2, Line 1607:
> I guess, I did to much SPARK lately (where you can decide about […]
Done
https://review.coreboot.org/#/c/26261/2/ichspi.c@1635
PS2, Line 1635: g
> NO_PROT
Done
https://review.coreboot.org/#/c/26261/2/ichspi.c@1854
PS2, Line 1854: rw_restricted)
: msg_pinfo("Not all flash regions are freely accessible by flashrom. This is "
: "most likely\ndue to an active ME. Please
> Well, it will also show the message below. I have no strong feelings […]
Done
--
To view, visit https://review.coreboot.org/26261
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I94a5e7074b845c227e43d76d04dd1a71082a1cef
Gerrit-Change-Number: 26261
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 19 May 2018 15:26:39 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No