traq,
I do not know if your response was in regards to my written words, but my written words precisely were :
"Adding a SCSI Manager 4.3 "XPT layer" (for ancient machines) is not impossible or hard. FWB did it (loaded a clone of a fake SCSI Manager 4.3 on non 4.3 compatible macs).
So many macs allow SCSI Manager 4.3, except for a couple powerc laptops, with system 7.5, that SUCH A "dream nubus card" WOULD NOT BE TOO RESTRICTED if limited to machines that run 7.5 and had a standard NCR 53C96 SCSI controller chip. "
The above sentence takes the time to point out that FWB (jackhammer) adds scsi manager 4.3 on non 4.3 systems, but also that if a system did not have native 4.3, i do not mind so much because many do.
OF COURSE you do not need a host scsi chip or a particular host scsi chip or ANY scsi manager (none) to support installing hand made 4.3 scsi manager on a mac. In fact, the jackhammer by FWB did.
As to how, its not magical. There is a single trap for SCSI manager 4.3 that you must check to see if it is present in all programs written, and a person merely installs the trap when their library is loaded, no modifications to any firmware or code or even old scsi manager is needed. Check_Trap_Available(0xA089) _SCSIAtomic trap = 0xA089
SCSI Manager 4.3 is actually not an apple technology. It is an open standard (SCSI CAM) that , once again, mainly apple used. It is a great new way to do scsi but lacks many critical features allowed in the old SCSI manager, but also provides many more new ones. Missing features include microsecond accurate timeout specification (or millisecond for that matter), and no way to specify a RAID scatter gather span loop in a couple integers, (you had to construct a huge giant list of every scatter gather span for no reason except idiocy on EVERY single large IO even if the striping was uniform and predictable.
FWB installed hacks into their SCSI manager 4.3 to allow scatter gather to not have to be anally specified like that for speed, and FWB also allowed short timeouts, and eventually, I think Apple did too, by honoring top bit as flag for high precision timeout, i think.
SCSI Manager 4.3 is the open standard of "CAM" Common Access Method
described here in a short tutorial for unix
http://www.rcnp.osaka-u.ac.jp/unix/DOCUMENTATION/HTML/AA-PS3GD-TET1_html/camosf2.html
Adaptec bought and CANCELLED all scsi card companies that had CAM and shut CAM down on Windows 100%.
Adaptec bought over 9 competitors.
Writing a SCI Manger 4.3 layer is semi trivial in one regard, it is merely the XPT layer. A thin layer, with lots and lots of apple specific information calls.
Allowing a Macintosh boot device control panel to select a CAM based (Scsi manager 4.3 device) provided early in boot time, is covered briefly in :
http://developer.apple.com/documentation/Hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.23f.html
SCI Manger 4.3 is way cool in these two properties :
1> it is not polled with any apple hacks, it runs entirely under interrupts, except when interrupt are all turned off, and you are in a low level debugger (Macsbug, T/MON) and the debugger is feeding it using the pool feeder so data can be logged to disk while debugging, similar to the poll feed of a etehrnet card debugger nub
2> Thousands of pending I/Os can be issued at the same time (I have done 7,000) all with callbacks too. I think SCSI callbacks can be provoked to trigger and interrupt the macintosh for high speed honoring completion NO MATTER IF ALL THE USER ACCESSIBLE INTERRUPTS ARE TURNED OFF. It can even interrupt in the MIDDLE of a memory page fault handler already running. It is a breathtaking spectacular design of efficiency, that makes ATA, Firewire, USB, etc all look like sick crap. Mainly on the issuance and transfer side of the operation. (good programmers avoid using completion tasks in any I/O design needs).
(
To specify a general purpose high speed timer callback to be able to do that same trick (interrupt in the MIDDLE of a memory page fault handler already handling a page fault) you do the following undocumented trick using the magic value in a field normally filled with 0 : ) timer_Data.qLink = (QElemPtr) 0x65616461 )
if you search Google for : 65616461 apple … you will get 0 hits (except maybe this page you are reading now), but 65616461 is safe, system wide, legal, and works. I think apple mentioned it in writing eventually once. If not… ooopsie.
Apple uses magic values in their OS for their own engineering uses in other places too. One for PowerPC machines is
passing Gary Davidian’s birthday in a register from user-code land sent to the real PowerPC Kernel.
Ohhh, by the way, the reason some engineers (not me) play fast and loose with honoring a millisecond precise timeout in a SCSI CAM call, (SCSI Manager 4.3) is because the design has a glaring defect, and uses SECONDS (yes seconds !!!!!!!!!) as the minimum resolution for bus timing measurements or other events). FWB and Apple both refused to honor that in their own versions of CAM. Proof ? This --> "From the Common Access Method (CAM)
10.1.23 Timeout value
This field contains the maximum period in seconds that an issued SCSI command request can remain outstanding."
Idiocy amazes me sometimes. Polled Firewire and Polled USB do not, though, they are the product of the type of engineers apple hired.
HURRAY FOR CLEAN PURE PERFECT SCSI !