2 * PowerMac descriptor-based DMA emulation
4 * Copyright (c) 2005-2007 Fabrice Bellard
5 * Copyright (c) 2007 Jocelyn Mayer
6 * Copyright (c) 2009 Laurent Vivier
8 * some parts from linux-2.6.28, arch/powerpc/include/asm/dbdma.h
10 * Definitions for using the Apple Descriptor-Based DMA controller
11 * in Power Macintosh computers.
13 * Copyright (C) 1996 Paul Mackerras.
15 * some parts from mol 0.9.71
17 * Descriptor based DMA emulation
19 * Copyright (C) 1998-2004 Samuel Rydh (samuel@ibrium.se)
21 * Permission is hereby granted, free of charge, to any person obtaining a copy
22 * of this software and associated documentation files (the "Software"), to deal
23 * in the Software without restriction, including without limitation the rights
24 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25 * copies of the Software, and to permit persons to whom the Software is
26 * furnished to do so, subject to the following conditions:
28 * The above copyright notice and this permission notice shall be included in
29 * all copies or substantial portions of the Software.
31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
34 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
41 #include "mac_dbdma.h"
47 #define DBDMA_DPRINTF(fmt, ...) \
48 do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)
50 #define DBDMA_DPRINTF(fmt, ...)
57 * DBDMA control/status registers. All little-endian.
60 #define DBDMA_CONTROL 0x00
61 #define DBDMA_STATUS 0x01
62 #define DBDMA_CMDPTR_HI 0x02
63 #define DBDMA_CMDPTR_LO 0x03
64 #define DBDMA_INTR_SEL 0x04
65 #define DBDMA_BRANCH_SEL 0x05
66 #define DBDMA_WAIT_SEL 0x06
67 #define DBDMA_XFER_MODE 0x07
68 #define DBDMA_DATA2PTR_HI 0x08
69 #define DBDMA_DATA2PTR_LO 0x09
70 #define DBDMA_RES1 0x0A
71 #define DBDMA_ADDRESS_HI 0x0B
72 #define DBDMA_BRANCH_ADDR_HI 0x0C
73 #define DBDMA_RES2 0x0D
74 #define DBDMA_RES3 0x0E
75 #define DBDMA_RES4 0x0F
78 #define DBDMA_SIZE (DBDMA_REGS * sizeof(uint32_t))
80 #define DBDMA_CHANNEL_SHIFT 7
81 #define DBDMA_CHANNEL_SIZE (1 << DBDMA_CHANNEL_SHIFT)
83 #define DBDMA_CHANNELS (0x1000 >> DBDMA_CHANNEL_SHIFT)
85 /* Bits in control and status registers */
94 #define DEVSTAT 0x00ff
97 * DBDMA command structure. These fields are all little-endian!
100 typedef struct dbdma_cmd
{
101 uint16_t req_count
; /* requested byte transfer count */
102 uint16_t command
; /* command word (has bit-fields) */
103 uint32_t phy_addr
; /* physical data address */
104 uint32_t cmd_dep
; /* command-dependent field */
105 uint16_t res_count
; /* residual count after completion */
106 uint16_t xfer_status
; /* transfer status */
109 /* DBDMA command values in command field */
111 #define COMMAND_MASK 0xf000
112 #define OUTPUT_MORE 0x0000 /* transfer memory data to stream */
113 #define OUTPUT_LAST 0x1000 /* ditto followed by end marker */
114 #define INPUT_MORE 0x2000 /* transfer stream data to memory */
115 #define INPUT_LAST 0x3000 /* ditto, expect end marker */
116 #define STORE_WORD 0x4000 /* write word (4 bytes) to device reg */
117 #define LOAD_WORD 0x5000 /* read word (4 bytes) from device reg */
118 #define DBDMA_NOP 0x6000 /* do nothing */
119 #define DBDMA_STOP 0x7000 /* suspend processing */
121 /* Key values in command field */
123 #define KEY_MASK 0x0700
124 #define KEY_STREAM0 0x0000 /* usual data stream */
125 #define KEY_STREAM1 0x0100 /* control/status stream */
126 #define KEY_STREAM2 0x0200 /* device-dependent stream */
127 #define KEY_STREAM3 0x0300 /* device-dependent stream */
128 #define KEY_STREAM4 0x0400 /* reserved */
129 #define KEY_REGS 0x0500 /* device register space */
130 #define KEY_SYSTEM 0x0600 /* system memory-mapped space */
131 #define KEY_DEVICE 0x0700 /* device memory-mapped space */
133 /* Interrupt control values in command field */
135 #define INTR_MASK 0x0030
136 #define INTR_NEVER 0x0000 /* don't interrupt */
137 #define INTR_IFSET 0x0010 /* intr if condition bit is 1 */
138 #define INTR_IFCLR 0x0020 /* intr if condition bit is 0 */
139 #define INTR_ALWAYS 0x0030 /* always interrupt */
141 /* Branch control values in command field */
143 #define BR_MASK 0x000c
144 #define BR_NEVER 0x0000 /* don't branch */
145 #define BR_IFSET 0x0004 /* branch if condition bit is 1 */
146 #define BR_IFCLR 0x0008 /* branch if condition bit is 0 */
147 #define BR_ALWAYS 0x000c /* always branch */
149 /* Wait control values in command field */
151 #define WAIT_MASK 0x0003
152 #define WAIT_NEVER 0x0000 /* don't wait */
153 #define WAIT_IFSET 0x0001 /* wait if condition bit is 1 */
154 #define WAIT_IFCLR 0x0002 /* wait if condition bit is 0 */
155 #define WAIT_ALWAYS 0x0003 /* always wait */
157 typedef struct DBDMA_channel
{
159 uint32_t regs
[DBDMA_REGS
];
169 DBDMA_channel channels
[DBDMA_CHANNELS
];
173 static void dump_dbdma_cmd(dbdma_cmd
*cmd
)
175 printf("dbdma_cmd %p\n", cmd
);
176 printf(" req_count 0x%04x\n", le16_to_cpu(cmd
->req_count
));
177 printf(" command 0x%04x\n", le16_to_cpu(cmd
->command
));
178 printf(" phy_addr 0x%08x\n", le32_to_cpu(cmd
->phy_addr
));
179 printf(" cmd_dep 0x%08x\n", le32_to_cpu(cmd
->cmd_dep
));
180 printf(" res_count 0x%04x\n", le16_to_cpu(cmd
->res_count
));
181 printf(" xfer_status 0x%04x\n", le16_to_cpu(cmd
->xfer_status
));
184 static void dump_dbdma_cmd(dbdma_cmd
*cmd
)
188 static void dbdma_cmdptr_load(DBDMA_channel
*ch
)
190 DBDMA_DPRINTF("dbdma_cmdptr_load 0x%08x\n",
191 ch
->regs
[DBDMA_CMDPTR_LO
]);
192 cpu_physical_memory_read(ch
->regs
[DBDMA_CMDPTR_LO
],
193 (uint8_t*)&ch
->current
, sizeof(dbdma_cmd
));
196 static void dbdma_cmdptr_save(DBDMA_channel
*ch
)
198 DBDMA_DPRINTF("dbdma_cmdptr_save 0x%08x\n",
199 ch
->regs
[DBDMA_CMDPTR_LO
]);
200 DBDMA_DPRINTF("xfer_status 0x%08x res_count 0x%04x\n",
201 le16_to_cpu(ch
->current
.xfer_status
),
202 le16_to_cpu(ch
->current
.res_count
));
203 cpu_physical_memory_write(ch
->regs
[DBDMA_CMDPTR_LO
],
204 (uint8_t*)&ch
->current
, sizeof(dbdma_cmd
));
207 static void kill_channel(DBDMA_channel
*ch
)
209 DBDMA_DPRINTF("kill_channel\n");
211 ch
->regs
[DBDMA_STATUS
] |= DEAD
;
212 ch
->regs
[DBDMA_STATUS
] &= ~ACTIVE
;
214 qemu_irq_raise(ch
->irq
);
217 static void conditional_interrupt(DBDMA_channel
*ch
)
219 dbdma_cmd
*current
= &ch
->current
;
221 uint16_t sel_mask
, sel_value
;
225 DBDMA_DPRINTF("conditional_interrupt\n");
227 intr
= le16_to_cpu(current
->command
) & INTR_MASK
;
230 case INTR_NEVER
: /* don't interrupt */
232 case INTR_ALWAYS
: /* always interrupt */
233 qemu_irq_raise(ch
->irq
);
237 status
= ch
->regs
[DBDMA_STATUS
] & DEVSTAT
;
239 sel_mask
= (ch
->regs
[DBDMA_INTR_SEL
] >> 16) & 0x0f;
240 sel_value
= ch
->regs
[DBDMA_INTR_SEL
] & 0x0f;
242 cond
= (status
& sel_mask
) == (sel_value
& sel_mask
);
245 case INTR_IFSET
: /* intr if condition bit is 1 */
247 qemu_irq_raise(ch
->irq
);
249 case INTR_IFCLR
: /* intr if condition bit is 0 */
251 qemu_irq_raise(ch
->irq
);
256 static int conditional_wait(DBDMA_channel
*ch
)
258 dbdma_cmd
*current
= &ch
->current
;
260 uint16_t sel_mask
, sel_value
;
264 DBDMA_DPRINTF("conditional_wait\n");
266 wait
= le16_to_cpu(current
->command
) & WAIT_MASK
;
269 case WAIT_NEVER
: /* don't wait */
271 case WAIT_ALWAYS
: /* always wait */
275 status
= ch
->regs
[DBDMA_STATUS
] & DEVSTAT
;
277 sel_mask
= (ch
->regs
[DBDMA_WAIT_SEL
] >> 16) & 0x0f;
278 sel_value
= ch
->regs
[DBDMA_WAIT_SEL
] & 0x0f;
280 cond
= (status
& sel_mask
) == (sel_value
& sel_mask
);
283 case WAIT_IFSET
: /* wait if condition bit is 1 */
287 case WAIT_IFCLR
: /* wait if condition bit is 0 */
295 static void next(DBDMA_channel
*ch
)
299 ch
->regs
[DBDMA_STATUS
] &= ~BT
;
301 cp
= ch
->regs
[DBDMA_CMDPTR_LO
];
302 ch
->regs
[DBDMA_CMDPTR_LO
] = cp
+ sizeof(dbdma_cmd
);
303 dbdma_cmdptr_load(ch
);
306 static void branch(DBDMA_channel
*ch
)
308 dbdma_cmd
*current
= &ch
->current
;
310 ch
->regs
[DBDMA_CMDPTR_LO
] = current
->cmd_dep
;
311 ch
->regs
[DBDMA_STATUS
] |= BT
;
312 dbdma_cmdptr_load(ch
);
315 static void conditional_branch(DBDMA_channel
*ch
)
317 dbdma_cmd
*current
= &ch
->current
;
319 uint16_t sel_mask
, sel_value
;
323 DBDMA_DPRINTF("conditional_branch\n");
325 /* check if we must branch */
327 br
= le16_to_cpu(current
->command
) & BR_MASK
;
330 case BR_NEVER
: /* don't branch */
333 case BR_ALWAYS
: /* always branch */
338 status
= ch
->regs
[DBDMA_STATUS
] & DEVSTAT
;
340 sel_mask
= (ch
->regs
[DBDMA_BRANCH_SEL
] >> 16) & 0x0f;
341 sel_value
= ch
->regs
[DBDMA_BRANCH_SEL
] & 0x0f;
343 cond
= (status
& sel_mask
) == (sel_value
& sel_mask
);
346 case BR_IFSET
: /* branch if condition bit is 1 */
352 case BR_IFCLR
: /* branch if condition bit is 0 */
361 static QEMUBH
*dbdma_bh
;
362 static void channel_run(DBDMA_channel
*ch
);
364 static void dbdma_end(DBDMA_io
*io
)
366 DBDMA_channel
*ch
= io
->channel
;
367 dbdma_cmd
*current
= &ch
->current
;
369 if (conditional_wait(ch
))
372 current
->xfer_status
= cpu_to_le16(ch
->regs
[DBDMA_STATUS
]);
373 current
->res_count
= cpu_to_le16(io
->len
);
374 dbdma_cmdptr_save(ch
);
376 ch
->regs
[DBDMA_STATUS
] &= ~FLUSH
;
378 conditional_interrupt(ch
);
379 conditional_branch(ch
);
383 if ((ch
->regs
[DBDMA_STATUS
] & RUN
) &&
384 (ch
->regs
[DBDMA_STATUS
] & ACTIVE
))
388 static void start_output(DBDMA_channel
*ch
, int key
, uint32_t addr
,
389 uint16_t req_count
, int is_last
)
391 DBDMA_DPRINTF("start_output\n");
393 /* KEY_REGS, KEY_DEVICE and KEY_STREAM
394 * are not implemented in the mac-io chip
397 DBDMA_DPRINTF("addr 0x%x key 0x%x\n", addr
, key
);
398 if (!addr
|| key
> KEY_STREAM3
) {
404 ch
->io
.len
= req_count
;
405 ch
->io
.is_last
= is_last
;
406 ch
->io
.dma_end
= dbdma_end
;
407 ch
->io
.is_dma_out
= 1;
414 static void start_input(DBDMA_channel
*ch
, int key
, uint32_t addr
,
415 uint16_t req_count
, int is_last
)
417 DBDMA_DPRINTF("start_input\n");
419 /* KEY_REGS, KEY_DEVICE and KEY_STREAM
420 * are not implemented in the mac-io chip
423 if (!addr
|| key
> KEY_STREAM3
) {
429 ch
->io
.len
= req_count
;
430 ch
->io
.is_last
= is_last
;
431 ch
->io
.dma_end
= dbdma_end
;
432 ch
->io
.is_dma_out
= 0;
439 static void load_word(DBDMA_channel
*ch
, int key
, uint32_t addr
,
442 dbdma_cmd
*current
= &ch
->current
;
445 DBDMA_DPRINTF("load_word\n");
447 /* only implements KEY_SYSTEM */
449 if (key
!= KEY_SYSTEM
) {
450 printf("DBDMA: LOAD_WORD, unimplemented key %x\n", key
);
455 cpu_physical_memory_read(addr
, (uint8_t*)&val
, len
);
458 val
= (val
<< 16) | (current
->cmd_dep
& 0x0000ffff);
460 val
= (val
<< 24) | (current
->cmd_dep
& 0x00ffffff);
462 current
->cmd_dep
= val
;
464 if (conditional_wait(ch
))
467 current
->xfer_status
= cpu_to_le16(ch
->regs
[DBDMA_STATUS
]);
468 dbdma_cmdptr_save(ch
);
469 ch
->regs
[DBDMA_STATUS
] &= ~FLUSH
;
471 conditional_interrupt(ch
);
475 qemu_bh_schedule(dbdma_bh
);
478 static void store_word(DBDMA_channel
*ch
, int key
, uint32_t addr
,
481 dbdma_cmd
*current
= &ch
->current
;
484 DBDMA_DPRINTF("store_word\n");
486 /* only implements KEY_SYSTEM */
488 if (key
!= KEY_SYSTEM
) {
489 printf("DBDMA: STORE_WORD, unimplemented key %x\n", key
);
494 val
= current
->cmd_dep
;
500 cpu_physical_memory_write(addr
, (uint8_t*)&val
, len
);
502 if (conditional_wait(ch
))
505 current
->xfer_status
= cpu_to_le16(ch
->regs
[DBDMA_STATUS
]);
506 dbdma_cmdptr_save(ch
);
507 ch
->regs
[DBDMA_STATUS
] &= ~FLUSH
;
509 conditional_interrupt(ch
);
513 qemu_bh_schedule(dbdma_bh
);
516 static void nop(DBDMA_channel
*ch
)
518 dbdma_cmd
*current
= &ch
->current
;
520 if (conditional_wait(ch
))
523 current
->xfer_status
= cpu_to_le16(ch
->regs
[DBDMA_STATUS
]);
524 dbdma_cmdptr_save(ch
);
526 conditional_interrupt(ch
);
527 conditional_branch(ch
);
530 qemu_bh_schedule(dbdma_bh
);
533 static void stop(DBDMA_channel
*ch
)
535 ch
->regs
[DBDMA_STATUS
] &= ~(ACTIVE
|DEAD
|FLUSH
);
537 /* the stop command does not increment command pointer */
540 static void channel_run(DBDMA_channel
*ch
)
542 dbdma_cmd
*current
= &ch
->current
;
547 DBDMA_DPRINTF("channel_run\n");
548 dump_dbdma_cmd(current
);
550 /* clear WAKE flag at command fetch */
552 ch
->regs
[DBDMA_STATUS
] &= ~WAKE
;
554 cmd
= le16_to_cpu(current
->command
) & COMMAND_MASK
;
566 key
= le16_to_cpu(current
->command
) & 0x0700;
567 req_count
= le16_to_cpu(current
->req_count
);
568 phy_addr
= le32_to_cpu(current
->phy_addr
);
570 if (key
== KEY_STREAM4
) {
571 printf("command %x, invalid key 4\n", cmd
);
578 start_output(ch
, key
, phy_addr
, req_count
, 0);
582 start_output(ch
, key
, phy_addr
, req_count
, 1);
586 start_input(ch
, key
, phy_addr
, req_count
, 0);
590 start_input(ch
, key
, phy_addr
, req_count
, 1);
594 if (key
< KEY_REGS
) {
595 printf("command %x, invalid key %x\n", cmd
, key
);
599 /* for LOAD_WORD and STORE_WORD, req_count is on 3 bits
600 * and BRANCH is invalid
603 req_count
= req_count
& 0x0007;
604 if (req_count
& 0x4) {
607 } else if (req_count
& 0x2) {
615 load_word(ch
, key
, phy_addr
, req_count
);
619 store_word(ch
, key
, phy_addr
, req_count
);
624 static void DBDMA_run(DBDMAState
*s
)
628 for (channel
= 0; channel
< DBDMA_CHANNELS
; channel
++) {
629 DBDMA_channel
*ch
= &s
->channels
[channel
];
630 uint32_t status
= ch
->regs
[DBDMA_STATUS
];
631 if (!ch
->processing
&& (status
& RUN
) && (status
& ACTIVE
)) {
637 static void DBDMA_run_bh(void *opaque
)
639 DBDMAState
*s
= opaque
;
641 DBDMA_DPRINTF("DBDMA_run_bh\n");
646 void DBDMA_register_channel(void *dbdma
, int nchan
, qemu_irq irq
,
647 DBDMA_rw rw
, DBDMA_flush flush
,
650 DBDMAState
*s
= dbdma
;
651 DBDMA_channel
*ch
= &s
->channels
[nchan
];
653 DBDMA_DPRINTF("DBDMA_register_channel 0x%x\n", nchan
);
659 ch
->io
.opaque
= opaque
;
663 void DBDMA_schedule(void)
669 dbdma_control_write(DBDMA_channel
*ch
)
671 uint16_t mask
, value
;
674 mask
= (ch
->regs
[DBDMA_CONTROL
] >> 16) & 0xffff;
675 value
= ch
->regs
[DBDMA_CONTROL
] & 0xffff;
677 value
&= (RUN
| PAUSE
| FLUSH
| WAKE
| DEVSTAT
);
679 status
= ch
->regs
[DBDMA_STATUS
];
681 status
= (value
& mask
) | (status
& ~mask
);
691 if ((ch
->regs
[DBDMA_STATUS
] & RUN
) && !(status
& RUN
)) {
693 status
&= ~(ACTIVE
|DEAD
);
696 DBDMA_DPRINTF(" status 0x%08x\n", status
);
698 ch
->regs
[DBDMA_STATUS
] = status
;
701 qemu_bh_schedule(dbdma_bh
);
702 if ((status
& FLUSH
) && ch
->flush
)
706 static void dbdma_writel (void *opaque
,
707 target_phys_addr_t addr
, uint32_t value
)
709 int channel
= addr
>> DBDMA_CHANNEL_SHIFT
;
710 DBDMAState
*s
= opaque
;
711 DBDMA_channel
*ch
= &s
->channels
[channel
];
712 int reg
= (addr
- (channel
<< DBDMA_CHANNEL_SHIFT
)) >> 2;
714 DBDMA_DPRINTF("writel 0x" TARGET_FMT_plx
" <= 0x%08x\n", addr
, value
);
715 DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
716 (uint32_t)addr
>> DBDMA_CHANNEL_SHIFT
, reg
);
718 /* cmdptr cannot be modified if channel is RUN or ACTIVE */
720 if (reg
== DBDMA_CMDPTR_LO
&&
721 (ch
->regs
[DBDMA_STATUS
] & (RUN
| ACTIVE
)))
724 ch
->regs
[reg
] = value
;
728 dbdma_control_write(ch
);
730 case DBDMA_CMDPTR_LO
:
731 /* 16-byte aligned */
732 ch
->regs
[DBDMA_CMDPTR_LO
] &= ~0xf;
733 dbdma_cmdptr_load(ch
);
737 case DBDMA_BRANCH_SEL
:
741 case DBDMA_XFER_MODE
:
742 case DBDMA_CMDPTR_HI
:
743 case DBDMA_DATA2PTR_HI
:
744 case DBDMA_DATA2PTR_LO
:
745 case DBDMA_ADDRESS_HI
:
746 case DBDMA_BRANCH_ADDR_HI
:
756 static uint32_t dbdma_readl (void *opaque
, target_phys_addr_t addr
)
759 int channel
= addr
>> DBDMA_CHANNEL_SHIFT
;
760 DBDMAState
*s
= opaque
;
761 DBDMA_channel
*ch
= &s
->channels
[channel
];
762 int reg
= (addr
- (channel
<< DBDMA_CHANNEL_SHIFT
)) >> 2;
764 value
= ch
->regs
[reg
];
766 DBDMA_DPRINTF("readl 0x" TARGET_FMT_plx
" => 0x%08x\n", addr
, value
);
767 DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
768 (uint32_t)addr
>> DBDMA_CHANNEL_SHIFT
, reg
);
775 case DBDMA_CMDPTR_LO
:
777 case DBDMA_BRANCH_SEL
:
781 case DBDMA_XFER_MODE
:
782 case DBDMA_CMDPTR_HI
:
783 case DBDMA_DATA2PTR_HI
:
784 case DBDMA_DATA2PTR_LO
:
785 case DBDMA_ADDRESS_HI
:
786 case DBDMA_BRANCH_ADDR_HI
:
801 static CPUWriteMemoryFunc
* const dbdma_write
[] = {
807 static CPUReadMemoryFunc
* const dbdma_read
[] = {
813 static const VMStateDescription vmstate_dbdma_channel
= {
814 .name
= "dbdma_channel",
816 .minimum_version_id
= 0,
817 .minimum_version_id_old
= 0,
818 .fields
= (VMStateField
[]) {
819 VMSTATE_UINT32_ARRAY(regs
, struct DBDMA_channel
, DBDMA_REGS
),
820 VMSTATE_END_OF_LIST()
824 static const VMStateDescription vmstate_dbdma
= {
827 .minimum_version_id
= 2,
828 .minimum_version_id_old
= 2,
829 .fields
= (VMStateField
[]) {
830 VMSTATE_STRUCT_ARRAY(channels
, DBDMAState
, DBDMA_CHANNELS
, 1,
831 vmstate_dbdma_channel
, DBDMA_channel
),
832 VMSTATE_END_OF_LIST()
836 static void dbdma_reset(void *opaque
)
838 DBDMAState
*s
= opaque
;
841 for (i
= 0; i
< DBDMA_CHANNELS
; i
++)
842 memset(s
->channels
[i
].regs
, 0, DBDMA_SIZE
);
845 void* DBDMA_init (int *dbdma_mem_index
)
849 s
= qemu_mallocz(sizeof(DBDMAState
));
851 *dbdma_mem_index
= cpu_register_io_memory(dbdma_read
, dbdma_write
, s
,
852 DEVICE_LITTLE_ENDIAN
);
853 vmstate_register(NULL
, -1, &vmstate_dbdma
, s
);
854 qemu_register_reset(dbdma_reset
, s
);
856 dbdma_bh
= qemu_bh_new(DBDMA_run_bh
, s
);