From: Bob McElrath <mcelrath@draal.physics.wisc.edu>
To: "James H. Cloos Jr." <cloos@jhcloos.com>
Cc: axp-list@redhat.com, debian-alpha@lists.debian.org,
linux-kernel@vger.rutgers.edu
Subject: Re: > 1GB on alpha. Patch to 1TB?
Date: Mon, 15 Mar 1999 18:34:38 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.04.9903151801100.10420-100000@draal.physics.wisc.edu> (raw)
In-Reply-To: <m3r9qqva4c.fsf@k6.jhcloos.com>
On 15 Mar 1999, James H. Cloos Jr. wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> >>>>> "Jay" == Jay Estabrook <Jay.Estabrook@digital.com> writes:
>
> Jay> On Alpha, in addition to the direct-map DMA windows which are currently
> Jay> used, one can define what we call "scatter-gather" DMA windows. The range of
> Jay> PCI addresses that fall into one of these windows are re-directed to host
> Jay> memory via a page table, where the address in a PTE can be *any* page in the
> Jay> possible installed memory - no bounce buffers needed... :-)
>
> I suspect this is what the original poster was referring to. In any
> case, for 2.3 at least, this would be the best target to shoot for, IMO.
>
> How much effort would be required to implement this scheme? If the
> `scatter-gather' were set up at device resolution, rather than page
> resolution, would the drivers even require modification?
Yes. It still requires that a driver allocate a section of memory that it
is going to be using for PCI communication. There's no way around this.
I (the original poster) don't know if a scatter-gather solution is required
(it is supported by alpha hardware, I don't know about others). It may be
possible to do it without scatter-gather support in hardware. At any rate,
it looks like all device drivers that are going to be using PCI transfers
will have to do something like:
bus_alloc(<buffer address>, <size>);
out(virt_to_bus(<buffer address>), HARDWARE_DO_SOMETHING_PORT);
[...]
bus_dealloc(<buffer address>);
virt_to_bus is currently implemented, but cannot on the fly determine how to
reallocate mappings so as to not clobber another device, unless it is told
(via my bus_alloc or something similar) who is using what regions of the PCI
address space.
Note that using this bus_alloc/bus_dealloc implementation allows the driver
to keep several buffers. Also note that giving the hardware a different
address within the buffer should work fine too. (out(virt_to_bus(<buffer
address> + 0x4000), HARDWARE_DO_SOMETHING_PORT) etc.)
On alpha scatter-gather is simply an address translation scheme that allows
small granularity (8kb). I don't know how much kernel support beyond
bus_alloc/virt_to_bus/bus_dealloc would be required to implement bounce
buffers using the scatter-gather mappings. Perhaps someone who understands
bounce buffers would care to comment? (I'm still not sure what they are...)
I wonder if it would be possible to take a poll of hardware owners to
determine which chipsets support scatter-gather. I don't know if this is
part of the PCI spec, or a hack implemented by Digital and Sun. Will Merced
chipsets support scatter-gather? At any rate, a generic
bus_alloc/bus_dealloc should be able to hide whatever memory->bus remapping
the hardware supports...whether scatter-gather exists on all chipsets or
not.
Most importantly: if bounce buffers are required to access memory >1GB from
PCI, can it be done with a simple bus_alloc/virt_to_bus/bus_dealloc? Or
must we implement a more complex solution that can handle both cases?
-- Bob
Bob McElrath (rsmcelrath@students.wisc.edu) Univ. of Wisconsin at Madison
next prev parent reply other threads:[~1999-03-16 0:44 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199903132048.VAA11627@sunsite.mff.cuni.cz>
1999-03-13 21:17 ` > 1GB on alpha. Patch to 1TB? Matthew Jacob
1999-03-14 16:02 ` Jay.Estabrook
1999-03-15 19:14 ` James H. Cloos Jr.
1999-03-15 19:41 ` Michal Jaegermann
1999-03-15 21:46 ` Matti Aarnio
1999-03-16 1:42 ` Richard Henderson
1999-03-16 6:04 ` Mike
1999-03-16 6:25 ` UDB/Multia Info (sorry, prev. msg posted w/wrong subject) Mike
1999-03-16 8:58 ` Martin Ostermann
1999-03-16 6:25 ` > 1GB on alpha. Patch to 1TB? Ron Farrer
1999-03-16 6:28 ` Mike
1999-03-16 12:10 ` Multia install info Rich Payne
1999-03-17 4:47 ` Mike
1999-03-16 0:34 ` Bob McElrath [this message]
1999-03-16 5:12 ` > 1GB on alpha. Patch to 1TB? Jay.Estabrook
1999-03-16 13:09 ` Greg Lindahl
1999-03-16 18:08 ` Jay.Estabrook
[not found] <19990315002405.A2138@alpha.franken.de>
1999-03-15 0:54 ` Jay.Estabrook
1999-03-11 20:28 Anders Blicher Petersen
-- strict thread matches above, loose matches on Subject: below --
1999-03-11 5:57 Bob McElrath
1999-03-11 6:13 ` Greg Lindahl
1999-03-11 7:14 ` Gerhard Schneider
1999-03-11 17:17 ` Maurice Hilarius
1999-03-11 20:03 ` Greg Lindahl
1999-03-11 16:50 ` Ron Farrer
1999-03-11 17:19 ` Maurice Hilarius
1999-03-11 17:39 ` Ron Farrer
1999-03-11 18:17 ` Maurice Hilarius
1999-03-11 18:31 ` Ron Farrer
1999-03-12 0:47 ` Steve Frampton
1999-03-12 1:01 ` Larry Snyder
1999-03-12 1:31 ` mgraffam
1999-03-12 4:51 ` Izaak Bozof
1999-03-13 18:45 ` Richard Henderson
1999-03-13 18:50 ` Matthew Jacob
1999-03-13 23:58 ` Stephen Williams
1999-03-14 21:04 ` Matthew Jacob
1999-03-13 19:16 ` Dave Gilbert
1999-03-13 23:57 ` Stephen Williams
1999-03-14 3:18 ` Matti Aarnio
1999-03-15 22:47 ` Greg Lindahl
1999-03-15 23:02 ` Matti Aarnio
1999-03-16 5:25 ` Jay.Estabrook
1999-03-14 3:21 ` Richard Henderson
1999-03-14 5:51 ` Stephen Williams
1999-03-14 17:59 ` Greg Lindahl
1999-03-14 20:45 ` Stephen Williams
1999-03-14 20:50 ` Greg Lindahl
1999-03-14 21:19 ` Stephen Williams
1999-03-14 21:44 ` Greg Lindahl
1999-03-15 9:59 ` Matti Aarnio
1999-03-15 16:52 ` Stephen Williams
1999-03-15 17:03 ` Matthew Jacob
1999-03-14 18:23 ` Greg Lindahl
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox