aboutsummaryrefslogtreecommitdiff
path: root/hw/dma
diff options
context:
space:
mode:
authorAleksandar Markovic <amarkovic@wavecomp.com>2019-06-25 16:27:17 +0200
committerAleksandar Markovic <amarkovic@wavecomp.com>2019-06-26 13:25:03 +0200
commitd37eae6ccd115d43474416dfcb35fe81e22cf0dc (patch)
tree582f88f876ed09894d1bdb5b88e8a8312e00e270 /hw/dma
parent8110b2bf7ed6a5ed17c6fdd6f67a546c77f13f0d (diff)
downloadqemu-d37eae6ccd115d43474416dfcb35fe81e22cf0dc.zip
qemu-d37eae6ccd115d43474416dfcb35fe81e22cf0dc.tar.gz
qemu-d37eae6ccd115d43474416dfcb35fe81e22cf0dc.tar.bz2
dma/rc4030: Fix off-by-one error in specified memory region size
The size is one byte less than it should be: address-space: rc4030-dma 0000000000000000-00000000fffffffe (prio 0, i/o): rc4030.dma rc4030 is used in MIPS Jazz board context. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1561472838-32272-2-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'hw/dma')
-rw-r--r--hw/dma/rc4030.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index 6ccafec..88ff271 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/mips/mips.h"
#include "hw/sysbus.h"
@@ -678,7 +679,7 @@ static void rc4030_realize(DeviceState *dev, Error **errp)
memory_region_init_iommu(&s->dma_mr, sizeof(s->dma_mr),
TYPE_RC4030_IOMMU_MEMORY_REGION,
- o, "rc4030.dma", UINT32_MAX);
+ o, "rc4030.dma", 4 * GiB);
address_space_init(&s->dma_as, MEMORY_REGION(&s->dma_mr), "rc4030-dma");
}