Diff for /qemu/dma.h between versions 1.1.1.5 and 1.1.1.6

version 1.1.1.5, 2018/04/24 19:17:11 version 1.1.1.6, 2018/04/24 19:34:22
Line 11 Line 11
 #define DMA_H  #define DMA_H
   
 #include <stdio.h>  #include <stdio.h>
 //#include "cpu.h"  
 #include "hw/hw.h"  #include "hw/hw.h"
 #include "block.h"  #include "block.h"
   
 typedef struct ScatterGatherEntry ScatterGatherEntry;  typedef struct ScatterGatherEntry ScatterGatherEntry;
   
 #if defined(TARGET_PHYS_ADDR_BITS)  
 typedef target_phys_addr_t dma_addr_t;  
   
 #define DMA_ADDR_FMT TARGET_FMT_plx  
   
 typedef enum {  typedef enum {
     DMA_DIRECTION_TO_DEVICE = 0,      DMA_DIRECTION_TO_DEVICE = 0,
     DMA_DIRECTION_FROM_DEVICE = 1,      DMA_DIRECTION_FROM_DEVICE = 1,
 } DMADirection;  } DMADirection;
   
 struct ScatterGatherEntry {  
     dma_addr_t base;  
     dma_addr_t len;  
 };  
   
 struct QEMUSGList {  struct QEMUSGList {
     ScatterGatherEntry *sg;      ScatterGatherEntry *sg;
     int nsg;      int nsg;
     int nalloc;      int nalloc;
     dma_addr_t size;      size_t size;
   };
   
   #if defined(TARGET_PHYS_ADDR_BITS)
   typedef target_phys_addr_t dma_addr_t;
   
   #define DMA_ADDR_FMT TARGET_FMT_plx
   
   struct ScatterGatherEntry {
       dma_addr_t base;
       dma_addr_t len;
 };  };
   
 void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);  void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
Line 51  typedef BlockDriverAIOCB *DMAIOFunc(Bloc Line 50  typedef BlockDriverAIOCB *DMAIOFunc(Bloc
 BlockDriverAIOCB *dma_bdrv_io(BlockDriverState *bs,  BlockDriverAIOCB *dma_bdrv_io(BlockDriverState *bs,
                               QEMUSGList *sg, uint64_t sector_num,                                QEMUSGList *sg, uint64_t sector_num,
                               DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,                                DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,
                               void *opaque, bool to_dev);                                void *opaque, DMADirection dir);
 BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,  BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,
                                 QEMUSGList *sg, uint64_t sector,                                  QEMUSGList *sg, uint64_t sector,
                                 BlockDriverCompletionFunc *cb, void *opaque);                                  BlockDriverCompletionFunc *cb, void *opaque);
 BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,  BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,
                                  QEMUSGList *sg, uint64_t sector,                                   QEMUSGList *sg, uint64_t sector,
                                  BlockDriverCompletionFunc *cb, void *opaque);                                   BlockDriverCompletionFunc *cb, void *opaque);
   uint64_t dma_buf_read(uint8_t *ptr, int32_t len, QEMUSGList *sg);
   uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg);
   
   void dma_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie,
                       QEMUSGList *sg, enum BlockAcctType type);
   
 #endif  #endif

Removed from v.1.1.1.5  
changed lines
  Added in v.1.1.1.6


unix.superglobalmegacorp.com