From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AKNVC-0001CP-VX for qemu-devel@nongnu.org; Thu, 13 Nov 2003 14:51:38 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AKNUb-0000mS-M1 for qemu-devel@nongnu.org; Thu, 13 Nov 2003 14:51:32 -0500 Received: from [62.210.158.41] (helo=moscou.magic.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKNUa-0000ju-PK for qemu-devel@nongnu.org; Thu, 13 Nov 2003 14:51:00 -0500 Received: from 10.0.0.2 (ppp-181.net-555.magic.fr [62.210.255.181]) by moscou.magic.fr (8.11.6/8.10.1) with ESMTP id hADInTO21985 for ; Thu, 13 Nov 2003 19:49:29 +0100 (CET) From: "J. Mayer" Content-Type: text/plain Message-Id: <1068749635.1697.201.camel@rapid> Mime-Version: 1.0 Date: 13 Nov 2003 19:53:55 +0100 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] DMA emulation fix Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Never organized