[openbeos] Re: USB and PPC port.... I'm here to help... when I can...

  • From: "Nathan Whitehorn" <nathan.whitehorn@xxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 21 Jan 2002 13:30:44 -0600

> >Also, I'm impressed you know Forth. Do you know the other 5 people? 
> > :P
> 
> I should clarify here... I have a good working knowledge of Fourth. 
> And have 
> written some pretty neat stuff with it. (No, I didn't write OFPong... 
> although 
> I may try to duplicate that some time soon here... <- MacHack 
> followers may 
> remember that one!)
> 

So 6 people ;)

> >Advantages of OF boot:
> >- No boot time for MacOS (big plus)
> >- Can be used on any modern mac (including OS 9 and X machines)
> 
> OldWorld and NewWorld alike. 7x00's on up will work.

I meant "modern" loosely. Any make that has OF (anything that's a ppc 
and not a x1xx) will work. Do OldWorld macs have elf-loader? I remember 
there are vastly fewer supported exe formats on pre-OF3 boxes. (I don't 
feel like rebooting this box and resetting things to /chaos/control 
atm).

> >- Using a bootstrap partition, it *should* be possible simply to 
> > insert
> >a OBOS CD and boot off that
> >- No MacOS partition necessary
> >
> >Disadvantages
> >- Apple's OF implementation is bastardized, which can cause some
> >problems
> 
> So I've noticed in my diggings through the wasteland of docs at Sun 
> and Apple.

"Wasteland" describes the docs quite eloquently. :)

> >- If we *can't* have just sticking in a CD, then you have to muck 
> > with
> >OF. (Except that BootX mimics OF from MacOS, and we could provide an
> >install tool)
> 
> If I'm correct, as long as there's an Apple_Bootstrap partition on 
> the CD, 
> holding down the 'C' key at startup would load it. Nathan, you seem 
> to be more 
> of the expert on Mac hardware here. (and I'm wondering... where _did_ 
> you 
> learn all this?)

I am the BeOS PPC user, you see :) Also, I have spent an inordinant 
amount of time mucking with the Be bootloader, trying to get it to run 
from OF.

> >- MacOS loads extra fcode drivers at boot that the BeOS now takes
> >advantage of. This is why the BeOS kernel has no SCSI module on ppc: 
> > it
> >uses the SCSI manager. (Note: I am not sure of this statement, but
> >given experiences, this seems likely)
> 
> Hmm... not sure on this either. Many devices (PCI and system board) 
> have 
> drivers written in Fourth and embedded in ROM's on the device itself. 
> IIRC the 
> Fourth drivers for the SCSI (equivalent of a SCSI BIOS on x86) 
> provide 
> functions of all I/O on the chain... It was my understanding that 
> this was how 
> the PPC kernel got information and read/write from the drives. I'm 
> possibly 
> wrong here too... anyone else got an answer? Embedded Fourth drivers 
> are a 
> God-send, and help give the Mac it's true Plug and Play.

The BeOS kernel certainly uses the ROM fcode drivers, but it uses some 
MacOS ones too (more devices are supported using BeOS Launcher than OS 
Chooser). The Be bootloader on ppc is a two-step process. The first 
part links to various MacOS shared libraries, and displays the MacOS 
end. For OS Chooser, it pops up the choose system box, for BeOS 
Launcher it displays the options screen, for both it reads the prefs 
file and then uses the CFM to load the Boot 1 resource. We were using 
this resource with OF in order to get it to boot, but this fails 
because the first stage passes a complex set of arguments to the stage 
2 loader. These arguments contain both the settings from the Prefs file 
*and* a device tree extracted from the MacOS. The result is that any 
fcode drivers loaded by the MacOS are used by the BeOS, and the BeOS 
kernel remembers the memory locations of I/O devices from the MacOS 
without talking to OF itself. This is especially useful since MacOS 
kicks the OF runtime out of RAM :P When we saw the level of interaction 
between the bootloaders and the OS, we gave up, because it started 
looking really icky.

Apologies to the x86 users here, who are probably wondering WTF OF,  
BeOS Launcher, OS Chooser, CFM, and a Boot 1 resource might be :P
-Nathan

--
Fortune Cookie Says:

Always borrow money from a pessimist; he doesn't expect to be paid
back.


Other related posts: