Subject: Re: MicroVAX I: in need of modern OS.
To: Anders Magnusson <firstname.lastname@example.org>
From: Brian D Chase <email@example.com>
Date: 02/05/1999 15:58:35
On Fri, 5 Feb 1999, Anders Magnusson wrote:
> > I was just wanting to know in general how you locate DMA buffers in
> > physical memory such that:
> There are no actual "buffers". A device normally just do DMA into
> the physical memory at some address.
Okay, well I'll just call them chunks of physical memory then.
> > 1) the CPU knows where they are,
> If I want to DMA 512 byte to address 0x80123400, I first check which
> Page table entry that matches that address, then I extract the physical
> address from the PTE.
> > 2) the device knows where they are, and
> The physical address extracted from the PTE is written into some device-
> specific register.
Okay, this makes sense as well.
Apart from passing the address of the physical memory to use in the DMA,
it would seem that you'd also need to have information about the transfer
size. So either a device has a predetermined size for its DMA transfers,
or you need to tell the device via some other register how much physical
memory it can write to at the address you provide.
> > 3) how virtual memory management and DMA on a physical address space
> > peacefully coexist.
> Memory is always physical. The MMU is a layer between the CPU and memory.
> An I/O device address the memory directly; therefore the MMU isn't
> involved in any DMA transfers.
Just on the CPU side by the OS to determine which physical address
corresponds to the virtual address it wants to DMA. And yes, I definitely
understand that the devices themselves only deal with memory at the
physical address level.
> > It may be more appropriate to ask it in one of the kernel tech lists.
> This isn't anything netbsd-specific, morely CPU-architecture specific.
> If you have the "VAX Architecture Reference Manual" available I would
> recommend chapter 5-8, which gives a rather good description of this.
I will do some reading. :-)
Brian "JARAI" Chase | http://world.std.com/~bdc/ | VAXZilla LIVES!!!