Attention is currently required from: Nico Huber, Edward O'Callaghan.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62832 )
Change subject: Makefile: build shared usb code only when needed by programmer
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> While I can see the reasoning for this and it makes sense I have a supplementary argument to Nico's […]
This patch changes only the reason why the usb_device.c and usbdev.c are build. There are no changes from the compiler or linkers view. The functions in usb_device.c or usbdev.c are part of the programmer and just outsourced for reuse in other programmers. Therefore it should be build as part of the programmer and not as part of the dependency.
--
To view, visit https://review.coreboot.org/c/flashrom/+/62832
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9a91c5801a573e7021686a183a1bd874122e35cc
Gerrit-Change-Number: 62832
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Mon, 11 Apr 2022 08:42:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/63543 )
Change subject: internal.c: Fix map_flash() failures with linux_mtd via internal
......................................................................
internal.c: Fix map_flash() failures with linux_mtd via internal
prepare_flash_access() calls into map_flash() however this can
fail on some DUT's. The issue is that map_flash() can fail on
opaque spi masters such as linux_mtd and even ichspi when they
are dispatched into via 'internal'.
The issue with 'internal' is that the hook 'map_flash_region = physmap'
is used from the internal struct entry-point instance and not the native
one for the underlying master. This fails on some board topologies such
Volteer.
Structually this is not easy to solve with how internal is currently
implemented where it partially replaces itself with the underlying
master and so this fix only addresses the case of linux_mtd.
BUG=b:171093672
TEST=builds
Change-Id: Ia32ff1357b73166cdcec8a62ab5c516d1d1527f5
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M internal.c
1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/43/63543/1
diff --git a/internal.c b/internal.c
index 4049ef1..57b6ed6 100644
--- a/internal.c
+++ b/internal.c
@@ -188,6 +188,8 @@
return 0;
}
+static bool is_phys_master = true;
+
static int internal_init(void)
{
int ret = 0;
@@ -213,6 +215,7 @@
internal_buses_supported = BUS_NONSPI;
if (try_mtd() == 0) {
+ is_phys_master = false;
ret = 0;
goto internal_init_exit;
}
@@ -339,12 +342,26 @@
return ret;
}
+static void *internal_map_flash_region(const char *descr, uintptr_t phys_addr, size_t len)
+{
+ if (is_phys_master)
+ return physmap(descr, phys_addr, len);
+ return fallback_map(descr, phys_addr, len);
+}
+
+static void internal_unmap_flash_region(void *virt_addr, size_t len)
+{
+ if (is_phys_master)
+ return physunmap(virt_addr, len);
+ return fallback_unmap(virt_addr, len);
+}
+
const struct programmer_entry programmer_internal = {
.name = "internal",
.type = OTHER,
.devs.note = NULL,
.init = internal_init,
- .map_flash_region = physmap,
- .unmap_flash_region = physunmap,
+ .map_flash_region = internal_map_flash_region,
+ .unmap_flash_region = internal_unmap_flash_region,
.delay = internal_delay,
};
--
To view, visit https://review.coreboot.org/c/flashrom/+/63543
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia32ff1357b73166cdcec8a62ab5c516d1d1527f5
Gerrit-Change-Number: 63543
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Felix Singer, Nico Huber, Thomas Heijligen.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62833 )
Change subject: print_buildinfo: remove unreachable print of libpci version
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/62833
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0b5dbf3bd82a2ffe64b73881383e92f7dad4c382
Gerrit-Change-Number: 62833
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Mon, 11 Apr 2022 04:51:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63469 )
Change subject: Drop STANDALONE mode
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/63469/comment/3ff308a7_40ad24e9
PS2, Line 11: For a while now, the code which is covered by STANDALONE has
: moved to cli_*.c and is not used for libflashrom
Wonderful!
--
To view, visit https://review.coreboot.org/c/flashrom/+/63469
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I58fb82270a9884a323d9850176708d230fdc5165
Gerrit-Change-Number: 63469
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 11 Apr 2022 04:51:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Thomas Heijligen.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62832 )
Change subject: Makefile: build shared usb code only when needed by programmer
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> Yes, that is correct. I just want to make sure we are not too pedantic […]
While I can see the reasoning for this and it makes sense I have a supplementary argument to Nico's diff reduction maintenance one.
I would rather we go the other way as by reducing both build system and pre-processor cyclomatic complexity means that the compiler is more likely to see a more consistent picture of the tree as the moving window of changes sweeps HEAD. Furthermore, it lets the linker in the toolchain do it's job and cull symbols that are not required in the resulting binary rather than trying to pre-optimise at the build system level. The associativity property should rather be done at the build target level to again, let the build system do its job of relationship management best.
Hopefully my thinking makes sense here Thomas, however thanks for the different prospective too!
--
To view, visit https://review.coreboot.org/c/flashrom/+/62832
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9a91c5801a573e7021686a183a1bd874122e35cc
Gerrit-Change-Number: 62832
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Mon, 11 Apr 2022 04:49:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: comment