Subject: Re(2): Boot problem w/ CURRENT branch (gdb etc...)
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: Benjamin Herrenschmidt <benh@mipsys.com>
List: port-macppc
Date: 12/09/1999 15:27:49
On Wed, Dec 8, 1999, Bill Studenmund <wrstuden@nas.nasa.gov> wrote:

>You do realize we don't support the G4's yet, don't you? Besides not
>supporting the G4 itself (not sure how much change we need there), we
>don't support the on-board I/O.

If it's a first generation G4 (Yikes), then it's the same chipset as the
B&W G3. The G4 processor itself can be handled like a G3 (but you won't
be able to use Altivec). That's what Linux/PPC does.

The new machines (iBook, iMacDV and G4 Sawtooth) are using a new chipset,
but getting basic support for it should not be very complicated.
Basically, what you need to do is:

 - Use RTAS for PCI config access & nvram
 - Implement support for OpenPIC interrupt controller and configure it
according to CHRP interrupt mapping
 - Have a working via-pmu driver, don't do any ADB transaction unless
there's an "adb" node in the device tree (iBook only)
 - Treat IDE the same way you did for previous machines, except for the
node named "ata-4" for which the timing register is a bit different.
 
You can grab the linuxppc patches on my "test" web page
(http://calvaweb.calvacom.fr/test.html) if you want to have an idea about
what changed (those patches contains support for the 3 new machines).
Note that I also added code to directly do PCI config accesses without
going thru RTAS, but you should not need that since you are always
booting via OpenFirmware.

Also, make sure (and this is also true for older "newworld" macs) to call
OF "quiesce" client interface call once you are finished with OF and
before doing anything with the MMU or moving thing in memory. This call
will tell OF to stop bus it's drivers and will prevent any device from
bus mastering to main memory, avoing various weird memory corruption
problems).