[CDG5] SCSI Manager?
Elliot Nunn
elliotnunn at fastmail.com
Fri May 31 12:13:54 AWST 2019
The very existence of "disk drivers" in MacOS is alien to me. I suppose
that it owes to the lack of standardisation of early SCSI devices. The
SCSI Manager needed to be able to drive the controller, enumerate and
arbitrate on the bus, and find a driver for each device. In the case of
block devices, the SCSI Manager needed to speak to them just well enough
to fetch a driver from a partition near the start of the disk. Then the
driver can add new features, or take advantage of the special
capabilities of the drive and disk, e.g. caching, password protection,
encryption, partitioning.
This design pattern was repeated for ATA and FireWire.
Of course, this means that a disk (at least a bootable one) must contain
a driver for every bus that it might be connected over. For example, a
hard disk could be connected via ATA or FireWire.
Overall, a pretty nasty arrangement. I think that we should create a
patchset to insert the ATA and SCSI drivers from the Drive Setup app
into the NewWorld ROM. This would let people install 9 on a disk without
having to wipe it first!
In the meantime, I a new SIM is all that we need to get VirtIO working.
And having OpenBios stitch it into the device tree would be very neat!
> On 31 May 2019, at 4:05 am, Daniel B-J <danielbj314 at verizon.net> wrote:
>
> From the tiny bits of documentation I looked at, VirtIO SCSI will require a SIM written for it. SIMs are documented in "Inside Macintosh: Devices".
>
> PCI PowerMacs can have SIMs as entries into the device tree, as documented in "Designing PCI Cards and Drivers for Power Macintosh Computers".
>
> So it is possible to write a SIM and have Openbios insert it into the device tree.
>
> I suppose if you wanted to have a driver for a specific disk instead of a bus, you could use the Monster technote to write a driver for that one device. It doesn't look easy, but it might be better than writing a SIM. It's hard to tell.
>> On May 30, 2019, at 7:03 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>
>> It would be great to get VirtIO working. The “device” driver should be pretty simple to write, if we can get the right development kit.
>>
>> The NewWorld ROM already has exactly the same SCSI Manager as the OldWorld ROM! It allows NewWorld machines to boot from a SCSI PCI card.
>>
>> Those NDRVs are (I think) ATA Interface Modules (AIMs). SCSI Interface Modules (SIMs) are buried a bit deeper in the 68k ROM, possibly even in the MainCode image. (Use the tbxi tool to check this out.)
>>
>> This “monster” technote gives an overview of the MacOS disk driver situation.
>>
>> https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn1189.html
>>
>> On Thu, 30 May 2019, at 11:30 AM, Jd Lyons wrote:
>>> I was fooling around with Qemu and Virtio and I’m able to boot the newworld Mac OS ROM from a VirtIO PCI SCSI disk, however we can’t get the System file. Presumably because we need an ‘NDRV’ for our block device.
>>>
>>> I notice that in the Newworld ROM we have /newworld-rom/pef/ndrv/ata with the ‘NDRV’s for:
>>>
>>> cmd646
>>> heathrow
>>> kauai
>>> keylargo
>>>
>>> I seem to recall something about a SCSI manager in the Old World ROM, and I wondering if there is a way to extract it and add it to the New World ROM?
>>>
>>> Likely we’ll need an ‘NDRV’ made just for Qemu’s VirtIO-SCSI device, but I think it will have to be added to Openbios or the New World ROM to get us booting…..
>>>
>>>> On May 26, 2019, at 11:28 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>>
>>>>> On 26 May 2019, at 10:25 pm, Daniel B-J <danielbj314 at verizon.net> wrote:
>>>>>
>>>>> How does the parcel file syntax work?
>>>>
>>>> This needs to be commented in the Parcelfile
>>>>
>>>> 0 tab = parcel (first word is OSType, subsequent ones are fields)
>>>> 1 tab = parcel child (first word is OSType, subsequent ones are fields)
>>>> 2 tab = data to be inserted directly (the src= property can be used alternatively)
>>>>
>>>> _______________________________________________
>>>> cdg5 mailing list
>>>> cdg5 at ucc.asn.au
>>>> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
>>> _______________________________________________
>>> cdg5 mailing list
>>> cdg5 at ucc.asn.au
>>> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
>>>
>>
>> _______________________________________________
>> cdg5 mailing list
>> cdg5 at ucc.asn.au
>> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
>
> _______________________________________________
> cdg5 mailing list
> cdg5 at ucc.asn.au
> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
More information about the cdg5
mailing list