From: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, pbonzini@redhat.com,
Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>
Subject: [Qemu-devel] [PATCH] Enable 8-byte wide MMIO for 16550 serial devices
Date: Tue, 31 Oct 2017 11:24:43 -0400 [thread overview]
Message-ID: <20171031152443.3670-1-michael.nawrocki@gtri.gatech.edu> (raw)
Some drivers for the PPMC7400 PowerPC evaluation board accesses the
serial registers through the floating point unit (stfd/ldfd), which is
an 8-byte wide access. This patch enables that behavior.
Signed-off-by: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>
---
hw/char/serial.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 376bd2f240..c16c19a406 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -1005,7 +1005,7 @@ static void serial_mm_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
SerialState *s = opaque;
- value &= ~0u >> (32 - (size * 8));
+ value &= ~((uint64_t)0) >> (64 - (size * 8));
serial_ioport_write(s, addr >> s->it_shift, value, 1);
}
@@ -1014,16 +1014,22 @@ static const MemoryRegionOps serial_mm_ops[3] = {
.read = serial_mm_read,
.write = serial_mm_write,
.endianness = DEVICE_NATIVE_ENDIAN,
+ .valid.max_access_size = 8,
+ .impl.max_access_size = 8,
},
[DEVICE_LITTLE_ENDIAN] = {
.read = serial_mm_read,
.write = serial_mm_write,
.endianness = DEVICE_LITTLE_ENDIAN,
+ .valid.max_access_size = 8,
+ .impl.max_access_size = 8,
},
[DEVICE_BIG_ENDIAN] = {
.read = serial_mm_read,
.write = serial_mm_write,
.endianness = DEVICE_BIG_ENDIAN,
+ .valid.max_access_size = 8,
+ .impl.max_access_size = 8,
},
};
--
2.14.2
next reply other threads:[~2017-10-31 15:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 15:24 Mike Nawrocki [this message]
2017-11-02 18:09 ` [Qemu-devel] [PATCH] Enable 8-byte wide MMIO for 16550 serial devices Paolo Bonzini
2017-11-02 19:28 ` Philippe Mathieu-Daudé
2017-11-02 20:04 ` Paolo Bonzini
2017-11-06 16:08 ` Michael Nawrocki
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=20171031152443.3670-1-michael.nawrocki@gtri.gatech.edu \
--to=michael.nawrocki@gtri.gatech.edu \
--cc=mst@redhat.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).