[coreboot] New patch to review for coreboot: 3bb096d Allow YABEL to fake write accesses to config space

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Fri Jul 20 13:54:09 CEST 2012


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1249

-gerrit

commit 3bb096d434e40819c882e841efc93c4b5d68f20a
Author: Patrick Georgi <patrick.georgi at secunet.com>
Date:   Fri Jul 20 13:44:50 2012 +0200

    Allow YABEL to fake write accesses to config space
    
    A new Kconfig option tells YABEL to succeed on write accesses
    on other devices' config space without performing the actual
    write.
    This is enough for some basic bus modification done by some
    Option ROMs.
    
    Change-Id: Iab04f3a5c350b96654da4ba26858037f4c4b5c0a
    Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
---
 src/devices/Kconfig          |   12 ++++++++++++
 src/devices/oprom/yabel/io.c |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/devices/Kconfig b/src/devices/Kconfig
index 5168819..87be8c0 100644
--- a/src/devices/Kconfig
+++ b/src/devices/Kconfig
@@ -105,6 +105,18 @@ config YABEL_PCI_ACCESS_OTHER_DEVICES
 	  onboard graphics chips whose Option ROM needs to reconfigure the
 	  north bridge.
 
+config YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG
+	prompt "Fake success on writing other device's config space"
+	bool
+	depends on YABEL_PCI_ACCESS_OTHER_DEVICES
+	help
+	  By default, YABEL aborts when the Option ROM tries to write to other
+	  devices' config spaces. With this option enabled, the write doesn't
+	  follow through, but the Option ROM is allowed to go on.
+	  This can create issues such as hanging Option ROMs (if it depends on
+	  that other register changing to the written value), so test for
+	  impact before using this option.
+
 config YABEL_VIRTMEM_LOCATION
 	prompt "Location of YABEL's virtual memory"
 	hex
diff --git a/src/devices/oprom/yabel/io.c b/src/devices/oprom/yabel/io.c
index 00bb1a0..5c19b51 100644
--- a/src/devices/oprom/yabel/io.c
+++ b/src/devices/oprom/yabel/io.c
@@ -524,7 +524,9 @@ pci_cfg_write(X86EMU_pioAddr addr, u32 val, u8 size)
 				printf
 				    ("Config write access invalid! PCI device %x:%x.%x, offs: %x\n",
 				     bus, devfn >> 3, devfn & 7, offs);
+#if !CONFIG_YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG
 				HALT_SYS();
+#endif
 			} else {
 #if CONFIG_PCI_OPTION_ROM_RUN_YABEL
 				switch (size) {




More information about the coreboot mailing list