[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] DMA emulation fix
From: |
J. Mayer |
Subject: |
[Qemu-devel] [PATCH] DMA emulation fix |
Date: |
13 Nov 2003 19:53:55 +0100 |
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 <address@hidden>
Never organized
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] DMA emulation fix,
J. Mayer <=