From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 2/4] hw/alpha: Don't machine check on missing pci i/o
Date: Mon, 8 Jul 2013 18:01:10 -0700 [thread overview]
Message-ID: <1373331672-19852-3-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1373331672-19852-1-git-send-email-rth@twiddle.net>
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>
---
hw/alpha/alpha_sys.h | 1 +
hw/alpha/pci.c | 26 ++++++++++++++++++++++++++
hw/alpha/typhoon.c | 3 ++-
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/hw/alpha/alpha_sys.h b/hw/alpha/alpha_sys.h
index 0987851..e11025b 100644
--- a/hw/alpha/alpha_sys.h
+++ b/hw/alpha/alpha_sys.h
@@ -14,6 +14,7 @@ PCIBus *typhoon_init(ram_addr_t, ISABus **, qemu_irq *, AlphaCPU *[4],
pci_map_irq_fn);
/* alpha_pci.c. */
+extern const MemoryRegionOps alpha_pci_ignore_ops;
extern const MemoryRegionOps alpha_pci_conf1_ops;
extern const MemoryRegionOps alpha_pci_iack_ops;
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)
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index b7718c4..fa71c8a 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -772,7 +772,8 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,
&s->pchip.reg_mem);
/* Pchip0 PCI I/O, 0x801.FC00.0000, 32MB. */
- memory_region_init(&s->pchip.reg_io, OBJECT(s), "pci0-io", 32*MB);
+ memory_region_init_io(&s->pchip.reg_io, OBJECT(s), &alpha_pci_ignore_ops,
+ NULL, "pci0-io", 32*MB);
memory_region_add_subregion(addr_space, 0x801fc000000ULL,
&s->pchip.reg_io);
--
1.8.1.4
next prev parent reply other threads:[~2013-07-09 1:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 1:01 [Qemu-devel] [PATCH 0/4] alpha-softmmu fixes Richard Henderson
2013-07-09 1:01 ` [Qemu-devel] [PATCH 1/4] hw/alpha: Don't use get_system_io Richard Henderson
2013-07-09 1:01 ` Richard Henderson [this message]
2013-07-09 1:01 ` [Qemu-devel] [PATCH 3/4] exec: Support 64-bit operations in address_space_rw Richard Henderson
2013-07-14 6:38 ` Paolo Bonzini
2013-07-09 1:01 ` [Qemu-devel] [PATCH 4/4] hw/alpha: Drop latch_tmp hack Richard Henderson
2013-07-09 17:43 ` [Qemu-devel] [PATCH 0/4] alpha-softmmu fixes Rob Landley
2013-07-10 13:49 ` Richard Henderson
2013-07-14 6:05 ` Rob Landley
2013-07-15 1:19 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373331672-19852-3-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).