Archived from groups: comp.arch,comp.sys.ibm.pc.hardware.chips,comp.sys.intel (
More info?)
On Sun, 04 Jul 2004 22:46:42 GMT, "Stephen Sprunk" <stephen@sprunk.org>
wrote:
>"George Macdonald" <fammacd=!SPAM^nothanks@tellurian.com> wrote in message
>news:4ciee0dgggvv0qco4aqh791b9l6ri2oqs2@4ax.com...
>> On Fri, 02 Jul 2004 22:41:52 GMT, "Stephen Sprunk" <stephen@sprunk.org>
>> wrote:
>> >The hack already exists for 16-bit ISA DMA, and there's no obvious way to
>> >remove it or it would have been done by now. Likewise, there's no
>obvious
>> >way to remove bounce bufferring for 32-bit PCI DMA. The Linux folks may
>be
>> >religious wackos, but they're not dumb.
>>
>> ISA DMA is a different mechanism from PCI Bus Mastering - if you need
>> bounce bufferng with both, commonality of code is not obvious.
>
>The commonality is obvious. If a driver requests a DMA to/from a buffer
>that's outside the address space addressable by DMA, then you use a bounce
>buffer. Only the size of the address space is different between the two.
>
>The mechanisms of performing a DMA are very different, but the bounce buffer
>code is identical.
Floppy vs. HDD?? When the device accesses are so different, there's no
reason to attempt common code - one will evolve the other stays the same.
>> As for
>> 32-bit PCI Bus Mastering, it depends on devices, PC memory mappings and
>> legacy support - the code may have to be there to cover that but it's
>> certainly possible to do without bounce buffering for current modern
>> hardware to <4GB main memory. Doing it all the time is err, sub-optimal;
>> designing new hardware which needs it is an abberation, maybe even a case
>> of incompetence or contempt!
>
>Neither Windows nor Linux uses bounce buffers if the src/dst buffer is in
>the low 4GB. I know Linux allows device drivers to specifically request a
>buffer in the low 4GB (or 16MB), but by default they're located higher to
>conserve low memory, and buffers may come from sources that are unaware of
>their physical address (like applications); I presume Windows has the same
>mechanisms.
Well, well, we seem to be in danger of agreeing... apart from the fact that
the reason to not bounce is more to do with efficiencies, i.e. not having
to do mem-mem copies. An app., of course doesn't have to know about buffer
physical addresses anyway.
Now if we have one mfr who does it right and the other who does it with
err, legacy chipset functionality, which seems preferable?
Rgds, George Macdonald
"Just because they're paranoid doesn't mean you're not psychotic" - Who, me??