[rescue] rescuing an ailing U10...

Jochen Kunz jkunz at unixag-kl.fh-kl.de
Wed Oct 10 02:42:01 CDT 2007


On Tue, 9 Oct 2007 23:23:16 -0700
"James Hartley" <jjhartley at gmail.com> wrote:

> how does a 32-bit card function in a 64-bit architecture?
You mean things like: "How can a 32 bit card do DMA in a machine with 64
bit address space?"
It is simple: There is an IOMMU (Input Output Memory Management Unit) in
the PCI host bridge. It translates 32 bit PCI DMA addresses coming from
the PCI bus to 64 bit CPU addresses. When a device driver sets up DMA by
programming the PCI device, it also has to setup a corresponding mapping
in the IOMMU. E.g. the PCI device does DMA to address 0x00001000 and the
IOMMU is programmed to translate PCI address 0x00001000 to CPU address
0xFF0010000A003000.

NetBSD e.g. hides all this complexity and encapsulates it in bus_dma(9)
and bus_space(9). So a device driver doesn't need to care about an
IOMMU. A device driver just allocates "DMA memory". By doing so the
bus_dma(9) does all the dirty mapping work and tels the device driver
what addresses it has to use. bus_dma(9) also cares about things like
cache synchronisation.
--


tsch|_,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/



More information about the rescue mailing list