OpenBSD/src LAil3plsys/arch/sparc64/dev iommu.c pyro.c, sys/arch/sparc64/include pci_machdep.h

   add support for bypassing iommu translation

   managing the translation table entries (TTEs) on an iommu is not
   free, and is in fact extremely expensive on some platforms. the
   flip side of this is that forcing dma through TTEs does provide
   some safety and can help during the development of drivers. however,
   this has been less true in recent years than it used to be and is
   less of a concern now, especially considering the performance
   differences on some platforms.

   devices have to create dmamaps with BUS_DMA_64BIT to bypass the
   iommu because the memory window presented to hardware with direct
   access to memory is at an extremely high address. there's no 32bit
   bypass access to memory, it has to go through TTEs otherwise.

   on an m4000 there are several orders of magnitude performance
   difference between a driver with BUS_DMA_64BIT set and one without
   it.

   hilariously, sun used a pci bridge on a whole generation of machines
   that had broken support for dma addresses over 40 bits (or around
   there), so devices behind those pci bridges need to have their
   dmamap_creates intercepted and any potential BUS_DMA_64BIT flags
   cleared on the way to the iommu drivers. this affects at least v215,
   v245, and v445, and probably u25s and u45s. it probably explains
   why all their onboard nics and disk controllers feel super slow,
   and why there was a meme at sun that bcopy was cheaper than dma
   when moving packets on and off a nic.

   ok kettenis@ deraadt@
VersionDeltaFile
1.76+129-104sys/arch/sparc64/dev/iommu.c
1.33+40-3sys/arch/sparc64/dev/pyro.c
1.48+41-0sys/arch/sparc64/dev/pci_machdep.c
1.18+19-4sys/arch/sparc64/dev/iommuvar.h
1.18+6-5sys/arch/sparc64/dev/iommureg.h
1.35+3-2sys/arch/sparc64/include/pci_machdep.h
1.76+2-2sys/arch/sparc64/dev/psycho.c
1.69+2-2sys/arch/sparc64/dev/schizo.c
1.45+2-2sys/arch/sparc64/dev/sbus.c
+244-1249 files

UnifiedSplitRaw