Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/67863 )
Change subject: chipset_enable.c: Disable SPI on ICH7 if booted from LPC
......................................................................
chipset_enable.c: Disable SPI on ICH7 if booted from LPC
Commit 92d6a86 ("Refactor Intel Chipset Enables") eliminated a check
to disable SPI when ICH7 has booted from LPC, as the hardware does not
support it. Therefore, when flashrom probes the SPI bus, it times out
waiting for the hardware to react, for each and every SPI flash chip.
This results in very long delays and countless instances of the error:
Error: SCIP never cleared!
To prevent this, bring back part of the lost check. Probing for LPC and
FWH when booted from SPI does not seem to cause any problems on desktop
mainboards with ICH7, so don't disable LPC nor FWH if that is the case.
Tested on ECS 945G-M4 (ICH7, boots from LPC), works without errors.
Change-Id: I5e59e66a2dd16b07f2dca410997fce38ab9c8fd1
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/40401
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas(a)noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67863
Reviewed-by: Elyes Haouas <ehaouas(a)noos.fr>
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M chipset_enable.c
1 file changed, 38 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Elyes Haouas: Looks good to me, approved
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/chipset_enable.c b/chipset_enable.c
index 84e4b6b..0dfe267 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -757,6 +757,14 @@
if (ret_fwh == ERROR_FATAL)
return ret_fwh;
+ /*
+ * It seems that the ICH7 does not support SPI and LPC chips at the same time. When booted
+ * from LPC, the SCIP bit will never clear, which causes long delays and many error messages.
+ * To avoid this, we will not enable SPI on ICH7 when the southbridge is strapped to LPC.
+ */
+ if (ich_generation == CHIPSET_ICH7 && (boot_buses & BUS_LPC))
+ return 0;
+
/* SPIBAR is at RCRB+0x3020 for ICH[78], Tunnel Creek and Centerton, and RCRB+0x3800 for ICH9. */
uint16_t spibar_offset;
switch (ich_generation) {
--
To view, visit https://review.coreboot.org/c/flashrom/+/67863
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.2.x
Gerrit-Change-Id: I5e59e66a2dd16b07f2dca410997fce38ab9c8fd1
Gerrit-Change-Number: 67863
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/67862 )
Change subject: spi95: Check for success before using send_command's returned data
......................................................................
spi95: Check for success before using send_command's returned data
If the transfer failed, the data might be invalid.
Change-Id: I3ad9daa00a54e2a3954983cec91b6685f1a98880
Found-By: Coverity Scan #1405870
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/40970
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67862
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M spi95.c
1 file changed, 22 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/spi95.c b/spi95.c
index ecb2c1d..976f99a 100644
--- a/spi95.c
+++ b/spi95.c
@@ -33,12 +33,15 @@
static const unsigned char cmd[ST_M95_RDID_OUTSIZE_MAX] = { ST_M95_RDID };
unsigned char readarr[ST_M95_RDID_INSIZE];
uint32_t id1, id2;
+ int ret;
uint32_t rdid_outsize = ST_M95_RDID_2BA_OUTSIZE; // 16 bit address
if (flash->chip->total_size * KiB > 64 * KiB)
rdid_outsize = ST_M95_RDID_3BA_OUTSIZE; // 24 bit address
- spi_send_command(flash, rdid_outsize, sizeof(readarr), cmd, readarr);
+ ret = spi_send_command(flash, rdid_outsize, sizeof(readarr), cmd, readarr);
+ if (ret)
+ return ret;
id1 = readarr[0]; // manufacture id
id2 = (readarr[1] << 8) | readarr[2]; // SPI family code + model id
--
To view, visit https://review.coreboot.org/c/flashrom/+/67862
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.2.x
Gerrit-Change-Id: I3ad9daa00a54e2a3954983cec91b6685f1a98880
Gerrit-Change-Number: 67862
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/67860 )
Change subject: test_build.sh: Move build test procedure to repository
......................................................................
test_build.sh: Move build test procedure to repository
Instead of hard coding the test procedure on qa.coreboot.org, allow
running a script in the repo instead. The server is already adapted
to do that, so once there's a test_build.sh file in the toplevel
directory, it's run in place of the default operation.
The content of this change mirrors the default operation exactly so
should serve as a good starting point.
The script is executed in an encapsulate[0] context with the workspace,
/tmp and $HOME/.ccache writable, everything else read-only and
network disabled.
It should return 0 on success, anything else on failure, as is normal
for UNIX processes.
[0] https://review.coreboot.org/cgit/encapsulate.git
(Backported minus the Meson support)
Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46894
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62617
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Tested-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67860
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
A test_build.sh
1 file changed, 41 insertions(+), 0 deletions(-)
Approvals:
Nico Huber: Verified
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/test_build.sh b/test_build.sh
new file mode 100755
index 0000000..3ab5319
--- /dev/null
+++ b/test_build.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+
+make CONFIG_EVERYTHING=yes WARNERROR=yes
--
To view, visit https://review.coreboot.org/c/flashrom/+/67860
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.2.x
Gerrit-Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95
Gerrit-Change-Number: 67860
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/67844 )
Change subject: pcidev.c: populate IDs with pci_fill_info()
......................................................................
pcidev.c: populate IDs with pci_fill_info()
With pciutils 3.7.0, flashrom is unable to match any PCI devices by
vendor/device ID because the vendor_id and device_id fields of struct
pci_dev are not filled in.
Call pci_fill_info() to request these identifiers before trying to match
them against the supported device list.
The pciutils ChangeLog for 3.7.0 mentions that the documentation and
back-end behavior for pci_fill_info() was updated; it seems that a call
to pci_fill_info() was always intended to be required, but some backends
(such as the sysfs one used on Linux) would fill the identifier fields
even when not requested by the user. The pci_fill_info() function and
the PCI_FILL_IDENT flag have been available for all versions of pciutils
since at least 2.0 from 1999, so it should be safe to add without any
version checks.
With this change, reading/writing a nicintel_spi boot ROM is successful.
Signed-off-by: Daniel Verkamp <dverkamp(a)chromium.org>
Change-Id: Ia011d4d801f8a54160e45a70b14b740e6dcc00ef
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46310
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67844
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M pcidev.c
1 file changed, 36 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
Edward O'Callaghan: Looks good to me, approved
diff --git a/pcidev.c b/pcidev.c
index f4e5542..4bc32c1 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -211,6 +211,7 @@
for (dev = pacc->devices; dev; dev = dev->next) {
if (pci_filter_match(&filter, dev)) {
+ pci_fill_info(dev, PCI_FILL_IDENT);
/* Check against list of supported devices. */
for (i = 0; devs[i].device_name != NULL; i++)
if ((dev->vendor_id == devs[i].vendor_id) &&
--
To view, visit https://review.coreboot.org/c/flashrom/+/67844
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.0.x
Gerrit-Change-Id: Ia011d4d801f8a54160e45a70b14b740e6dcc00ef
Gerrit-Change-Number: 67844
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Daniel Verkamp <dverkamp(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/67842 )
Change subject: chipset_enable.c: check return value from rphysmap() call
......................................................................
chipset_enable.c: check return value from rphysmap() call
Port from the ChromiumOS fork of flashrom.
Change-Id: I8075fe5f80ac0da5280d2f0de6829ed3a2496476
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46444
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Sam McNally <sammc(a)google.com>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67842
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
---
M chipset_enable.c
1 file changed, 21 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
Angel Pons: Looks good to me, approved
Edward O'Callaghan: Looks good to me, approved
diff --git a/chipset_enable.c b/chipset_enable.c
index 3437792..67ce761 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -934,6 +934,8 @@
uint32_t sbase = pci_read_long(dev, 0x54) & 0xfffffe00;
msg_pdbg("SPI_BASE_ADDRESS = 0x%x\n", sbase);
void *spibar = rphysmap("BYT SBASE", sbase, 512); /* Last defined address on Bay Trail is 0x100 */
+ if (spibar == ERROR_PTR)
+ return ERROR_FATAL;
/* Enable Flash Writes.
* Silvermont-based: BCR at SBASE + 0xFC (some bits of BCR are also accessible via BC at IBASE + 0x1C).
--
To view, visit https://review.coreboot.org/c/flashrom/+/67842
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.0.x
Gerrit-Change-Id: I8075fe5f80ac0da5280d2f0de6829ed3a2496476
Gerrit-Change-Number: 67842
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged