qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 00/25] esp: consolidate PDMA transfer buffers


From: Mark Cave-Ayland
Subject: Re: [PATCH 00/25] esp: consolidate PDMA transfer buffers
Date: Wed, 13 Jan 2021 19:29:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 13/01/2021 14:39, Paolo Bonzini wrote:

On 30/12/20 16:37, Mark Cave-Ayland wrote:
This patch series comes from an experimental branch that I've been working on
to try and boot a MacOS toolbox ROM under the QEMU q800 machine. The effort is
far from complete, but it seems worth submitting these patches separately since
they are limited to the ESP device and form a substantial part of the work to
date.

As part of Laurent's recent q800 work so-called PDMA (pseudo-DMA) support was
added to the ESP device. This is whereby the DREQ (DMA request) line is used
to signal to the host CPU that it can transfer data to/from the device over
the SCSI bus.

The existing PDMA tracks 4 separate transfer data sources as indicated by the
ESP pdma_origin variable: PDMA, TI, CMD and ASYNC with an independent variable
pdma_len to store the transfer length. This works well with Linux which uses a
single PDMA request to transfer a number of sectors in a single request.

Unfortunately the MacOS toolbox ROM has other ideas here: it sends data to the
ESP as a mixture of FIFO and PDMA transfers and then uses a mixture of the FIFO
and DMA counters to confirm that the correct number of bytes have been
transferred. For this to work correctly the PDMA buffers and separate pdma_len
transfer counter must be consolidated into the FIFO to allow mixing of both
types of transfer within a single request.

This is all esp.c, so if Laurent and you are fine just send a pull request.

Thanks!

Paolo

I sent a self-nak a little while back because I found an issue with address alignment in some requests coming from the MacOS toolbox ROM. I think I now understand what the issue is, so I hope to post a v2 with this fixed soon.


ATB,

Mark.



reply via email to

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