diff options
author | Richard Henderson <rth@twiddle.net> | 2011-08-10 15:28:19 -0700 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-08-22 19:29:04 +0300 |
commit | 563ea489031375c53d3b94d74c56c42238e94914 (patch) | |
tree | 76e868064b2c140715007f973e5c259e976c6df4 /memory.c | |
parent | a5e1cbc80e88ed7d73b3fcb46053a3ba167293fc (diff) | |
download | qemu-563ea489031375c53d3b94d74c56c42238e94914.zip qemu-563ea489031375c53d3b94d74c56c42238e94914.tar.gz qemu-563ea489031375c53d3b94d74c56c42238e94914.tar.bz2 |
memory: Fix old_portio vs non-zero offset
The legacy functions that we're wrapping expect that offset
to be included in the register. Indeed, they generally
expect the absolute address and then mask off the "high" bits.
The FDC is the first converted device with a non-zero offset.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -396,7 +396,7 @@ static void memory_region_iorange_read(IORange *iorange, *data = ((uint64_t)1 << (width * 8)) - 1; if (mrp) { - *data = mrp->read(mr->opaque, offset - mrp->offset); + *data = mrp->read(mr->opaque, offset); } return; } @@ -418,7 +418,7 @@ static void memory_region_iorange_write(IORange *iorange, const MemoryRegionPortio *mrp = find_portio(mr, offset, width, true); if (mrp) { - mrp->write(mr->opaque, offset - mrp->offset, data); + mrp->write(mr->opaque, offset, data); } return; } |