

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=Revision_3</id>
	<title>Revision 3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=Revision_3"/>
	<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Revision_3&amp;action=history"/>
	<updated>2026-04-04T07:01:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Revision_3&amp;diff=356&amp;oldid=prev</id>
		<title>Steven Solie: Created page with &quot;     $Id: SANA2Revision3 1.1 1996/07/14 22:18:55 heinz Exp $  Enhancement to SANA-IIR2 (S2R2) for better buffer management ====================================================...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Revision_3&amp;diff=356&amp;oldid=prev"/>
		<updated>2012-03-28T03:26:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;     $Id: SANA2Revision3 1.1 1996/07/14 22:18:55 heinz Exp $  Enhancement to SANA-IIR2 (S2R2) for better buffer management ====================================================...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
    $Id: SANA2Revision3 1.1 1996/07/14 22:18:55 heinz Exp $&lt;br /&gt;
&lt;br /&gt;
Enhancement to SANA-IIR2 (S2R2) for better buffer management&lt;br /&gt;
============================================================&lt;br /&gt;
&lt;br /&gt;
It has been observed that the standard buffer management callbacks&lt;br /&gt;
may not be very efficient for certain types of hardware. They also&lt;br /&gt;
do not allow driver DMA access. Therefore the original S2R2&lt;br /&gt;
specification has been enhanced to allow for more flexible buffer&lt;br /&gt;
management. This enhancement is fully backwards compatible.&lt;br /&gt;
This document together with the original S2R2 documentation, should&lt;br /&gt;
be referred to as &amp;quot;SANA-IIR3&amp;quot; or S2R3. Future enhancements shall be&lt;br /&gt;
built upon S2R3.&lt;br /&gt;
&lt;br /&gt;
All the new features are completely optional and do not collide&lt;br /&gt;
with existing features. They may be used only when the protocol&lt;br /&gt;
stack asks for them on opening a driver.&lt;br /&gt;
&lt;br /&gt;
The enhancements consist of several new tags that may be specified&lt;br /&gt;
by a protocol stack on OpenDevice() to offer certain data transfer&lt;br /&gt;
options. It is up to the device driver to chose which callbacks to&lt;br /&gt;
use at what time. These tags are advisory only and may be ignored&lt;br /&gt;
by the driver for any data buffer at any time.&lt;br /&gt;
&lt;br /&gt;
#define S2_CopyToBuff16         (S2_Dummy + 4)&lt;br /&gt;
#define S2_CopyFromBuff16       (S2_Dummy + 5)&lt;br /&gt;
#define S2_CopyToBuff32         (S2_Dummy + 6)&lt;br /&gt;
#define S2_CopyFromBuff32       (S2_Dummy + 7)&lt;br /&gt;
&lt;br /&gt;
    These are optional callbacks presented to the device with the&lt;br /&gt;
    same calling interface as for S2_CopyToBuff or S2_CopyFromBuff,&lt;br /&gt;
    respectively. The difference to the original callbacks is the&lt;br /&gt;
    required and guaranteed transfer size and alignment for&lt;br /&gt;
    accessing the device&amp;#039;s buffer for a single piece of a data of&lt;br /&gt;
    either 16 or 32 bits, a data word. The copy function called may&lt;br /&gt;
    only use 16/32 bit aligned read/write commands of 16/32 bits at&lt;br /&gt;
    once to transfer the data words, respectively. If the buffer&lt;br /&gt;
    data length is not a multiple of the required data word&lt;br /&gt;
    transfer size, the last data word transfer may contain garbage&lt;br /&gt;
    padding in either transfer direction.&lt;br /&gt;
&lt;br /&gt;
    These tags have been added to support direct writes into&lt;br /&gt;
    hardware buffers that do not allow arbitrarily sized or aligned&lt;br /&gt;
    accesses.&lt;br /&gt;
&lt;br /&gt;
#define S2_DMACopyToBuff32      (S2_Dummy + 8)&lt;br /&gt;
#define S2_DMACopyFromBuff32    (S2_Dummy + 9)&lt;br /&gt;
&lt;br /&gt;
    If the protocol stack wants to optionally enhance data transfer&lt;br /&gt;
    efficiency with DMA supporting devices, it may pass any of&lt;br /&gt;
    these optional tags to the device on OpenDevice().&lt;br /&gt;
&lt;br /&gt;
    If the device driver supports DMA, it may call the respective&lt;br /&gt;
    callback with the abstract magic cookie ios2_Data in register&lt;br /&gt;
    A0. The callback may return NULL in D0. In this case, the&lt;br /&gt;
    driver may not use DMA for this buffer. Alternatively, the&lt;br /&gt;
    callback may return the address of the actual data buffer&lt;br /&gt;
    in D0, if it has these characteristics:&lt;br /&gt;
&lt;br /&gt;
    - The buffer is in contigous memory. Depending on the intended&lt;br /&gt;
      data direction, it shall be readable or writable.&lt;br /&gt;
    - The buffer is aligned on a 32 bit boundary.&lt;br /&gt;
    - The buffer size shall be a multiple of 32 bit and it is at&lt;br /&gt;
      least &amp;gt;= ios2_DataLength.&lt;br /&gt;
&lt;br /&gt;
    It is up to the driver to decide if it can use DMA for this&lt;br /&gt;
    buffer and it shall fall back to the standard CPU callbacks if&lt;br /&gt;
    necessary. The data transfer method actually used by the driver&lt;br /&gt;
    will not be known in advance by the protocol stack.&lt;br /&gt;
&lt;br /&gt;
It is obviously non conforming and always has been that way for&lt;br /&gt;
SANA-II device developers to define their own tags.&lt;br /&gt;
&lt;br /&gt;
Heinz Wrobel&lt;br /&gt;
&amp;lt;heinz@amiga.de&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steven Solie</name></author>
	</entry>
</feed>