cvs commit: src/share/man/man9 bus_dma.9
Justin T. Gibbs
gibbs at scsiguy.com
Thu Aug 12 13:43:32 PDT 2004
> NetBSD has a nice clarification:
> Synchronization operations are expressed from the perspective of
> the host RAM, e.g., a device -> memory operation is a READ and a
> memory -> device operation is a WRITE.
>
> I think that something of that variety is required, since there are
> always the two opposite meanings of "reading from" and "reading into".
First off, yes, our code is compatible with the NetBSD semantics.
While their description is perhaps more accurate, I believe that the API
as currently defined and the above description are still confusing.
If the API is from the perspective of the memory, then a WRITE
would mean the memory is updated by the operation, but it is not.
Perhaps a better way to describe the current semantics is from the
perspective of a "backing store". If you are writing a packet to
the wire, you perform a PREWRITE. If you are reading a packet from
the wire, you perform a PREREAD. A filesystem write requires the
SCSI controller to use a PREWRITE primative. A filesystem read
requires the SCSI controller to use PREREAD. etc. I believe this was
the intention of the original API.
In the long run, I'd like to come up with API names that are from
the perspective of the DMA engine doing the work. These names should
be different enough from the current API names so that the old API
can be retained for compatibility with NetBSD and OpenBSD. I think
that is the only way to really end the confusion.
--
Justin
More information about the cvs-src
mailing list