[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv3 13/13] sparc32_dma: add len to esp/le DMA memo
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCHv3 13/13] sparc32_dma: add len to esp/le DMA memory tracing |
Date: |
Thu, 19 Oct 2017 01:45:18 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/14/2017 03:39 PM, Mark Cave-Ayland wrote:
> This is surprisingly useful when trying to debug DMA issues.
>
> Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/dma/sparc32_dma.c | 8 ++++----
> hw/dma/trace-events | 8 ++++----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c
> index bb7d70a..fbb072a 100644
> --- a/hw/dma/sparc32_dma.c
> +++ b/hw/dma/sparc32_dma.c
> @@ -73,7 +73,7 @@ void ledma_memory_read(void *opaque, hwaddr addr,
> int i;
>
> addr |= s->dmaregs[3];
> - trace_ledma_memory_read(addr);
> + trace_ledma_memory_read(addr, len);
> if (do_bswap) {
> sparc_iommu_memory_read(s->iommu, addr, buf, len);
> } else {
> @@ -94,7 +94,7 @@ void ledma_memory_write(void *opaque, hwaddr addr,
> uint16_t tmp_buf[32];
>
> addr |= s->dmaregs[3];
> - trace_ledma_memory_write(addr);
> + trace_ledma_memory_write(addr, len);
> if (do_bswap) {
> sparc_iommu_memory_write(s->iommu, addr, buf, len);
> } else {
> @@ -139,7 +139,7 @@ void espdma_memory_read(void *opaque, uint8_t *buf, int
> len)
> {
> DMADeviceState *s = opaque;
>
> - trace_espdma_memory_read(s->dmaregs[1]);
> + trace_espdma_memory_read(s->dmaregs[1], len);
> sparc_iommu_memory_read(s->iommu, s->dmaregs[1], buf, len);
> s->dmaregs[1] += len;
> }
> @@ -148,7 +148,7 @@ void espdma_memory_write(void *opaque, uint8_t *buf, int
> len)
> {
> DMADeviceState *s = opaque;
>
> - trace_espdma_memory_write(s->dmaregs[1]);
> + trace_espdma_memory_write(s->dmaregs[1], len);
> sparc_iommu_memory_write(s->iommu, s->dmaregs[1], buf, len);
> s->dmaregs[1] += len;
> }
> diff --git a/hw/dma/trace-events b/hw/dma/trace-events
> index 428469a..6b367f0 100644
> --- a/hw/dma/trace-events
> +++ b/hw/dma/trace-events
> @@ -7,12 +7,12 @@ rc4030_read(uint64_t addr, uint32_t ret) "read
> reg[0x%"PRIx64"] = 0x%x"
> rc4030_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] = 0x%x"
>
> # hw/dma/sparc32_dma.c
> -ledma_memory_read(uint64_t addr) "DMA read addr 0x%"PRIx64
> -ledma_memory_write(uint64_t addr) "DMA write addr 0x%"PRIx64
> +ledma_memory_read(uint64_t addr, int len) "DMA read addr 0x%"PRIx64 " len %d"
> +ledma_memory_write(uint64_t addr, int len) "DMA write addr 0x%"PRIx64 " len
> %d"
> sparc32_dma_set_irq_raise(void) "Raise IRQ"
> sparc32_dma_set_irq_lower(void) "Lower IRQ"
> -espdma_memory_read(uint32_t addr) "DMA read addr 0x%08x"
> -espdma_memory_write(uint32_t addr) "DMA write addr 0x%08x"
> +espdma_memory_read(uint32_t addr, int len) "DMA read addr 0x%08x len %d"
> +espdma_memory_write(uint32_t addr, int len) "DMA write addr 0x%08x len %d"
> sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg 0x%"PRIx64":
> 0x%08x"
> sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write
> dmareg 0x%"PRIx64": 0x%08x -> 0x%08x"
> sparc32_dma_enable_raise(void) "Raise DMA enable"
>
- Re: [Qemu-devel] [PATCHv3 06/13] sparc32_dma: use object link instead of qdev property to pass IOMMU reference, (continued)
- [Qemu-devel] [PATCHv3 05/13] sun4m_iommu: move TYPE_SUN4M_IOMMU declaration to sun4m.h, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 01/13] sparc32_dma: rename SPARC32_DMA type to SPARC32_DMA_DEVICE, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 09/13] lance: move TYPE_LANCE and SysBusPCNetState from lance.c to sun4m.h, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 08/13] sparc32_dma: make esp device child of espdma device, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 02/13] sparc32_dma: split esp and le into separate DMA devices, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 13/13] sparc32_dma: add len to esp/le DMA memory tracing, Mark Cave-Ayland, 2017/10/14
- Re: [Qemu-devel] [PATCHv3 13/13] sparc32_dma: add len to esp/le DMA memory tracing,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCHv3 12/13] sparc32_dma: remove is_ledma hack and replace with memory region alias, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 11/13] sparc32_dma: introduce new SPARC32_DMA type container object, Mark Cave-Ayland, 2017/10/14
- [Qemu-devel] [PATCHv3 10/13] sparc32_dma: make lance device child of ledma device, Mark Cave-Ayland, 2017/10/14
- Re: [Qemu-devel] [PATCHv3 00/13] sun4m: sparc32_dma tidy-ups, no-reply, 2017/10/14
- Re: [Qemu-devel] [PATCHv3 00/13] sun4m: sparc32_dma tidy-ups, Artyom Tarasenko, 2017/10/18