Subject: Re: TK50Z
To: None <port-vax@NetBSD.ORG>
From: Michael Sokolov <sokolov@alpha.CES.CWRU.Edu>
List: port-vax
Date: 03/02/1998 18:37:37
   Dear Ladies and Gentlemen,
   
   It looks like there is a good discussion going on here about the actual
DMA hardware on BabyVAXen. Great! This should finally yield the answer as
to whether the CCS-speaking SCSI drivers in VMS and Ultrix can be used
unmodified on KA410 or not, as well as help me in my work on the perfect
BabyVAX MFM and SCSI drivers. Nice job!
   
   I have always been hearing that both MFM and SCSI controllers on KA410
can DMA only to a fixed buffer and not to arbitrary memory addresses, and
that this buffer is shared between the two. Allison's assertion that
HDC9224 can DMA to an arbitrary address within 16 MB (on KA410 that would
be the entire RAM address space) has first confused me, but then it was
proposed that HDC9224's internal address counter is not actually used, and
that there is an external one. To test this theory, I have looked at the
source for an OS that supports this controller. There are three such OSes:
VMS, Ultrix, and NetBSD. Since I don't have sources for the first two, I
have used the third. And sure enough, reverse-engineering of
sys/arch/vax/vsa/hdc9224.c shows that the internal DMA address registers of
HDC9224 are always set to all zeros, and the data transfer is always to or
from a special buffer. Furthermore, reverse-engineering of
sys/arch/vax/vsa/ncr.c and sys/arch/vax/vsa/vsbus.c shows that the SCSI
controller is using the same buffer, and there is special logic for
arbitrating this buffer between the two drivers in
sys/arch/vax/vsa/vsbus.c. And yes, the size of the buffer is 16 KB and it
is separate from the main RAM.
   
   So far we have seen that KA410 has one MFM controller and one SCSI
controller, that both do DMA only to a special 16 KB buffer, and that this
buffer is shared between them. It's quite possible that the logic to
address this buffer (the counters and stuff) is also shared. What's the
story with KA42/41 and KA43?
   
   Allison wrote:
> NCR using what DMA, the MV-II dma?
   
   What do you mean by "MV-II dma"?
   
> <need to use the 16K buffer. DMA counters on 2000 and 3100/76 differ
> <eg. in one using 1-complement and the other using 2-complement of the
> <transfer size for initialization. Don't know about other models of 3100.
>
> ??? The dma in the 9224 is the same in any system(hard wired in the
> chip). Could be that they are using an external DMA controller from the
> 9224
   
   Bertram was talking about SCSI there, not about MFM. (He has chosen not
to support MFM on KA42. I promise not to repeat this grave mistake in my
work.)
   
> [...] dma address is Registers 0/1/2 [...]
   
   As I have shown above, these are always initialized to all zeros,
proving that HDC9224's ability to address 16 MB is not used in BabyVAXen
and all transfers have to go through a special buffer.
   
> These are those annoying details that docs and prints can solve.
   
   Do you have any idea as to what documents should I ask Richard for?
   
   Sincerely,
   Michael Sokolov
   Phone: 440-449-0299
   ARPA Internet SMTP mail: sokolov@alpha.ces.cwru.edu