* [Qemu-devel] [6057] Revert part of r5853
@ 2008-12-15 20:24 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-12-15 20:24 UTC (permalink / raw)
To: qemu-devel
Revision: 6057
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6057
Author: blueswir1
Date: 2008-12-15 20:24:25 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Revert part of r5853
Modified Paths:
--------------
trunk/hw/sparc32_dma.c
Modified: trunk/hw/sparc32_dma.c
===================================================================
--- trunk/hw/sparc32_dma.c 2008-12-15 17:58:49 UTC (rev 6056)
+++ trunk/hw/sparc32_dma.c 2008-12-15 20:24:25 UTC (rev 6057)
@@ -45,6 +45,9 @@
#define DMA_REGS 4
#define DMA_SIZE (4 * sizeof(uint32_t))
+/* We need the mask, because one instance of the device is not page
+ aligned (ledma, start address 0x0010) */
+#define DMA_MASK (DMA_SIZE - 1)
#define DMA_VER 0xa0000000
#define DMA_INTR 1
@@ -156,7 +159,7 @@
DMAState *s = opaque;
uint32_t saddr;
- saddr = addr >> 2;
+ saddr = (addr & DMA_MASK) >> 2;
DPRINTF("read dmareg " TARGET_FMT_plx ": 0x%8.8x\n", addr,
s->dmaregs[saddr]);
@@ -168,7 +171,7 @@
DMAState *s = opaque;
uint32_t saddr;
- saddr = addr >> 2;
+ saddr = (addr & DMA_MASK) >> 2;
DPRINTF("write dmareg " TARGET_FMT_plx ": 0x%8.8x -> 0x%8.8x\n", addr,
s->dmaregs[saddr], val);
switch (saddr) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-15 20:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-15 20:24 [Qemu-devel] [6057] Revert part of r5853 Blue Swirl
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).