David Hendricks has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/43052 )
Change subject: util/ich_descriptors_tool: Use GNU-style printf in MinGW
......................................................................
util/ich_descriptors_tool: Use GNU-style printf in MinGW
This allows MinGW targets to use certain printf formatting
identifiers such as "%v" by adding -D__USE_MINGW_ANSI_STDIO=1 to
the CFLAGS. This is also done in flashrom's top-level Makefile.
Reported on https://github.com/flashrom/flashrom/issues/149
Change-Id: I644be8b5b607cc77b4be2121c443f0d41d8da687
Signed-off-by: David Hendricks <david.hendricks(a)gmail.com>
---
M util/ich_descriptors_tool/Makefile
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/52/43052/1
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index c32e30b..8962431 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -41,6 +41,10 @@
CFLAGS += -Wno-format
endif
+ifeq ($(TARGET_OS), MinGW)
+CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+endif
+
ifeq ($(WARNERROR), yes)
CFLAGS += -Werror
endif
--
To view, visit https://review.coreboot.org/c/flashrom/+/43052
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I644be8b5b607cc77b4be2121c443f0d41d8da687
Gerrit-Change-Number: 43052
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-MessageType: newchange
Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, Edward O'Callaghan.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56721 )
Change subject: flashrom: Return early from map_flash for >16MiB on x86
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
IIRC, the call to map_flash() is spurious for most chips (all SPI maybe?),
so I would prefer to avoid the call instead.
--
To view, visit https://review.coreboot.org/c/flashrom/+/56721
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I60244b6970118dbdfdbb5b8424fc0a8acd9def2e
Gerrit-Change-Number: 56721
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Comment-Date: Sat, 31 Jul 2021 21:51:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/56721 )
Change subject: flashrom: Return early from map_flash for >16MiB on x86
......................................................................
flashrom: Return early from map_flash for >16MiB on x86
In the case of a flash chip bigger than 16 MiB, x86 chipsets are only
able to map the topmost 16 MiB of the chip into memory. To access the
rest, flashrom can use hardware sequencing, therefore return early
from `map_flash()` in this situation; this avoids messages like the
following in Linux kernel logs:
[ 57.715654] x86/PAT: flashrom:2805 conflicting memory types fe0000...
[ 57.726270] x86/PAT: memtype_reserve failed [mem 0xfe000000-0xffff...
BUG=b:185021901
TEST=On a system with a W25Q256.V (32MB), flashrom logs show:
$ flashrom -p host -r bios.bin
...
Found Winbond flash chip "W25Q256.V" (32768 kB, Programmer-specific) ...
Chipset unable to map >16 MiB of flash below 0xffffffff, falling back...
Reading flash... done.
SUCCESS
Signed-off-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Change-Id: I60244b6970118dbdfdbb5b8424fc0a8acd9def2e
---
M flashrom.c
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/56721/1
diff --git a/flashrom.c b/flashrom.c
index 3987bb9..dea96b7 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -697,6 +697,17 @@
return 0;
const chipsize_t size = flash->chip->total_size * 1024;
+
+#if IS_X86
+ /* No known x86 chipset maps more than 16 MiB of the flash into memory
+ * below 0xfffffff, therefore return early here. */
+ if (size > 16 * MiB) {
+ msg_cinfo("Chipset unable to map >16 MiB of flash below 0xffffffff,"
+ "falling back to hardware sequencing.\n");
+ return 1;
+ }
+#endif
+
uintptr_t base = flashbase ? flashbase : (0xffffffff - size + 1);
void *addr = programmer_map_flash_region(flash->chip->name, base, size);
if (addr == ERROR_PTR) {
--
To view, visit https://review.coreboot.org/c/flashrom/+/56721
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I60244b6970118dbdfdbb5b8424fc0a8acd9def2e
Gerrit-Change-Number: 56721
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: newchange