Source-Changes archive

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

CVS commit: src/sys/arch/mac68k/obio



Module Name:    src
Committed By:   rin
Date:           Mon Aug 15 12:16:25 UTC 2022

Modified Files:
        src/sys/arch/mac68k/obio: esp.c espvar.h

Log Message:
Rework avdma to fix PR port-mac68k/56131 as well as add synchronous
transfer support.

According to analysis by Michael Zucca, PSC (DMAC for Quadra/Centris AV)
seems to require that DMA buffer is
  (1) aligned to 16-byte boundaries, and
  (2) multiple of 16 bytes in size.
If the buffer does not satisfy these constraints, esp.c rev 1.63 and
prior carry out partial PIO to align or shave off it.

However, partial PIO does not always work correctly for combination of
NCR53C94 and PSC, which results in failures observed as port-mac68k/56131.

Also, PIO spoils synchronous transfer, which is timing critical.

Therefore, for buffers that do not satisfy the boundary conditions,
completely stop using PIO and use DMA with ``bounce'' buffers.

This fixes port-mac68k/56131 and enables sync transfer as a big bonus.

Note that bounce DMA does not hurt performance at all. For filesystem
and swap I/O, buffers always satisfy the constraints above, and bounce
DMA is necessary only
  (a) when disk is attached, or
  (b) for special utilities like fsck(8) or fdisk(8),
as far as I can tell.

Also:

- Stop providing ``DMA-friendly'' sc_imess and sc_omess; transfer for
  MSGIN or MSGOUT does not almost certainly satisfy boundary condition
  (2). Again, this does not affect performance at all.

- SCSI bus frequency is 20MHz (i.e., 5MB/s for sync transfer) for AV
  models, according to ``Quadra 840AV Service Source''.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mac68k/obio/esp.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mac68k/obio/espvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index