Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/33931
Change subject: flashchips.c: Sort file by vendor and model
......................................................................
flashchips.c: Sort file by vendor and model
For self-consistency, and to allow tools to assist with merging the
chromium fork of flashrom, sort the entries of flashchips.c. The file is
already largely sorted, though deviations have crept in over time.
This is a non-clever mostly ASCII-order sorting. It is not intended to
be permanent. Post-merge we can explore options such as breaking apart
flashchips.c into per-vendor files or directories.
Change-Id: I75a99583592526f60ba5264e92391bf8b1213b20
---
M flashchips.c
1 file changed, 5,510 insertions(+), 5,510 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/33931/1
--
To view, visit https://review.coreboot.org/c/flashrom/+/33931
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I75a99583592526f60ba5264e92391bf8b1213b20
Gerrit-Change-Number: 33931
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34073 )
Change subject: chipset_enable: Mark Intel/CM246 as DEP
......................................................................
chipset_enable: Mark Intel/CM246 as DEP
The usual ME-lock limitations apply, so this is DEP instead
of OK.
Tested on Siemens/Field PG M6, and also regression tested on
Apollo Lake and Skylake. Flashrom works fine, and logs and
descriptor dumps look good. Also, register and descriptor
output agree on the flash layout and permissions.
Change-Id: I40db4773f127bec63e377e1d2ab402b47edf9a61
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M chipset_enable.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/73/34073/1
diff --git a/chipset_enable.c b/chipset_enable.c
index 3773158..f75f94d 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -2044,7 +2044,7 @@
{0x8086, 0xa30a, B_S, NT, "Intel", "C242", enable_flash_pch300},
{0x8086, 0xa30c, B_S, NT, "Intel", "QM370", enable_flash_pch300},
{0x8086, 0xa30d, B_S, NT, "Intel", "HM370", enable_flash_pch300},
- {0x8086, 0xa30e, B_S, NT, "Intel", "CM246", enable_flash_pch300},
+ {0x8086, 0xa30e, B_S, DEP, "Intel", "CM246", enable_flash_pch300},
#endif
{0},
};
--
To view, visit https://review.coreboot.org/c/flashrom/+/34073
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I40db4773f127bec63e377e1d2ab402b47edf9a61
Gerrit-Change-Number: 34073
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34076 )
Change subject: chipset_enable: Add support for Cannon Lake U Premium
......................................................................
chipset_enable: Add support for Cannon Lake U Premium
Add support for Cannon Lake U Premium (CFL-U/WHL-U).
Same as discrete 300-series CNP PCH.
Tested on out-of-tree WHL-U board.
Change-Id: I8a318d63cf408a3b2cec436a3fa6e26cf8552ead
Signed-off-by: Matt DeVillier <matt.devillier(a)puri.sm>
---
M chipset_enable.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/76/34076/1
diff --git a/chipset_enable.c b/chipset_enable.c
index 3773158..e880e73 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -1995,6 +1995,7 @@
{0x8086, 0x9d53, B_S, NT, "Intel", "Kaby Lake U Base", enable_flash_pch100},
{0x8086, 0x9d56, B_S, NT, "Intel", "Kaby Lake Y Premium", enable_flash_pch100},
{0x8086, 0x9d58, B_S, NT, "Intel", "Kaby Lake U Premium", enable_flash_pch100},
+ {0x8086, 0x9d84, B_S, NT, "Intel", "Cannon Lake U Premium", enable_flash_pch300},
{0x8086, 0xa141, B_S, NT, "Intel", "Sunrise Point Desktop Sample", enable_flash_pch100},
{0x8086, 0xa142, B_S, NT, "Intel", "Sunrise Point Unknown Sample", enable_flash_pch100},
{0x8086, 0xa143, B_S, NT, "Intel", "H110", enable_flash_pch100},
--
To view, visit https://review.coreboot.org/c/flashrom/+/34076
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8a318d63cf408a3b2cec436a3fa6e26cf8552ead
Gerrit-Change-Number: 34076
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-MessageType: newchange
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34584 )
Change subject: Add support for continuous SPI reads
......................................................................
Add support for continuous SPI reads
Forward port the original patch from Duncan Laurie <dlaurie(a)chromium.org>
in commit 06ffd5263892061c5ebf46e52b7878786cf2cece so that it fits for
upstream consumption.
This patch adds support for "unbounded reads" which are for continous
reads to a SPI flash chip instead of reading in page size blocks.
This speeds up the flash process over FTDI by quite a bit, testing
the read of a 16MB part it goes from 2m11s to 0m15s.
Change-Id: I804545aeb1b827ffdd41b21024fd618475e8263a
Signed-off-by: Edward O'Callaghan <quasisec(a)chromium.org>
---
M chipdrivers.h
M flash.h
M spi.c
M spi25.c
4 files changed, 40 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/84/34584/1
diff --git a/chipdrivers.h b/chipdrivers.h
index e380878..77e1943 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -55,6 +55,7 @@
int spi_chip_write_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int spi_nbyte_read(struct flashctx *flash, unsigned int addr, uint8_t *bytes, unsigned int len);
int spi_read_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize);
+int spi_read_unbound(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize);
int spi_write_chunked(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize);
int spi_enter_4ba(struct flashctx *flash);
int spi_exit_4ba(struct flashctx *flash);
diff --git a/flash.h b/flash.h
index b60a980..981f88b 100644
--- a/flash.h
+++ b/flash.h
@@ -143,6 +143,8 @@
#define ERASED_VALUE(flash) (((flash)->chip->feature_bits & FEATURE_ERASED_ZERO) ? 0x00 : 0xff)
+#define FEATURE_UNBOUND_READ (1 << 19)
+
enum test_state {
OK = 0,
NT = 1, /* Not tested */
diff --git a/spi.c b/spi.c
index 489baf3..23f4cfe 100644
--- a/spi.c
+++ b/spi.c
@@ -75,13 +75,18 @@
unsigned int len)
{
unsigned int max_data = flash->mst->spi.max_data_read;
+ int rc;
if (max_data == MAX_DATA_UNSPECIFIED) {
msg_perr("%s called, but SPI read chunk size not defined "
"on this hardware. Please report a bug at "
"flashrom(a)flashrom.org\n", __func__);
return 1;
}
- return spi_read_chunked(flash, buf, start, len, max_data);
+ if (flash->feature_bits & FEATURE_UNBOUND_READ)
+ rc = spi_read_unbound(flash, buf, start, len, max_data);
+ else
+ rc = spi_read_chunked(flash, buf, start, len, max_data);
+ return rc;
}
int default_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
diff --git a/spi25.c b/spi25.c
index 2a1d492..3327110 100644
--- a/spi25.c
+++ b/spi25.c
@@ -659,6 +659,37 @@
}
/*
+ * Read a part of the flash chip.
+ * Ignore pages and read the data continuously, the only bound is the chunksize.
+ */
+int spi_read_unbound(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize)
+{
+ int rc = 0;
+ unsigned int i;
+
+ for (i = start; i < (start + len); i += chunksize) {
+ int chunk_status = 0;
+ unsigned int toread = min(chunksize, start + len - i);
+
+ chunk_status = spi_nbyte_read(flash, i, buf + (i - start), toread);
+ if (chunk_status) {
+ if (ignore_error(chunk_status)) {
+ /* fill this chunk with 0xff bytes and
+ let caller know about the error */
+ memset(buf + (i - start), 0xff, toread);
+ rc = chunk_status;
+ continue;
+ } else {
+ rc = chunk_status;
+ break;
+ }
+ }
+ }
+
+ return rc;
+}
+
+/*
* Write a part of the flash chip.
* FIXME: Use the chunk code from Michael Karcher instead.
* Each page is written separately in chunks with a maximum size of chunksize.
--
To view, visit https://review.coreboot.org/c/flashrom/+/34584
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I804545aeb1b827ffdd41b21024fd618475e8263a
Gerrit-Change-Number: 34584
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newchange