Commit 16d17fdb8ee6b25c501b1d32a74cf187455fe3d7

Authored by bellard
1 parent 4487d0ac

debug fixes


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@542 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 13 additions and 13 deletions
hw/dma.c
... ... @@ -25,8 +25,8 @@
25 25 #include <stdlib.h>
26 26 #include <inttypes.h>
27 27  
28   -#include "vl.h"
29 28 #include "cpu.h"
  29 +#include "vl.h"
30 30  
31 31 #define log(...) fprintf (stderr, "dma: " __VA_ARGS__)
32 32 #ifdef DEBUG_DMA
... ... @@ -79,7 +79,7 @@ enum {
79 79  
80 80 };
81 81  
82   -static void write_page (struct CPUX86State *env, uint32_t nport, uint32_t data)
  82 +static void write_page (CPUState *env, uint32_t nport, uint32_t data)
83 83 {
84 84 int ichan;
85 85 int ncont;
... ... @@ -114,7 +114,7 @@ static inline int getff (int ncont)
114 114 return ff;
115 115 }
116 116  
117   -static uint32_t read_chan (struct CPUX86State *env, uint32_t nport)
  117 +static uint32_t read_chan (CPUState *env, uint32_t nport)
118 118 {
119 119 int ff;
120 120 int ncont, ichan, nreg;
... ... @@ -160,17 +160,17 @@ static void write_chan (uint32_t nport, int size, uint32_t data)
160 160 }
161 161 }
162 162 }
163   -static void write_chanb (struct CPUX86State *env, uint32_t nport, uint32_t data)
  163 +static void write_chanb (CPUState *env, uint32_t nport, uint32_t data)
164 164 {
165 165 write_chan (nport, 1, data);
166 166 }
167 167  
168   -static void write_chanw (struct CPUX86State *env, uint32_t nport, uint32_t data)
  168 +static void write_chanw (CPUState *env, uint32_t nport, uint32_t data)
169 169 {
170 170 write_chan (nport, 2, data);
171 171 }
172 172  
173   -static void write_cont (struct CPUX86State *env, uint32_t nport, uint32_t data)
  173 +static void write_cont (CPUState *env, uint32_t nport, uint32_t data)
174 174 {
175 175 int iport, ichan, ncont;
176 176 struct dma_cont *d;
... ... @@ -215,17 +215,17 @@ static void write_cont (struct CPUX86State *env, uint32_t nport, uint32_t data)
215 215  
216 216 case 0xb: /* mode */
217 217 {
218   -#ifdef DMA_DEBUG
  218 + ichan = data & 3;
  219 +#ifdef DEBUG_DMA
219 220 int op;
220 221 int ai;
221 222 int dir;
222 223 int opmode;
223 224  
224   - ichan = val & 3;
225   - op = (val >> 2) & 3;
226   - ai = (val >> 4) & 1;
227   - dir = (val >> 5) & 1;
228   - opmode = (val >> 6) & 3;
  225 + op = (data >> 2) & 3;
  226 + ai = (data >> 4) & 1;
  227 + dir = (data >> 5) & 1;
  228 + opmode = (data >> 6) & 3;
229 229  
230 230 linfo ("ichan %d, op %d, ai %d, dir %d, opmode %d\n",
231 231 ichan, op, ai, dir, opmode);
... ... @@ -259,7 +259,7 @@ static void write_cont (struct CPUX86State *env, uint32_t nport, uint32_t data)
259 259 goto error;
260 260 }
261 261  
262   -#ifdef DMA_DEBUG
  262 +#ifdef DEBUG_DMA
263 263 if (0xc != iport) {
264 264 linfo ("nport %#06x, ncont %d, ichan % 2d, val %#06x\n",
265 265 nport, d != dma_controllers, ichan, data);
... ...