[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: got quik working with OldWorld G3 Beige 233MHz

On Tue, Oct 26, 2004 at 03:50:31AM -0400, Rick Thomas wrote:
> I may be mistaken, but I believe that, when booting from a hard 
> disk (not a floppy), miboot depends on having it's early stages 
> loaded by the Apple OldWorld Boot ROM code, which needs the 
> afore-mentioned patches to do its job.

Well, it's not really that simple. I'll try to explain as I go
along in the message.

> These patches and the patch chaining driver are placed on the 
> low-numbered partitions of a hard-disk by the Apple disk 
> partitioning utility (or by third-party partitioning utilities that 
> [presumably] use the patches under license from Apple.)
> In the listing snippet below, I'm talking about the contents of 
> hdc[2-5] -- the reason why my macOS9 partition is hdc6 rather than 
> hdc2.

Actually, The partitions between the partition map and your data are
the actual disk drivers (as well as patches to them). The I/O layer
in the classic MacOS is really odd. The OS provides the equivalent
of VFS and the low level SCSI/IDE/etc. framework. The drivers to
connect the two different layers are device specific. This would be
similar to the sd/sr driver in linux. For floppies, the .SONY driver
is completely in ROM, but for other devices, the system has to load
the real driver off of the device. The ROM just has a really simple
driver that is barely smart enough to find and load drivers.

I looked into writing a read-only driver (for CD-ROM usage), but it's
a ton of work. Apple makes enough info available. The only issue is
the driver patches that you mentioned above. They are workarounds for
some really stupid bugs in the ROM in places like the MESH driver.
They would be difficult to reproduce in a free environment.

> This theory would be disproved if anyone had ever gotten miboot to 
> boot from a disk that was missing the driver partitions.  Anybody 
> ever tried that?

Can't be done on oldworld. The MacOS ROM will not read a device for
which it can't find drivers. This is why we can't make a bootable
CD-ROM (for oldworld) without using something like Toast.

> For NewWorld machines, this seems *not* to be required.  I believe 
> that this is because all the code needed to boot is in the Open 
> Firmware.  This is the reason why, if you install a PCI disk 
> interface card and you expect to boot from it, you need to be sure 
> that the card has an on-board ROM with Open Firmware booting 
> support that effectively extends the mother-board's Open Firmware 
> so that it knows how to deal with the new card.

That's because on newworld, even the MacOS is actually loaded off
disk directly from OF. We can use yaboot to hook in at exactly the
same level that Apple uses for their own system. However, the classic
MacOS still needs the drivers even on a newworld system. They just
get loaded by the fake software ROM that is loaded off the system disk.

> Booting from a floppy does not require any patches -- for a couple 
> of reasons: 1) space -- a floppy doesn't have much space and a 
> couple of dozen Kbytes for patches would be highly inconvenient; 2) 
> testing -- the ROM code that deals with booting from floppies must 
> get pretty well rung-out during design test, so it's got to be 
> absolutely bug-free before the hardware is released.

Due to space limits, Apple explicitly designed the system to not
require or even expect drivers on a floppy. The drivers are only
expected on partitioned media. And before you ask, Apple style
CD-ROM images are indeed partitioned.

	Brad Boyer

Reply to: