Re: 64 bit PCI and Linux

Martin Mares (mj@ucw.cz)
Mon, 24 Aug 1998 12:21:19 +0200


Hello,

> > - On 32-bit machines it's just able to read the 64 bit address and
> > throws out the device if it's been configured by the BIOS to use
> > addresses outside the 32 bit range the machine can handle.
>
> Why such a software limitation?

I was wrong. We just ignore the 64-bit addresses and issue a warning. On the
other hand, this will probably not appear in any real situation -- do you know
of any machine where the CPU is 32 bit, but the firmware assigns 64 bit
addresses to PCI devices?

> The same scheme can be used for a 64 bit device on 64 bit PCI bus driven
> from a 32 bit CPU and AFAIK, the Pentia II allows 36 bit addressing for
> host memory. So, 64 bit PCI could be used on ia32 in order to DMA into the
> whole 36 bit address range.

The 36 bit addressing in P-II is a gross hack and it probably cannot be
supported by any OS in a non-ugly way. There was a lengthy debate regarding
this topic on linux-kernel some weeks ago and most people aggreed on "use
a real 64 bit machine if you want more than 4G of address space".

| I personally think solution 2) is kinda nifty, we could then implement
| some DMA mapping functions like pci_map_bus() and pci_unmap_bus() and
| let these be dummy functions on architectures who do not know how to
| deal with it and 32 bits archs. It will definately make it easier for
| the individual driver programmers.

If setting up an IOMMU mapping is not too costly, I would prefer functions
for remapping a DMA buffer to lower 4G and unmapping it which would be called
before and after each DMA transfer.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"A LISP programmer knows value of everything, but cost of nothing."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html