aboutsummaryrefslogtreecommitdiff
path: root/hw/alpha/pci.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-07-08 15:46:37 -0700
committerRichard Henderson <rth@twiddle.net>2013-07-13 16:00:51 -0700
commit3661049fec64ffd7ab008e57e396881c6a4b53a4 (patch)
treeafe4553fa171b400785e729a1ed5f865ee244a02 /hw/alpha/pci.c
parent056e6bae1c91f47165d962564f82f5176bae47f0 (diff)
downloadqemu-3661049fec64ffd7ab008e57e396881c6a4b53a4.zip
qemu-3661049fec64ffd7ab008e57e396881c6a4b53a4.tar.gz
qemu-3661049fec64ffd7ab008e57e396881c6a4b53a4.tar.bz2
hw/alpha: Don't machine check on missing pci i/o
Not really correct, but we don't implement all of the random devices that the kernel looks for. This is good enough to keep us booting. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'hw/alpha/pci.c')
-rw-r--r--hw/alpha/pci.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/hw/alpha/pci.c b/hw/alpha/pci.c
index 25637e0..d839dd5 100644
--- a/hw/alpha/pci.c
+++ b/hw/alpha/pci.c
@@ -12,6 +12,32 @@
#include "sysemu/sysemu.h"
+/* Fallback for unassigned PCI I/O operations. Avoids MCHK. */
+
+static uint64_t ignore_read(void *opaque, hwaddr addr, unsigned size)
+{
+ return 0;
+}
+
+static void ignore_write(void *opaque, hwaddr addr, uint64_t v, unsigned size)
+{
+}
+
+const MemoryRegionOps alpha_pci_ignore_ops = {
+ .read = ignore_read,
+ .write = ignore_write,
+ .endianness = DEVICE_LITTLE_ENDIAN,
+ .valid = {
+ .min_access_size = 1,
+ .max_access_size = 8,
+ },
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 8,
+ },
+};
+
+
/* PCI config space reads/writes, to byte-word addressable memory. */
static uint64_t bw_conf1_read(void *opaque, hwaddr addr,
unsigned size)