--- dma.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dma.h b/dma.h index b8cfd1d..ee540f4 100644 --- a/dma.h +++ b/dma.h @@ -18,10 +18,13 @@ typedef struct ScatterGatherEntry ScatterGatherEntry; #if defined(TARGET_PHYS_ADDR_BITS) -typedef target_phys_addr_t dma_addr_t; +/* Bus addresses can be different size from CPU physical addresses, + * and indeed they can be different on different busses. So make + * these always 64-bit which should handle every usual case */ +typedef uint64_t dma_addr_t; -#define DMA_ADDR_BITS TARGET_PHYS_ADDR_BITS -#define DMA_ADDR_FMT TARGET_FMT_plx +#define DMA_ADDR_BITS 64 +#define DMA_ADDR_FMT "%" PRIx64 typedef enum { DMA_DIRECTION_TO_DEVICE = 0, -- 1.7.9