summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2012-07-20 13:44:50 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-07-20 23:37:55 +0200
commitc4b2a1b6de9671a7e6672de5fb99068d05eba269 (patch)
tree69921cfed04b3526d020570cd97145f4d9612a72 /src
parentbcdbe90296bad7fdf56416e9713789194fb83aa3 (diff)
downloadcoreboot-c4b2a1b6de9671a7e6672de5fb99068d05eba269.tar.xz
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@secunet.com> Reviewed-on: http://review.coreboot.org/1249 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/devices/Kconfig12
-rw-r--r--src/devices/oprom/yabel/io.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/devices/Kconfig b/src/devices/Kconfig
index cec2048931..d83d551b5f 100644
--- a/src/devices/Kconfig
+++ b/src/devices/Kconfig
@@ -98,6 +98,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 00bb1a0d2f..5c19b5142c 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) {