Re: Intel vs AMD x86-64

Albert Cahalan
2004-02-24T04:59:53Z

David S. Miller writes:
> Linus Torvalds <torvalds@osdl.org> wrote:

>> In fact, I _think_ you could actually use the AGP bridge as a strange
>> IOMMU. Of course, right now their AGP bridges are all 32-bit limited
>> anyway, but the point being that they at least in theory would seem to
>> have the capability to do this.
>
> Ok, I see. In fact, I remember some vague notion that the AGP bridge
> on the Athlon's could technically be used as a full-on IOMMU, especially
> since it was all derived from Alpha PCI chipsets which did use things
> this way.

This is exactly the way it works. The AGP bridge is
a replicated per-CPU thing, along with the memory.
Good boards have a BIOS option marked "Linux only"
that lets you choose an IO-MMU window size ranging
from 32 MB to 2 GB. Direct your 32-bit PCI DMA
into that window and you get an IO-MMU.

Memory can be interleaved across the CPUs or not,
on 4 kB boundries. It's a BIOS option, though some
insane code could be written to change the setting.
Setting up only one of the IO-MMUs would be neat.