Subject: Re: *BSD supporting 603[3]?
To: None <port-powerpc@NetBSD.ORG, cagney@tpgi.com.au>
From: Wolfgang Solfrank <ws@kurt.tools.de>
List: port-powerpc
Date: 01/30/1997 14:15:30
> I believe that the *BSD/PowerPC kernels should be able to run on 603 or
> 603e with a small change explained below.

Hmm, what are you talking about?  NetBSD/powerpc has supported the 603 since
it was first checked in.  And yes, I've seen it running on one (actually, I've
made it run on one :-)).

> As background, both the 603 and 603e handle misses to their VM
> Translation Lookaside Buffers in software - the processor traps to a
> small interrupt handler that either loads a new TLB entry or (if the
> entry isn't found) fudges things so that it looks like a normal `page
> fault'.  The code that handles these traps being contained in processor
> interrupt tables (somewhere in the 0x000..0x2fff address range).
> 
> At present, the *BSD kernels overrides these trap handlers with a
> generic `panic' trap handler.  I can see a number of solutions.

Not with NetBSD/powerpc.  initppc() installed proper 603 trap handlers in the
appropriate locations.

> 	1.	Initially, I'd suggest that machdep.c:initppc()
> 		be modified so that it doesn't write over the
> 		603/603e TLB trap handlers.
> 		If the OpenFirmware is running in virtual mode
> 		then it will have already installed those handlers
> 		for you.  However, if the OpenFirmware is running
> 		in real mode then all bets are off :-)

NetBSD/powerpc assumes OpenFirmware to run in real mode.  It even goes to
some length to emulate real mode OpenFirmware on machines that can only run
OpenFirmware in virtual mode.  (It doesn't do this completely, but the
callback functions aren't supported on these systems anyway (at least not on
those that I've seen)).

> 	2.	Later, the kernel can be modified so that it detects
> 		the processor and thence installs the approperiate
> 		TLB miss handler.
> 		The handler code is freely available from IBM/Mot's
> 		web sites, just make certain it is the most recent
> 		version.

Can you give an URL for this?  I'd like to check the bugs I found in the
603 manual against their current version...

Ciao,
Wolfgang
--
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800