qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] hw/mips/jazz: create ESP device directly vi


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/mips/jazz: create ESP device directly via qdev
Date: Wed, 13 Jun 2018 13:19:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 13/06/2018 12:36, Mark Cave-Ayland wrote:
> Check out hw/dma/sparc32_dma.c for some ugly examples:
> espdma_memory_read()/espdma_memory_write() update the DMA address
> pointer register after each read/write, and
> ledma_memory_read()/ledma_memory_write() need to determine if the pcnet
> card has byte-swapping enabled: if so, then don't perform the required
> lance 16-bit swap and if not, do perform the 16-bit swap.

Heh, those are disgusting indeed. :)  So I guess it would have to stay,
only MIPS can use the pure MemoryRegion-based approach.

Regarding pcnet, is CSR_BSWP really a no-op on PCI cards?  If not, an
option could be to move that handling to pcnet.c - making the ledma swap
unconditional and removing the do_bswap argument.  The disadvantage is
that SPARC would swap twice, and you'd have to keep the callback because
of s->dmaregs[3], but maybe it's still worthwhile.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]