File:  [Qemu by Fabrice Bellard] / qemu / dma.h
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:20:44 2018 UTC (2 years, 2 months ago) by root
Branches: qemu, MAIN
CVS tags: qemu0150, qemu0141, qemu0140, qemu0130, qemu0125, qemu0124, qemu0123, qemu0122, qemu0121, qemu0120, qemu0111, qemu0110, HEAD
qemu 0.11.0

    1: /*
    2:  * DMA helper functions
    3:  *
    4:  * Copyright (c) 2009 Red Hat
    5:  *
    6:  * This work is licensed under the terms of the GNU General Public License
    7:  * (GNU GPL), version 2 or later.
    8:  */
    9: 
   10: #ifndef DMA_H
   11: #define DMA_H
   12: 
   13: #include <stdio.h>
   14: //#include "cpu.h"
   15: #include "hw/hw.h"
   16: #include "block.h"
   17: 
   18: typedef struct {
   19:     target_phys_addr_t base;
   20:     target_phys_addr_t len;
   21: } ScatterGatherEntry;
   22: 
   23: typedef struct {
   24:     ScatterGatherEntry *sg;
   25:     int nsg;
   26:     int nalloc;
   27:     target_phys_addr_t size;
   28: } QEMUSGList;
   29: 
   30: void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
   31: void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base,
   32:                      target_phys_addr_t len);
   33: void qemu_sglist_destroy(QEMUSGList *qsg);
   34: 
   35: BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,
   36:                                 QEMUSGList *sg, uint64_t sector,
   37:                                 BlockDriverCompletionFunc *cb, void *opaque);
   38: BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,
   39:                                  QEMUSGList *sg, uint64_t sector,
   40:                                  BlockDriverCompletionFunc *cb, void *opaque);
   41: #endif

unix.superglobalmegacorp.com