* [Qemu-devel] [PATCH] DMA emulation fix
@ 2003-11-13 18:53 J. Mayer
0 siblings, 0 replies; only message in thread
From: J. Mayer @ 2003-11-13 18:53 UTC (permalink / raw)
To: qemu-devel
This patch fixes DMA transfer mode command and debug messages.
Index: dma.c
===================================================================
RCS file: /cvsroot/qemu/qemu/dma.c,v
retrieving revision 1.1
diff -u -d -w -B -b -d -p -r1.1 dma.c
--- dma.c 13 Nov 2003 01:45:57 -0000 1.1
+++ dma.c 13 Nov 2003 18:47:04 -0000
@@ -28,6 +28,7 @@
#include "vl.h"
#include "cpu.h"
+//#define DEBUG_DMA
#define log(...) fprintf (stderr, "dma: " __VA_ARGS__)
#ifdef DEBUG_DMA
#define lwarn(...) fprintf (stderr, "dma: " __VA_ARGS__)
@@ -215,17 +216,17 @@ static void write_cont (struct CPUX86Sta
case 0xb: /* mode */
{
-#ifdef DMA_DEBUG
+ ichan = data & 3;
+#ifdef DEBUG_DMA
int op;
int ai;
int dir;
int opmode;
- ichan = val & 3;
- op = (val >> 2) & 3;
- ai = (val >> 4) & 1;
- dir = (val >> 5) & 1;
- opmode = (val >> 6) & 3;
+ op = (data >> 2) & 3;
+ ai = (data >> 4) & 1;
+ dir = (data >> 5) & 1;
+ opmode = (data >> 6) & 3;
linfo ("ichan %d, op %d, ai %d, dir %d, opmode %d\n",
ichan, op, ai, dir, opmode);
@@ -259,7 +259,7 @@ static void write_cont (struct CPUX86Sta
goto error;
}
-#ifdef DMA_DEBUG
+#ifdef DEBUG_DMA
if (0xc != iport) {
linfo ("nport %#06x, ncont %d, ichan % 2d, val %#06x\n",
nport, d != dma_controllers, ichan, data);
Please apply...
--
J. Mayer <l_indien@magic.fr>
Never organized
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-13 19:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-13 18:53 [Qemu-devel] [PATCH] DMA emulation fix J. Mayer
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).